We thought PrntScr produced a make code of E0 12 E0 7C in Scan Code Set 2. Actually, it's more complicated.
The keys Insert, Delete, Left Arrow, Home, End, Up Arrow, Down Arrow, Page Up, Page Down and Right Arrow should do different things on your computer depending on whether Num Lock is enabled and the state of the shift keys. Blame the IBM PC/AT trying to be compatble with the IBM PC/XT. I think?
If Num Lock is ON and both shift keys are released, the make code is prefixed with E0 12 and the break code is prefixed with E0 F0 12. If you press shift, you don't get the E0 12 prefix. This is because if you do a Shift Insert with Num Lock on
So we should treat E0 12 as an extra modifier key called Unshift and track its state, but probably not allow its state to change anything about the key decoding.
Observations
PrtScr produces E0 12 E0 7C
PrtScr with shift pressed produces E0 7C
PrtScr with control pressed produces E0 7C
(the above is regardless of numlock state)
With Num Lock off, Insert produces E0 70 regardless of shift
With Num Lock on Insert produces E0 12 E0 70
With Num Lock on and shift pressed Insert produces E0 70
With Num Lock on and control pressed Insert produces E0 12 E0 70
We thought PrntScr produced a make code of
E0 12 E0 7C
in Scan Code Set 2. Actually, it's more complicated.The keys Insert, Delete, Left Arrow, Home, End, Up Arrow, Down Arrow, Page Up, Page Down and Right Arrow should do different things on your computer depending on whether Num Lock is enabled and the state of the shift keys. Blame the IBM PC/AT trying to be compatble with the IBM PC/XT. I think?
If Num Lock is ON and both shift keys are released, the make code is prefixed with
E0 12
and the break code is prefixed withE0 F0 12
. If you press shift, you don't get theE0 12
prefix. This is because if you do a Shift Insert with Num Lock onSo we should treat
E0 12
as an extra modifier key called Unshift and track its state, but probably not allow its state to change anything about the key decoding.Observations
PrtScr
producesE0 12 E0 7C
PrtScr
with shift pressed producesE0 7C
PrtScr
with control pressed producesE0 7C
(the above is regardless of numlock state)
Insert
producesE0 70
regardless of shiftInsert
producesE0 12 E0 70
Insert
producesE0 70
Insert
producesE0 12 E0 70
References
http://www.quadibloc.com/comp/scan.htm - refers to
unshift
"Keyboard Scan Code Specification - Microsoft" - See Note 2 for Scan Code Set 2 and Note 4