don't allow lone alt/ctrl keybinds

This commit is contained in:
James Campos 2011-07-24 09:55:52 -07:00
parent 78fcfd2c33
commit ce6a995e98
2 changed files with 10 additions and 7 deletions

View File

@ -842,12 +842,14 @@
} else { } else {
key = ''; key = '';
} }
if (key) {
if (e.altKey) { if (e.altKey) {
key = 'alt+' + key; key = 'alt+' + key;
} }
if (e.ctrlKey) { if (e.ctrlKey) {
key = 'ctrl+' + key; key = 'ctrl+' + key;
} }
}
return key; return key;
} }
}, },

View File

@ -603,6 +603,7 @@ keybinds =
key = 'Esc' key = 'Esc'
else else
key = '' key = ''
if key
if e.altKey then key = 'alt+' + key if e.altKey then key = 'alt+' + key
if e.ctrlKey then key = 'ctrl+' + key if e.ctrlKey then key = 'ctrl+' + key
key key