this kills the keybind

This commit is contained in:
Nicolas Stepien 2011-07-24 20:35:14 +02:00
parent 4df8dcc185
commit bd5ee5816a
2 changed files with 6 additions and 10 deletions

View File

@ -845,9 +845,9 @@
} else if (kc === 27) {
key = 'Esc';
} else if (kc === 8) {
key = 'BS';
} else {
key = '';
} else {
key = null;
}
if (key) {
if (e.altKey) {
@ -1133,12 +1133,9 @@
keybind: function(e) {
e.preventDefault();
e.stopPropagation();
if (!(key = keybinds.cb.keyCode(e))) {
if ((key = keybinds.cb.keyCode(e)) == null) {
return;
}
if (key === 'BS') {
key = '';
}
this.value = key;
$.setValue(this.name, key);
return conf[this.name] = key;

View File

@ -603,9 +603,9 @@ keybinds =
else if kc is 27
key = 'Esc'
else if kc is 8
key = 'BS'
else
key = ''
else
key = null
if key
if e.altKey then key = 'alt+' + key
if e.ctrlKey then key = 'ctrl+' + key
@ -894,8 +894,7 @@ options =
keybind: (e) ->
e.preventDefault()
e.stopPropagation()
return unless key = keybinds.cb.keyCode e
if key is 'BS' then key = ''
return unless (key = keybinds.cb.keyCode e)?
@value = key
$.setValue @name, key
conf[@name] = key