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

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

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

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. Rithesh Pai

    How to Scan for files from drive

    Rithesh Pai, Aug 18, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    522
    Metallikanz!
    Aug 18, 2005
  2. Yves Tchapda

    Boundary scan clocking

    Yves Tchapda, Sep 17, 2003, in forum: VHDL
    Replies:
    0
    Views:
    686
    Yves Tchapda
    Sep 17, 2003
  3. Scott Connors
    Replies:
    4
    Views:
    1,109
    Pete Fraser
    Nov 5, 2003
  4. =?ISO-8859-1?Q?Rapha=EBl?=

    How to scan Keyboard in Perl or else on Linux ?

    =?ISO-8859-1?Q?Rapha=EBl?=, Nov 4, 2004, in forum: Perl
    Replies:
    2
    Views:
    1,043
    =?ISO-8859-1?Q?Rapha=EBl?=
    Nov 9, 2004
  5. Greg  --
    Replies:
    4
    Views:
    2,816
  6. Michael Bendzick

    Reading Keyboard Scan Codes

    Michael Bendzick, Jul 23, 2003, in forum: Python
    Replies:
    2
    Views:
    1,673
    Alan Gauld
    Jul 24, 2003
  7. Replies:
    2
    Views:
    3,545
    Malcolm
    Aug 20, 2005
  8. Allen
    Replies:
    1
    Views:
    822
    Mark Rae [MVP]
    Dec 3, 2007
Loading...