aboutsummaryrefslogtreecommitdiffstats
path: root/background_scripts
diff options
context:
space:
mode:
authorStephen Blott2017-10-14 12:38:26 +0100
committerStephen Blott2017-10-14 12:38:26 +0100
commit66b11f98f480bbd83cb2cf720e219d0df8203f80 (patch)
tree46359c70004eec34a3063276ed0ebd3e1c1d5d09 /background_scripts
parentac9eba9b89c3c29d155a159c57acde3d28fd03ce (diff)
downloadvimium-66b11f98f480bbd83cb2cf720e219d0df8203f80.tar.bz2
Allow <c-[> to be mapped as a regular command.
If map <c-[> someCommand is configured, then the hardwired `<c-[>` meaning `Escape` behaviour is disabled. Users who want to map `<c-[>` probably *never* use it as `Escape`. Fixes #2722.
Diffstat (limited to 'background_scripts')
-rw-r--r--background_scripts/commands.coffee3
1 files changed, 3 insertions, 0 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee
index cda036e6..7e171d31 100644
--- a/background_scripts/commands.coffee
+++ b/background_scripts/commands.coffee
@@ -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: ->