Top all-time · #5481
Jan Wolter
Personal blog · unixpapa.comwebprogramming
Jan Wolter's personal blog at unixpapa.com covers web and programming. Since 2007, 15 different Hacker News readers have linked it 15 times, most often “JavaScript Madness: Keyboard Events”. No feed was found, so read it on the site itself.
Too few sampled comments (8) to say how often HN recommends it.?
Why HN links it
HN readers link Jan Wolter's pages on JavaScript keyboard events, such as key.html on keycodes and keypress, plus a key-test tool and a Flood-It game. One commenter calls the key page fantastic.
Summarised by Claude from a sample of 8 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Most-linked posts?
- JavaScript Madness: Keyboard Events9 people · 9 mentions · first linked 2007-11-15
- /js/testkey.html2 people · 2 mentions · first linked 2013-10-17
What Hacker News says?
- g3 · 2013-10-17
Chromium and Firefox send different key codes for `-` and `=` (see http://unixpapa.com/js/testkey.html ). Regarding GPFs: This is one of the few things that are not completely implemented yet, I'm working on figuring this out.
Comment linking /js/testkey.html
on “Show HN: My x86 emulator written in JavaScript” Submitted JavaScript Madness: Keyboard Events as a story · 3 points
HN discussionObligatory link to the fantastic http://unixpapa.com/js/key.html
Comment linking /js/key.html
on “Keypress: A Javascript library for capturing input”Submitted JavaScript Madness: Keyboard Events as a story · 2 points
HN discussionThe best part is that keys that don't produce text input have codes on keypress that are indistinguishable from other keys. from http://unixpapa.com/js/key.html : > For browsers that generate keypress events for special keys, it is also generally true that event.keyCode will have the same value for "left-arrow" and "%", however we can usually tell which it is because event.which is zero for special keys (there are p…
Comment linking /js/key.html
on “Whatthekeycode.com - quickly find a js keycode for any key”Submitted JavaScript Keyboard Events Compatiblity Tables: More extensive than Quirksmode as a story · 2 points
HN discussionDOM keycodes are kind of broken beyond repair[1]. They cannot be relied upon to determine precisely which character a user entered (even jQuery's charcode falls short here) because they do not take into account modifier keys, compositions, or locales. [1] For a (detailed) explanation: http://unixpapa.com/js/key.html
Comment linking /js/key.html
on “Whatthekeycode.com - quickly find a js keycode for any key”Submitted JavaScript Madness: Keyboard Events as a story · 2 points
HN discussionThis one is a guaranteed win: https://www.unixpapa.com/floodit/?sz=2&nc=8
Comment linking /floodit/?sz=2&nc=8
on “Assimilate: A Flood-It game for Mac OS 9, released in 2021”Submitted JavaScript Madness: Keyboard Events as a story · 1 points
HN discussionIf you don't happen to have your 2000s-era iMac or iBook running OS 9 currently in arm's reach here's an online version of the same sort of game: https://www.unixpapa.com/floodit/?sz=14&nc=6
Comment linking /floodit/?sz=14&nc=6
on “Assimilate: A Flood-It game for Mac OS 9, released in 2021”Submitted Mouse events in different browsers as a story · 1 points
HN discussionThat's because the keydown event uses keyCode instead of charCode, and the two don't always match. Try typing Shift+U and then '[' on this page to see what I mean: http://unixpapa.com/js/testkey.html . Since KeyboardJS is already loaded via requirejs, we can require it and then use it to get the keyCode for each character in the for loop. var KeyboardJS = require('lib/keyboard'); [...] for (var i = 0; i < input.leng…
Comment linking /js/testkey.html
on “Show HN: Play music by typing”Submitted Javascript Madness by Jan Wolter as a story · 1 points
HN discussionShifted keys, or at least upper-case letters should be easily handled. The problem I suspect is deciding which shift key has been used (or whether caps lock is enabled). As far as other modifiers, I think a lot of those aren't available to the keypress handler (Specifically, things like cmd-* on a Mac are usually handled by the windowmanager or as app menu shortcuts). I think I have seen html5/js demos that capture…
Comment linking /js/key.html
on “Show HN: Realtime Keyboard Heatmap with heatmap.js”