Scan-codes
Scan-codes
After a long time and lots and lots of topics, I got the keyboard interrupt working ;D But how do I convert the scancode? Also I read that ESC has the scancode 1, but when I print the scancode of a key that I press, ESC shows 68..
Re:Scan-codes
Hi,
There's 2 different sets of scan codes. The first one is normally used when the keyboard sends data to the keyboard controller chip. The keyboard controller chip usually converts this into a second (XT compatible) scan set before the keyboard driver reads it.
Therefore, you should be getting these scan codes (with XT compatible tanslation):
http://panda.cs.ndsu.nodak.edu/%7Eachap ... odes1.html
With these scan codes 68 (0x44) is the 'F10' key, and ESCAPE would be 1 (0x01).
If you turn the XT translation off you would get these scan codes instead:
http://panda.cs.ndsu.nodak.edu/%7Eachap ... odes2.html
With these scan codes 68 (0x44) is the letter 'O' key, and ESCAPE would be 118 (0x76).
Cheers,
Brendan
There's 2 different sets of scan codes. The first one is normally used when the keyboard sends data to the keyboard controller chip. The keyboard controller chip usually converts this into a second (XT compatible) scan set before the keyboard driver reads it.
Therefore, you should be getting these scan codes (with XT compatible tanslation):
http://panda.cs.ndsu.nodak.edu/%7Eachap ... odes1.html
With these scan codes 68 (0x44) is the 'F10' key, and ESCAPE would be 1 (0x01).
If you turn the XT translation off you would get these scan codes instead:
http://panda.cs.ndsu.nodak.edu/%7Eachap ... odes2.html
With these scan codes 68 (0x44) is the letter 'O' key, and ESCAPE would be 118 (0x76).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Scan-codes
Thanks you.. what is the Make and Break tables? The make I understand but the break?
Re:Scan-codes
You mean, you didn't understand the tables at
http://panda.cs.ndsu.nodak.edu/~achapwe ... odes1.html ?
Well, you could have tried
http://panda.cs.ndsu.nodak.edu/~achapwe ... board.html (which is conveniently linked at the bottom of the former page under "related information") to find this:
http://panda.cs.ndsu.nodak.edu/~achapwe ... odes1.html ?
Well, you could have tried
http://panda.cs.ndsu.nodak.edu/~achapwe ... board.html (which is conveniently linked at the bottom of the former page under "related information") to find this:
<= meaning, no offense intended, try to take the morale for future web research.There are two different types of scan codes: "make codes" and "break codes". A make code is sent when a key is pressed or held down. A break code is sent when a key is released.
Every good solution is obvious once you've found it.