scan codes

Discussion in 'C Programming' started by aman, Mar 1, 2004.

  1. aman

    aman Guest

    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??
     
    aman, Mar 1, 2004
    #1
    1. Advertising

  2. aman

    Lew Pitcher Guest

    On 1 Mar 2004 10:40:27 -0800, (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')
     
    Lew Pitcher, Mar 1, 2004
    #2
    1. Advertising

  3. aman

    Mike Wahler Guest

    Re: [OT] scan codes

    "aman" <> wrote in message
    news:...
    > 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/bchambless0/welcome_to_clc.html

    -Mike
     
    Mike Wahler, Mar 1, 2004
    #3
  4. 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
     
    E. Robert Tisdale, Mar 1, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Greg  --
    Replies:
    4
    Views:
    2,171
  2. Michael Bendzick

    Reading Keyboard Scan Codes

    Michael Bendzick, Jul 23, 2003, in forum: Python
    Replies:
    2
    Views:
    1,339
    Alan Gauld
    Jul 24, 2003
  3. Bjorn Pettersen

    RE: Reading Keyboard Scan Codes

    Bjorn Pettersen, Jul 23, 2003, in forum: Python
    Replies:
    0
    Views:
    535
    Bjorn Pettersen
    Jul 23, 2003
  4. Francois Pinard

    Re: Reading Keyboard Scan Codes

    Francois Pinard, Jul 24, 2003, in forum: Python
    Replies:
    0
    Views:
    506
    Francois Pinard
    Jul 24, 2003
  5. Replies:
    2
    Views:
    2,845
    Malcolm
    Aug 20, 2005
Loading...

Share This Page