Reading scancodes under Linux

From: Mikkel Holm Olsen (mol_at_symlink.dk)
Date: 12/25/03


Date: Thu, 25 Dec 2003 21:17:50 +0100

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.


Relevant Pages

  • Back ground execution pauses
    ... What causes some scripts (such as the POPFile Beysean filter written in ... Perl) to require an ENTER keypress when run in the background? ...
    (Debian-User)
  • Re: Reading scancodes under Linux
    ... > Linux-console from Perl? ... > have it running in a virtual console (xterm) as well for debugging. ... This has nothing to do with Perl, but the "scancodes" (keyboard ...
    (comp.lang.perl)