- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
// Handle Ctrl-1 ... Ctrl-9 keypresses
if (!event.isSpecialKey() && event.isControlKey()) {
final int code = event.getKeyCode();
if (code >= '1' && code <= '9') {
// Technically, the keyCode is not the ASCII code and should not
// be treated as such. Stupid JavaScript events. However, it
// *just so happens* that for number keys these codes match their
// ASCII codes. Luckily for us.
Uebok 08.06.2012 13:10 # −13
movaxbx 08.06.2012 13:52 # −8
wvxvw 08.06.2012 13:55 # 0