New keyboard scancodes + diagram
Posted: Mon May 15, 2023 3:40 am
I've been following the progress of a pretty significant change to how keyboard scancodes are going to work, and saw that the pull request just got merged. I thought it would be pretty helpful to have a diagram of it (and needed something fun to do), so here it is:
Between right ctrl and insert, the position numbers skip enough to add 2 extra columns of keys.
The other reason I made this is because I've never actually heard of IBM's key numbering scheme (I've only known the scancode sets), and looking at the way they logically distributed the key numbers around was really interesting to see. I like how even though the numbers skip around, the skipped numbers still correspond to the physical location an individual key would be, and indeed, even though this is the ANSI layout, the ISO layout ends up using the codes you'd expect.![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
It should go without saying, but anyone's free to use and modify this however they want.
,---, ,---,---,---,---, ,---,---,---,---, ,---,---,---,---, ,---,---,---, | 6E| 6F| 70| 71| 72| 73| | 74| 75| 76| 77| | 78| 79| 7A| 7B| | 7C| 7D| 7E| o o o '---' '---'---'---'---' '---'---'---'---' '---'---'---'---' '---'---'---' ,---,---,---,---,---,---,---,---,---,---,---,---,---,-------, ,---,---,---, ,---,---,---,---, | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D|!0E->0F| | 4B| 50| 55| | 5A| 5F| 64| 69| ;---'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-----; ;---;---;---; ;---;---;---;---; | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C| 1D| | 4C| 51| 56| | 5B| 60| 65| 6A| ;-----',--',--',--',--',--',--',--',--',--',--',--',--'-----; '---'---'---' ;---;---;---; | | 1E | 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29|!2A-->2B| 4D 52 57 | 5C| 61| 66|!6B| ;------'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'-,-'--------; ,---, ;---;---;---;---; | 2C<-!2D| 2E| 2F| 30| 31| 32| 33| 34| 35| 36| 37|!38---->39| 4E| 53| 58 | 5D| 62| 67| 6C| ;----,---',--'-,-'---'---'---'---'---'---'---',--'-,----,---; ,---;---;---, ;---'---;---; | | 3A | 3B | 3C | 3D | 3E | 3F | 40| | 4F| 54| 59| |!5E->63| 68|!6D| '----'----'----'------------------------------'----'----'---' '---'---'---' '-------'---'---'!XX--->YY means, the position of XX is not used and the key actually triggers YY.
Between right ctrl and insert, the position numbers skip enough to add 2 extra columns of keys.
The other reason I made this is because I've never actually heard of IBM's key numbering scheme (I've only known the scancode sets), and looking at the way they logically distributed the key numbers around was really interesting to see. I like how even though the numbers skip around, the skipped numbers still correspond to the physical location an individual key would be, and indeed, even though this is the ANSI layout, the ISO layout ends up using the codes you'd expect.
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
It should go without saying, but anyone's free to use and modify this however they want.