From: Mischa POSLAWSKY Date: Tue, 28 Apr 2009 00:43:30 +0000 (+0000) Subject: only set up input bindings for clickable keys X-Git-Tag: v1.3~157 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/073e9b2bd8b8d0382c7142d27078a7fd198a75f6?hp=c26d5da0a9b989982e7897ff5712d0fc79a714b4 only set up input bindings for clickable keys --- diff --git a/keys.js b/keys.js index 5dbfb10..650cb15 100644 --- a/keys.js +++ b/keys.js @@ -33,6 +33,7 @@ document.onkeypress = function(e) { var input = e.charCode || e.keyCode; for (var i = 0; i < keylabels.length; i++) { var key = keylabels[i].parentNode; + if (!key.onclick) continue; var keychar = key.className.match(/ chr(\d+)$/); if (!keychar) continue; // not enterable keychar = keychar[1];