Reading scancodes under Linux

Discussion in 'Perl' started by Mikkel Holm Olsen, Dec 25, 2003.

  1. Hello everyone,

    Does someone know of a way to handle both keypress and release in a
    Linux-console (not X) from Perl? It seems this is the only way I'll be
    able to have keyboard-repeat for some keys, but not for others, or does
    anyone have other ideas.

    I have done this before in C with:
    ioctl(0,KDSKBMODE,K_MEDIUMRAW);

    Seems a bit complicated to do the same thing with the perl-ioctl. Also
    this will only run on the true terminals. It would be nice to be able to
    have it running in a virtual console (xterm) as well for debugging.

    Regards,
    --
    Mikkel Holm Olsen
    AKA Spaceman Spiff
    Denmark

    Alcohol & calculus don't mix. Never drink & derive.
     
    Mikkel Holm Olsen, Dec 25, 2003
    #1
    1. Advertising

  2. Mikkel Holm Olsen

    Guest

    Mikkel Holm Olsen <> wrote in message news:<3feb4626$0$29335$>...
    > Hello everyone,
    >
    > Does someone know of a way to handle both keypress and release in a
    > Linux-console (not X) from Perl? It seems this is the only way I'll be
    > able to have keyboard-repeat for some keys, but not for others, or does
    > anyone have other ideas.


    I think this is one of those situations where the world is trying to
    tell you something. If what you want is hard to get perhaps you are
    wanting something inappropriate.

    > I have done this before in C with:
    > ioctl(0,KDSKBMODE,K_MEDIUMRAW);
    >
    > Seems a bit complicated to do the same thing with the perl-ioctl.


    How so? Should be essentially the same.

    > Also
    > this will only run on the true terminals. It would be nice to be able to
    > have it running in a virtual console (xterm) as well for debugging.


    This has nothing to do with Perl, but the "scancodes" (keyboard
    events) that X sends to xterm are probably completely different from
    the ones that the keyboard hardware sends.

    This newsgroup does not exist (see FAQ). Please do not start threads
    here.
     
    , Dec 28, 2003
    #2
    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. hshdude
    Replies:
    12
    Views:
    1,103
    Dimitri Maziuk
    Nov 4, 2004
  2. bronby
    Replies:
    1
    Views:
    652
    Andrew Thompson
    Jul 15, 2005
  3. getting scancodes

    , Apr 24, 2007, in forum: Python
    Replies:
    10
    Views:
    605
    faulkner
    Apr 25, 2007
  4. Ivan_G_S
    Replies:
    3
    Views:
    999
    David Zimmerman
    Aug 25, 2008
  5. Luke Kenneth Casson Leighton
    Replies:
    0
    Views:
    380
    Luke Kenneth Casson Leighton
    Jan 15, 2009
Loading...

Share This Page