Actually the keyCode
s for %
and left arrow key
are not the same.
%
.charCode == 37
.keyCode == 0
.which == 37
left arrow
.charCode == 0
.keyCode == 37
.which == 0
You need to fix your program logic and not mush codes together via ... = theEvent.keyCode || theEvent.which
.
(Raw) Keyboard handling is a mess anyway, until browsers start implementing .key
and .char
correctly and fully.