954,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to convert Scancode to ASCII.

Hi,
Could anyone tell me, how to convert scancode to an equivalent ASCII char. in C language.


Vijay.

Koteswar
Newbie Poster
7 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 

Maybe I'm dumb - what's scancode?

winbatch
Posting Pro in Training
466 posts since Feb 2005
Reputation Points: 68
Solved Threads: 18
 

It's the hardware code returned from a keyboard.
I used to have a mapping table somewhere but I doubt it would still be valid as it was for old XT keyboards (the ones with the function keys on the left side and no separate cursor keys).

Here's an article from Microsoft that might provide some help if you're writing for Windows: http://www.microsoft.com/whdc/device/input/w2kscan-map.mspx

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

Hi,
Thank you for your reply. I have seen the link what you mentioned. I was told by some other people too, that the only way is to map both by creating a table of scan code & ASCII codes. I am actually looking for the table , which is already created, so that I can use in my code.

I am working on Linux system, so I would like to know whether any such table existing with the Linux source.

Thank you.
Vijay.

Koteswar
Newbie Poster
7 posts since May 2005
Reputation Points: 10
Solved Threads: 0
 
sj87
Light Poster
26 posts since Jun 2007
Reputation Points: 29
Solved Threads: 1
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You