This commit is contained in:
James Campos 2011-07-24 10:13:34 -07:00
parent e405c43783
commit fb92ae8ae5
2 changed files with 8 additions and 4 deletions

View File

@ -730,7 +730,9 @@
if (((_ref = e.target.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !(e.keyCode === 27)) { if (((_ref = e.target.nodeName) === 'TEXTAREA' || _ref === 'INPUT') && !e.altKey && !e.ctrlKey && !(e.keyCode === 27)) {
return; return;
} }
key = keybinds.cb.keyCode(e); if (!(key = keybinds.cb.keyCode(e))) {
return;
}
thread = nav.getThread(); thread = nav.getThread();
switch (key) { switch (key) {
case conf.close: case conf.close:
@ -1126,7 +1128,9 @@
keybind: function(e) { keybind: function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
key = keybinds.cb.keyCode(e); if (!(key = keybinds.cb.keyCode(e))) {
return;
}
this.value = key; this.value = key;
$.setValue(this.name, key); $.setValue(this.name, key);
return conf[this.name] = key; return conf[this.name] = key;

View File

@ -520,7 +520,7 @@ keybinds =
cb: cb:
keydown: (e) -> keydown: (e) ->
return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27) return if e.target.nodeName in ['TEXTAREA', 'INPUT'] and not e.altKey and not e.ctrlKey and not (e.keyCode is 27)
key = keybinds.cb.keyCode e return unless key = keybinds.cb.keyCode e
thread = nav.getThread() thread = nav.getThread()
switch key switch key
@ -891,7 +891,7 @@ options =
keybind: (e) -> keybind: (e) ->
e.preventDefault() e.preventDefault()
e.stopPropagation() e.stopPropagation()
key = keybinds.cb.keyCode e return unless key = keybinds.cb.keyCode e
@value = key @value = key
$.setValue @name, key $.setValue @name, key
conf[@name] = key conf[@name] = key