this kills the keybind
This commit is contained in:
parent
4df8dcc185
commit
bd5ee5816a
@ -845,9 +845,9 @@
|
|||||||
} else if (kc === 27) {
|
} else if (kc === 27) {
|
||||||
key = 'Esc';
|
key = 'Esc';
|
||||||
} else if (kc === 8) {
|
} else if (kc === 8) {
|
||||||
key = 'BS';
|
|
||||||
} else {
|
|
||||||
key = '';
|
key = '';
|
||||||
|
} else {
|
||||||
|
key = null;
|
||||||
}
|
}
|
||||||
if (key) {
|
if (key) {
|
||||||
if (e.altKey) {
|
if (e.altKey) {
|
||||||
@ -1133,12 +1133,9 @@
|
|||||||
keybind: function(e) {
|
keybind: function(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
if (!(key = keybinds.cb.keyCode(e))) {
|
if ((key = keybinds.cb.keyCode(e)) == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (key === 'BS') {
|
|
||||||
key = '';
|
|
||||||
}
|
|
||||||
this.value = key;
|
this.value = key;
|
||||||
$.setValue(this.name, key);
|
$.setValue(this.name, key);
|
||||||
return conf[this.name] = key;
|
return conf[this.name] = key;
|
||||||
|
|||||||
@ -603,9 +603,9 @@ keybinds =
|
|||||||
else if kc is 27
|
else if kc is 27
|
||||||
key = 'Esc'
|
key = 'Esc'
|
||||||
else if kc is 8
|
else if kc is 8
|
||||||
key = 'BS'
|
|
||||||
else
|
|
||||||
key = ''
|
key = ''
|
||||||
|
else
|
||||||
|
key = null
|
||||||
if 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
|
||||||
@ -894,8 +894,7 @@ options =
|
|||||||
keybind: (e) ->
|
keybind: (e) ->
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
e.stopPropagation()
|
e.stopPropagation()
|
||||||
return unless key = keybinds.cb.keyCode e
|
return unless (key = keybinds.cb.keyCode e)?
|
||||||
if key is 'BS' then key = ''
|
|
||||||
@value = key
|
@value = key
|
||||||
$.setValue @name, key
|
$.setValue @name, key
|
||||||
conf[@name] = key
|
conf[@name] = key
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user