Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   scan codes (http://www.velocityreviews.com/forums/t317561-scan-codes.html)

aman 03-01-2004 06:40 PM

scan codes
 
i know how to get scan codes and ascii codes for special keys.
i can get ascii codes of alphabetic keys.
how does one get scan codes of alphabetic keys??

Lew Pitcher 03-01-2004 06:57 PM

Re: scan codes
 
On 1 Mar 2004 10:40:27 -0800, aman_coe@rediffmail.com (aman) wrote:

>i know how to get scan codes and ascii codes for special keys.
>i can get ascii codes of alphabetic keys.
>how does one get scan codes of alphabetic keys??


Sorry, but there are no such things as "scan codes" in standard C.

Perhaps you should try a newsgroup that relates to your compiler or operating
system support.

--
Lew Pitcher
IT Consultant, Enterprise Application Architecture,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed are my own, not my employers')

Mike Wahler 03-01-2004 07:15 PM

Re: [OT] scan codes
 
"aman" <aman_coe@rediffmail.com> wrote in message
news:a06e0bcf.0403011040.56df6249@posting.google.c om...
> i know how to get scan codes and ascii codes for special keys.
> i can get ascii codes of alphabetic keys.
> how does one get scan codes of alphabetic keys??


You're asking about this in the wrong place. Here,
only ISO standard C is discussed. The C language
defines no concepts of 'keyboards', 'keys' 'scan codes',
or 'ascii codes', or any particular hardware devices
or their operation or behavior. All i/o is abstracted
as 'streams of characters'.

Try consulting support resources for your particular
platform and/or compiler package.

Purpose of comp.lang.c:
http://www.angelfire.com/ms3/bchambl...me_to_clc.html

-Mike




E. Robert Tisdale 03-01-2004 09:17 PM

Re: scan codes
 
aman wrote:

> I know how to get scan codes and ASCII codes for special keys.


How do you do that.

> I can get ASCII codes of alphabetic keys.


man ascii

> How does one get scan codes of alphabetic keys?


> getkeycodes

Plain scancodes xx (hex) versus keycodes (dec)
0 is an error; for 1-88 (0x01-0x58) scancode equals keycode

0x58: 88 124 125 126 127 0 0 0
0x60: 0 0 0 0 0 0 0 0
0x68: 0 0 0 0 0 122 0 123
0x70: 0 0 0 89 120 0 0 90
0x78: 91 92 93 94 95 124 121 0

Escaped scancodes e0 xx (hex)

e0 00: 0 0 0 0 0 0 0 0
e0 08: 0 0 0 0 0 0 0 0
e0 10: 0 0 0 0 0 0 0 0
e0 18: 0 0 0 0 96 97 0 0
e0 20: 0 0 0 0 0 0 0 0
e0 28: 0 0 0 0 0 0 0 0
e0 30: 0 0 0 0 0 98 0 99
e0 38: 100 0 0 0 0 113 114 115
e0 40: 116 117 0 0 0 0 101 102
e0 48: 103 104 0 105 124 106 118 107
e0 50: 108 109 110 111 0 0 0 0
e0 58: 0 0 0 125 126 127 0 0
e0 60: 0 0 0 0 0 0 0 0
e0 68: 0 0 0 0 0 0 0 112
e0 70: 0 0 0 0 0 0 0 0
e0 78: 0 0 0 0 0 0 0 0

> uname -mprsv

Linux 2.4.18-14smp #1 SMP Wed Sep 4 12:34:47 EDT 2002 i686 i686



All times are GMT. The time now is 02:00 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.