     # Enter insert mode when the user enables the native find interface.
     if (keyChar == "f" && KeyboardUtils.isPrimaryModifierKey(event))
       enterInsertModeWithoutShowingIndicator()
-      return Mode.propagate
+      return true
 
     if (keyChar)
       if (findMode)
         handleKeyCharForFindMode(keyChar)
-        return Mode.suppressPropagation
+        DomUtils.suppressEvent(event)
       else if (!isInsertMode() && !findMode)
         if (isPassKey keyChar)
-          return Mode.propagate
+          return handlerStack.passThrough
         if (currentCompletionKeys.indexOf(keyChar) != -1 or isValidFirstKey(keyChar))
-          keyPort.postMessage({ keyChar:keyChar, frameId:frameId })
-          return Mode.suppressPropagation
+          DomUtils.suppressEvent(event)
 
         keyPort.postMessage({ keyChar:keyChar, frameId:frameId })
 
-  return Mode.propagate
+  return true
 
 onKeydown = (event) ->
   keyChar = ""

      event.srcElement.blur()
    exitInsertMode()
    DomUtils.suppressEvent event
    KeydownEvents.push event

  else if (findMode)
    if (KeyboardUtils.isEscape(event))
      handleEscapeForFindMode()
      KeydownEvents.push event
      return Mode.suppressPropagation

    else if (event.keyCode == keyCodes.backspace || event.keyCode == keyCodes.deleteKey)
      handleDeleteForFindMode()
      KeydownEvents.push event
      return Mode.suppressPropagation

    else if (event.keyCode == keyCodes.enter)
      handleEnterForFindMode()
      KeydownEvents.push event
      return Mode.suppressPropagation

    else if (!modifiers)
      KeydownEvents.push event
      return Mode.suppressPropagation

  else if (isShowingHelpDialog && KeyboardUtils.isEscape(event))
    hideHelpDialog()
    KeydownEvents.push event
    return Mode.suppressPropagation

  else if (!isInsertMode() && !findMode)
    if (keyChar)
      if (currentCompletionKeys.indexOf(keyChar) != -1 or isValidFirstKey(keyChar))
        KeydownEvents.push event
        keyPort.postMessage({ keyChar:keyChar, frameId:frameId })
        return Mode.suppressPropagation

      keyPort.postMessage({ keyChar:keyChar, frameId:frameId })


  if (keyChar == "" && !isInsertMode() &&
     (currentCompletionKeys.indexOf(KeyboardUtils.getKeyChar(event)) != -1 ||
      isValidFirstKey(KeyboardUtils.getKeyChar(event))))
    DomUtils.suppressPropagation(event)
    KeydownEvents.push event

  return true

onKeyup = (event) ->
  DomUtils.suppressPropagation(event) if KeydownEvents.pop event
  return true

checkIfEnabledForUrl = ->
  url = window.location.toString()
