diff options
| author | Niklas Baumstark | 2012-01-21 00:23:59 +0100 |
|---|---|---|
| committer | Niklas Baumstark | 2012-04-10 23:54:35 +0200 |
| commit | 6f589fedcc826b125884e3a5884c9791802afb7f (patch) | |
| tree | eb117a99558b5456b0367157a09a12f887db8630 /lib/keyboardUtils.js | |
| parent | 269042a28230bb35406d1447fac8955ca1a5c0b3 (diff) | |
| download | vimium-6f589fedcc826b125884e3a5884c9791802afb7f.tar.bz2 | |
add fuzzy mode
Diffstat (limited to 'lib/keyboardUtils.js')
| -rw-r--r-- | lib/keyboardUtils.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/keyboardUtils.js b/lib/keyboardUtils.js index 98725d95..84e860ba 100644 --- a/lib/keyboardUtils.js +++ b/lib/keyboardUtils.js @@ -47,7 +47,8 @@ function getKeyChar(event) { keyIdentifier = event.shiftKey ? correctedIdentifiers[1] : correctedIdentifiers[0]; } var unicodeKeyInHex = "0x" + keyIdentifier.substring(2); - return String.fromCharCode(parseInt(unicodeKeyInHex)).toLowerCase(); + var character = String.fromCharCode(parseInt(unicodeKeyInHex)).toLowerCase(); + return event.shiftKey ? character.toUpperCase() : character; } function isPrimaryModifierKey(event) { |
