From 9cfa00bc7db3e07c3abbeb09e483d9fdf20bbc17 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Mon, 29 Feb 2016 06:07:01 +0000 Subject: Key bindings; refactor passKeys. Previously, the key-handling logic (keyQueue, etc) was and the backend whereas passKeys were handled in the content scripts - so they were a long way apart. Now that they're in the same place, it makes more sense to integrate passKey handling into the regular key handling, because they depend upon the same data structures. --- content_scripts/vimium_frontend.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'content_scripts/vimium_frontend.coffee') diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index ec666a23..46b21ed0 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -98,6 +98,7 @@ class NormalMode extends KeyHandlerMode super extend options, name: "normal" indicator: false # There is no mode indicator in normal mode. + trackState: true # Maintain @passKeys. commandHandler: @commandHandler.bind this chrome.storage.local.get "normalModeKeyStateMapping", (items) => @@ -127,8 +128,7 @@ class NormalMode extends KeyHandlerMode window.initializeModes = (args...) -> # Install the permanent modes. The permanently-installed insert mode tracks focus/blur events, and # activates/deactivates itself accordingly. - normalMode = new NormalMode args... - new PassKeysMode normalMode + new NormalMode args... new InsertMode permanent: true Scroller.init() -- cgit v1.2.3