OSDev.org

The Place to Start for Operating System Developers
It is currently Mon Jul 24, 2017 2:30 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Scan-codes
PostPosted: Wed Jun 30, 2004 3:35 pm 
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..


Top
  
 
 Post subject: Re:Scan-codes
PostPosted: Thu Jul 01, 2004 2:10 am 
Offline
Member
Member
User avatar

Joined: Sat Jan 15, 2005 12:00 am
Posts: 8018
Location: At his keyboard!
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

_________________
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.


Top
 Profile  
 
 Post subject: Re:Scan-codes
PostPosted: Thu Jul 01, 2004 7:39 am 
Thanks you.. what is the Make and Break tables? The make I understand but the break?


Top
  
 
 Post subject: Re:Scan-codes
PostPosted: Thu Jul 01, 2004 8:11 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7094
Location: Germany
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:

Quote:
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.


:) <= meaning, no offense intended, try to take the morale for future web research. ;)

_________________
Every good solution is obvious once you've found it.


Top
 Profile  
 
 Post subject: Re:Scan-codes
PostPosted: Thu Jul 01, 2004 8:31 am 
hee-hee thank you.. :)


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 11 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group