aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode_normal.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'content_scripts/mode_normal.coffee')
-rw-r--r--content_scripts/mode_normal.coffee13
1 files changed, 13 insertions, 0 deletions
diff --git a/content_scripts/mode_normal.coffee b/content_scripts/mode_normal.coffee
index 6ae82fe6..9a53ce76 100644
--- a/content_scripts/mode_normal.coffee
+++ b/content_scripts/mode_normal.coffee
@@ -33,6 +33,13 @@ class NormalMode extends KeyHandlerMode
else
Utils.invokeCommandString registryEntry.command, count, {registryEntry}
+enterNormalMode = (count) ->
+ new NormalMode
+ indicator: "Normal mode (pass keys disabled)"
+ exitOnEscape: true
+ singleton: "enterNormalMode"
+ count: count
+
NormalModeCommands =
# Scrolling.
scrollToBottom: ->
@@ -112,6 +119,12 @@ NormalModeCommands =
mainFrame: -> focusThisFrame highlight: true, forceFocusThisFrame: true
showHelp: (sourceFrameId) -> HelpDialog.toggle {sourceFrameId, showAllCommandDetails: false}
+ passNextKey: (count, options) ->
+ if options.registryEntry.options.normal
+ enterNormalMode count
+ else
+ new PassNextKeyMode count
+
root = exports ? (window.root ?= {})
root.NormalMode = NormalMode
root.NormalModeCommands = NormalModeCommands