aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts/commands.coffee
diff options
context:
space:
mode:
Diffstat (limited to 'background_scripts/commands.coffee')
-rw-r--r--background_scripts/commands.coffee9
1 files changed, 6 insertions, 3 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index 8d3808a2..4d2e1606 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -9,7 +9,6 @@ Commands =
Settings.postUpdateHooks["keyMappings"] = @loadKeyMappings.bind this
@loadKeyMappings Settings.get "keyMappings"
- @prepareHelpPageData()
loadKeyMappings: (customKeyMappings) ->
@keyToCommandRegistry = {}
@@ -43,6 +42,7 @@ Commands =
chrome.storage.local.set mapKeyRegistry: @mapKeyRegistry
@installKeyStateMapping()
+ @prepareHelpPageData()
# Push the key mapping for passNextKey into Settings so that it's available in the front end for insert
# mode. We exclude single-key mappings (that is, printable keys) because when users press printable keys
@@ -113,6 +113,9 @@ Commands =
# We don't need these properties in the content scripts.
delete currentMapping[key][prop] for prop in ["keySequence", "description"]
chrome.storage.local.set normalModeKeyStateMapping: keyStateMapping
+ # Inform `KeyboardUtils.isEscape()` whether `<c-[>` should be interpreted as `Escape` (which it is by
+ # default).
+ chrome.storage.local.set useVimLikeEscape: "<c-[>" not of keyStateMapping
# Build the "helpPageData" data structure which the help page needs and place it in Chrome storage.
prepareHelpPageData: ->
@@ -337,8 +340,8 @@ commandDescriptions =
toggleViewSource: ["View page source", { noRepeat: true }]
copyCurrentUrl: ["Copy the current URL to the clipboard", { noRepeat: true }]
- openCopiedUrlInCurrentTab: ["Open the clipboard's URL in the current tab", { background: true, noRepeat: true }]
- openCopiedUrlInNewTab: ["Open the clipboard's URL in a new tab", { background: true, repeatLimit: 20 }]
+ openCopiedUrlInCurrentTab: ["Open the clipboard's URL in the current tab", { noRepeat: true }]
+ openCopiedUrlInNewTab: ["Open the clipboard's URL in a new tab", { repeatLimit: 20 }]
enterInsertMode: ["Enter insert mode", { noRepeat: true }]
passNextKey: ["Pass the next key to the page"]