diff options
| author | Jim Ramsay | 2010-01-04 22:14:21 +0800 |
|---|---|---|
| committer | Ilya | 2010-01-09 09:44:30 +0800 |
| commit | 26ddb06c8b0354d0540dfd3b54eb6ac2de43ea71 (patch) | |
| tree | 98c512933bba8f6125f47ef13a13439b33ffab1d /background_page.html | |
| parent | 617332a9a068aef3aaeb09f144d2dc5849faf192 (diff) | |
| download | vimium-26ddb06c8b0354d0540dfd3b54eb6ac2de43ea71.tar.bz2 | |
ESC clears the keyQueue
This allows a user to abort part-way through a multi-character command.
Diffstat (limited to 'background_page.html')
| -rw-r--r-- | background_page.html | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/background_page.html b/background_page.html index 26941cc8..f1bf450a 100644 --- a/background_page.html +++ b/background_page.html @@ -314,9 +314,15 @@ } function handleKeyDown(key, port) { - console.log("checking keyQueue: [", keyQueue + key, "]"); - keyQueue = checkKeyQueue(keyQueue + key, port.tab.id); - console.log("new KeyQueue: " + keyQueue); + if (key == "<ESC>") { + console.log("clearing keyQueue"); + keyQueue = "" + } + else { + console.log("checking keyQueue: [", keyQueue + key, "]"); + keyQueue = checkKeyQueue(keyQueue + key, port.tab.id); + console.log("new KeyQueue: " + keyQueue); + } } function checkKeyQueue(keysToCheck, tabId) { |
