aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
diff options
context:
space:
mode:
authorStephen Blott2017-03-22 07:40:44 +0000
committerStephen Blott2017-03-22 07:40:47 +0000
commita8f44aa35d4a9735637e07b48a3b40654b3f0f65 (patch)
treec2a588c386231c67cecc7d5d1adca49e49e6332c /content_scripts
parenta2d3b2042e540f0c4b065fffacdac01982053014 (diff)
downloadvimium-a8f44aa35d4a9735637e07b48a3b40654b3f0f65.tar.bz2
Remove and refactor mapKeyRegistery.
1. Remove the use of mapKeyRegistery from the mode handler. 2. Refactor use of mapKeyRegistery keyboard utils. This is preparatory to refactoring all of the keyboard handling.
Diffstat (limited to 'content_scripts')
-rw-r--r--content_scripts/mode_key_handler.coffee5
1 files changed, 0 insertions, 5 deletions
diff --git a/content_scripts/mode_key_handler.coffee b/content_scripts/mode_key_handler.coffee
index 9b5a1fef..e206dbc6 100644
--- a/content_scripts/mode_key_handler.coffee
+++ b/content_scripts/mode_key_handler.coffee
@@ -33,9 +33,6 @@ class KeyHandlerMode extends Mode
# We cannot track keyup events if we lose the focus.
blur: (event) => @alwaysContinueBubbling => @keydownEvents = {} if event.target == window
- @mapKeyRegistry = {}
- Utils.monitorChromeStorage "mapKeyRegistry", (value) => @mapKeyRegistry = value
-
if options.exitOnEscape
# If we're part way through a command's key sequence, then a first Escape should reset the key state,
# and only a second Escape should actually exit this mode.
@@ -50,7 +47,6 @@ class KeyHandlerMode extends Mode
onKeydown: (event) ->
keyChar = KeyboardUtils.getKeyCharString event
- keyChar = @mapKeyRegistry[keyChar] ? keyChar
isEscape = KeyboardUtils.isEscape event
if isEscape and (@countPrefix != 0 or @keyState.length != 1)
@keydownEvents[event.keyCode] = true
@@ -77,7 +73,6 @@ class KeyHandlerMode extends Mode
onKeypress: (event) ->
keyChar = KeyboardUtils.getKeyCharString event
- keyChar = @mapKeyRegistry[keyChar] ? keyChar
if @isMappedKey keyChar
@handleKeyChar keyChar
else if @isCountKey keyChar