aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2016-10-09 16:31:23 +0100
committerStephen Blott2016-10-09 16:31:23 +0100
commit9c1012ad3a731b015b8a70b58828fbcd0acb7db0 (patch)
treeedb48cc06710408e082f59619779080051640b46 /content_scripts
parent6596e30392a1ca053223825eda5cde060394a4aa (diff)
downloadvimium-9c1012ad3a731b015b8a70b58828fbcd0acb7db0.tar.bz2
Extend key translation to include Escape.
Here, these map to escape: translate x <c-[> translate <c-c> <c-[>
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/mode_key_handler.coffee6
1 files changed, 1 insertions, 5 deletions
diff --git a/content_scripts/mode_key_handler.coffee b/content_scripts/mode_key_handler.coffee
index 7904d801..9f8206fb 100644
--- a/content_scripts/mode_key_handler.coffee
+++ b/content_scripts/mode_key_handler.coffee
@@ -34,11 +34,7 @@ class KeyHandlerMode extends Mode
blur: (event) => @alwaysContinueBubbling => @keydownEvents = {} if event.target == window
@keyTranslationRegistry = {}
- chrome.storage.local.get "keyTranslationRegistry", (obj) =>
- @keyTranslationRegistry = obj.keyTranslationRegistry
- chrome.storage.onChanged.addListener (changes, area) =>
- if area == "local" and changes.keyTranslationRegistry?.newValue?
- @keyTranslationRegistry = changes.keyTranslationRegistry.newValue
+ Utils.monitorChromeStorage "keyTranslationRegistry", (value) => @keyTranslationRegistry = value
onKeydown: (event) ->
keyChar = KeyboardUtils.getKeyCharString event