4 ms·
>* scancodes (what the hardware actually sends). Nobody should really touch this directly these days. Note that this is variable-length and encodes press and re
by MiddleEndian 3y ago
>* scancodes (what the hardware actually sends). Nobody should really touch this directly these days. Note that this is variable-length and encodes press and release differently.
I politely disagree here, sometimes you do want scan codes. I am working (very slowly lol) on a QWOP-like browser game. I want to hit the keys that are positioned like Q, W, O, and P. I use the dvorak keyboard layout. Using scancodes means that I still capture the right keys for non-QWERTY layouts.
Of course, my FIPS key at work seems to use scan codes to press laid out keys, so it sends all the wrong characters (over the network, not on my local machine for whatever reason) unless I first switch back to QWERTY first.
- o11c 3y agoYou want keycodes for that; you don't need scancodes.
- MiddleEndian 3y agoActually shit you're right that's what I'm using. That's what I get for posting while still sleepy lol