aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts/mode_passkeys.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-01-15 11:35:09 +0000
committerStephen Blott2015-01-15 15:30:33 +0000
commit455ee7fcdea7baf1aeaed67603ec87004c1c8cce (patch)
treeb6276a5e230d93e03664bd1e920daae5cae79b82 /content_scripts/mode_passkeys.coffee
parent0afb3d08d58e45d8392ed153f7043726125d7a45 (diff)
downloadvimium-455ee7fcdea7baf1aeaed67603ec87004c1c8cce.tar.bz2
Modes; yet more teaks and fiddles.
Diffstat (limited to 'content_scripts/mode_passkeys.coffee')
-rw-r--r--content_scripts/mode_passkeys.coffee7
1 files changed, 4 insertions, 3 deletions
diff --git a/content_scripts/mode_passkeys.coffee b/content_scripts/mode_passkeys.coffee
index dde91c13..a6cd7d2d 100644
--- a/content_scripts/mode_passkeys.coffee
+++ b/content_scripts/mode_passkeys.coffee
@@ -8,6 +8,10 @@ class PassKeysMode extends Mode
keypress: (event) => @handleKeyChar String.fromCharCode event.charCode
keyup: (event) => @handleKeyChar String.fromCharCode event.charCode
+ @keyQueue = ""
+ @push
+ registerKeyQueue: ({ keyQueue: keyQueue }) => @alwaysContinueBubbling => @keyQueue = keyQueue
+
# Decide whether this event should be passed to the underlying page. Keystrokes are *never* considered
# passKeys if the keyQueue is not empty. So, for example, if 't' is a passKey, then 'gt' and '99t' will
# neverthless be handled by vimium.
@@ -17,9 +21,6 @@ class PassKeysMode extends Mode
else
@continueBubbling
- configure: (request) ->
- @keyQueue = request.keyQueue if request.keyQueue?
-
chooseBadge: (badge) ->
badge.badge ||= "P" if @passKeys and not @keyQueue