diff options
| author | Stephen Blott | 2016-10-10 13:27:32 +0100 |
|---|---|---|
| committer | Stephen Blott | 2016-10-10 13:28:15 +0100 |
| commit | c5e26d75cb8525ba34f6f54f1a1c041df66075e3 (patch) | |
| tree | 3d99ccb76e3f0ee9ef3132c49ae5e165dcf30a8f /background_scripts | |
| parent | 1df19294c544b897bf5fe52401050dd43b69129d (diff) | |
| download | vimium-c5e26d75cb8525ba34f6f54f1a1c041df66075e3.tar.bz2 | |
Rename 'translate' to 'mapkey'.
Diffstat (limited to 'background_scripts')
| -rw-r--r-- | background_scripts/commands.coffee | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/background_scripts/commands.coffee b/background_scripts/commands.coffee index 17c05f90..d12b704d 100644 --- a/background_scripts/commands.coffee +++ b/background_scripts/commands.coffee @@ -9,7 +9,7 @@ Commands = @clearKeyMappingsAndSetDefaults() @parseCustomKeyMappings customKeyMappings @generateKeyStateMapping() - chrome.storage.local.set keyTranslationRegistry: @keyTranslationRegistry + chrome.storage.local.set mapKeyRegistry: @mapKeyRegistry availableCommands: {} keyToCommandRegistry: {} @@ -85,11 +85,11 @@ Commands = when "unmapAll" @keyToCommandRegistry = {} - when "translate" + when "mapkey" if tokens.length == 3 fromChar = @parseKeySequence tokens[1] toChar = @parseKeySequence tokens[2] - @keyTranslationRegistry[fromChar[0]] = toChar[0] if fromChar.length == toChar.length == 1 + @mapKeyRegistry[fromChar[0]] = toChar[0] if fromChar.length == toChar.length == 1 # 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 @@ -116,7 +116,7 @@ Commands = clearKeyMappingsAndSetDefaults: -> @keyToCommandRegistry = {} - @keyTranslationRegistry = {} + @mapKeyRegistry = {} for own key, command of defaultKeyMappings keySequence = @parseKeySequence key key = keySequence.join "" |
