diff --git a/4chan_x.user.js b/4chan_x.user.js index 87377ccf5..e6fde2440 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -733,6 +733,9 @@ if (!(key = keybinds.cb.keyCode(e))) { return; } + if (key === 'BS') { + key = ''; + } thread = nav.getThread(); switch (key) { case conf.close: @@ -841,6 +844,8 @@ key = String.fromCharCode(kc); } else if (kc === 27) { key = 'Esc'; + } else if (kc === 8) { + key = 'BS'; } else { key = ''; } @@ -1131,6 +1136,9 @@ if (!(key = keybinds.cb.keyCode(e))) { return; } + if (key === 'BS') { + key = ''; + } this.value = key; $.setValue(this.name, key); return conf[this.name] = key; diff --git a/script.coffee b/script.coffee index 60782e9c9..8b722c788 100644 --- a/script.coffee +++ b/script.coffee @@ -521,6 +521,7 @@ keybinds = 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 unless key = keybinds.cb.keyCode e + if key is 'BS' then key = '' thread = nav.getThread() switch key @@ -601,6 +602,8 @@ keybinds = key = String.fromCharCode kc else if kc is 27 key = 'Esc' + else if kc is 8 + key = 'BS' else key = '' if key @@ -892,6 +895,7 @@ options = e.preventDefault() e.stopPropagation() return unless key = keybinds.cb.keyCode e + if key is 'BS' then key = '' @value = key $.setValue @name, key conf[@name] = key