aboutsummaryrefslogtreecommitdiffstats
path: root/lib/keyboardUtils.js
diff options
context:
space:
mode:
authorNiklas Baumstark2012-01-21 00:23:59 +0100
committerNiklas Baumstark2012-04-10 23:54:35 +0200
commit6f589fedcc826b125884e3a5884c9791802afb7f (patch)
treeeb117a99558b5456b0367157a09a12f887db8630 /lib/keyboardUtils.js
parent269042a28230bb35406d1447fac8955ca1a5c0b3 (diff)
downloadvimium-6f589fedcc826b125884e3a5884c9791802afb7f.tar.bz2
add fuzzy mode
Diffstat (limited to 'lib/keyboardUtils.js')
-rw-r--r--lib/keyboardUtils.js3
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) {