       @reset()
       false # Suppress event.
     else if @keyCharIsMapped keyChar
-      @unlessKeyCharIsPassKey keyChar, =>
-        @keydownEvents[event.keyCode] = true
-        @handleKeyChar event, keyChar
+      @keydownEvents[event.keyCode] = true
+      @handleKeyChar event, keyChar
     else if not keyChar and (keyChar = KeyboardUtils.getKeyChar event) and
         (@keyCharIsMapped(keyChar) or @isCountKey keyChar)
       # We will possibly be handling a subsequent keypress event, so suppress propagation of this event to
       # prevent triggering page event listeners (e.g. Google instant Search).
-      @unlessKeyCharIsPassKey keyChar, =>
-        @keydownEvents[event.keyCode] = true
-        DomUtils.suppressPropagation event
-        @stopBubblingAndTrue
+      @keydownEvents[event.keyCode] = true
+      DomUtils.suppressPropagation event
+      @stopBubblingAndTrue
     else
       @continueBubbling
 
   onKeypress: (event) ->
     keyChar = KeyboardUtils.getKeyCharString event
-    @unlessKeyCharIsPassKey keyChar, =>
-      if @keyCharIsMapped keyChar
-        @handleKeyChar event, keyChar
-      else if @isCountKey keyChar
-        digit = parseInt keyChar
-        @reset if @keyState.length == 1 then @countPrefix * 10 + digit else digit
-        false # Suppress event.
-      else
-        @reset()
-        @continueBubbling
+    if @keyCharIsMapped keyChar
+      @handleKeyChar event, keyChar
+    else if @isCountKey keyChar
+      digit = parseInt keyChar
+      @reset if @keyState.length == 1 then @countPrefix * 10 + digit else digit
+      false # Suppress event.
+    else
+      @reset()
+      @continueBubbling
 
   onKeyup: (event) ->
     return @continueBubbling unless event.keyCode of @keydownEvents

    DomUtils.suppressPropagation event
    @stopBubblingAndTrue

  # This tests whether there is a mapping of keyChar in the current key state.
  keyCharIsMapped: (keyChar) ->
    (mapping for mapping in @keyState when keyChar of mapping)[0]?

  handleKeyChar: (event, keyChar) ->
    bgLog "Handling key #{keyChar}, mode=#{@name}."

    false # Suppress event.

  isCountKey: (keyChar) ->
    keyChar?.length == 1 and (if 0 < @countPrefix then '0' else '1') <= keyChar <= '9' and
      not @isPassKey keyChar

  # Keystrokes are *never* considered passKeys if the user has begun entering a command.  So, for example, if
  # 't' is a passKey, then the "t"-s of 'gt' and '99t' are neverthless handled as regular keys.
  isPassKey: (keyChar) ->
    @countPrefix == 0 and @keyState.length == 1 and keyChar in (@passKeys ? "")

root = exports ? window
root.KeyHandlerMode = KeyHandlerMode
