curious keyboard scan codes
Posted: Sat Aug 23, 2008 3:15 pm
Hi again,
I recently tried to capture cursor key input for a textbox, but I get really weired scan codes. I read that some unprintable keys send the escape scan code 0xE0, but my keys apparently wanna be unique.
This is what I get:
Left cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0xE1
KeyUp (MS Virtual PC): 0x40, 0x00, 0x40, 0x08
KeyDown (Bochs): 0x40, 0xF1
KeyUp (Bochs): 0x40, 0x00
Right cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0x00
KeyUp (MS Virtual PC): 0x40, 0x8E, 0x40, 0x08
KeyDown (Bochs): 0x40, 0x00
KeyUp (Bochs): 0x40, 0x8E
Up cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0x00
KeyUp (MS Virtual PC): 0x40, 0x40, 0x40, 0x08
KeyDown (Bochs): 0x40, 0x00
KeyUp (Bochs): 0x40, 0x40
Down cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0x00
KeyUp (MS Virtual PC): 0x40, 0x40, 0x40, 0x08
KeyDown (Bochs): 0x40, 0x00
KeyUp (Bochs): 0x40, 0x40
(My keyboard is a "Standard 101/102-Key or Microsoft Natural PS/2 Keyboard")
Particularly thought-provoking the is the fact that the keys UP and DOWN are 100% the same!
Please help me out.
I recently tried to capture cursor key input for a textbox, but I get really weired scan codes. I read that some unprintable keys send the escape scan code 0xE0, but my keys apparently wanna be unique.
This is what I get:
Left cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0xE1
KeyUp (MS Virtual PC): 0x40, 0x00, 0x40, 0x08
KeyDown (Bochs): 0x40, 0xF1
KeyUp (Bochs): 0x40, 0x00
Right cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0x00
KeyUp (MS Virtual PC): 0x40, 0x8E, 0x40, 0x08
KeyDown (Bochs): 0x40, 0x00
KeyUp (Bochs): 0x40, 0x8E
Up cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0x00
KeyUp (MS Virtual PC): 0x40, 0x40, 0x40, 0x08
KeyDown (Bochs): 0x40, 0x00
KeyUp (Bochs): 0x40, 0x40
Down cursor key:
KeyDown (MS Virtual PC): 0x40, 0x20, 0x40, 0x00
KeyUp (MS Virtual PC): 0x40, 0x40, 0x40, 0x08
KeyDown (Bochs): 0x40, 0x00
KeyUp (Bochs): 0x40, 0x40
(My keyboard is a "Standard 101/102-Key or Microsoft Natural PS/2 Keyboard")
Particularly thought-provoking the is the fact that the keys UP and DOWN are 100% the same!
Please help me out.