From 272b7b856cad6050d739726ecfad4527dac83b22 Mon Sep 17 00:00:00 2001 From: James Campos Date: Sun, 14 Nov 2010 03:34:31 -0800 Subject: [PATCH] don't fire when alt or ctrl held --- 4chan_x.coffee | 1 + 4chan_x.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/4chan_x.coffee b/4chan_x.coffee index 4597f37ea..768cb2261 100644 --- a/4chan_x.coffee +++ b/4chan_x.coffee @@ -371,6 +371,7 @@ keyAct = (e) -> # [0-9;=A-Z] unless 48 <= kc <= 90 return + if e.ctrlKey or e.altKey then return e.preventDefault() char = String.fromCharCode kc hash = location.hash diff --git a/4chan_x.js b/4chan_x.js index 456e3f296..0f3952d7c 100644 --- a/4chan_x.js +++ b/4chan_x.js @@ -457,6 +457,9 @@ if (!((48 <= kc) && (kc <= 90))) { return null; } + if (e.ctrlKey || e.altKey) { + return null; + } e.preventDefault(); char = String.fromCharCode(kc); hash = location.hash;