aboutsummaryrefslogtreecommitdiff
path: root/pattern.c
diff options
context:
space:
mode:
authorBen Harris <bjh21@bjh21.me.uk>2022-10-24 22:07:12 +0100
committerBen Harris <bjh21@bjh21.me.uk>2022-10-24 22:07:12 +0100
commit322a439d801c91cf30a208cff499b33f4a5a2123 (patch)
treea5be1d7605d1328f554cc09d2c0ee3ed807d73a1 /pattern.c
parentc1059c07fbb77f3f697b305aa55cdcd4361faf5c (diff)
downloadpuzzles-322a439d801c91cf30a208cff499b33f4a5a2123.zip
puzzles-322a439d801c91cf30a208cff499b33f4a5a2123.tar.gz
puzzles-322a439d801c91cf30a208cff499b33f4a5a2123.tar.bz2
puzzles-322a439d801c91cf30a208cff499b33f4a5a2123.tar.xz
js: Use KeyboardEvent.keyCode and .char only as fallbacks
KeyboardEvent.keyCode is a platform-dependent mess. KeyboardEvent.char is better-defined, but in my browser it's always null. KeyboardEvent.key is the right thing to use when we want to know the semantics of a key. This commit just re-organises the big "else if" chain in key() so that all the tests on "key" come first. That way at least if key and keyCode disagree, we'll use the more trustworthy one.
Diffstat (limited to 'pattern.c')
0 files changed, 0 insertions, 0 deletions