|
From: thricenightly (<del...@gm...> - 2017-06-20 19:33:53
|
>The scan code includes the byte that must be placed on the upper 8 bits of port 0xfe to identify a key row, a bitmask to identify one bit out of the 5 column bits and two bits to indicate whether CAPS and/or SYM should also be pressed.
OK, all that's understood. There's more though. :)
I was trying to work out how you might detect the "Break" combination - CAPS SHIFT+Space. There doesn't appear to be a way to get in_key_scancode() to give you that, so I guessed it uses the top bits, something like:
[code] uint16_t break_scancode = in_key_scancode(' ');
break_scancode |= 0x8000;
...
printf("Scan for <break> returns 0x%04X\n", in_key_pressed( break_scancode ));[/code]
Empirically, it seems the top bit looks for CAPS and the second top bit looks for SYM. Since I'm writing it up, can you confirm that's the way to do it?
|