- 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.
Комментарии (3) RSS
Добавить комментарий