Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Reading scancodes under Linux

Reply
Thread Tools

Reading scancodes under Linux

 
 
Mikkel Holm Olsen
Guest
Posts: n/a
 
      12-25-2003
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.

 
Reply With Quote
 
 
 
 
nobull@mail.com
Guest
Posts: n/a
 
      12-28-2003
Mikkel Holm Olsen <(E-Mail Removed)> wrote in message news:<3feb4626$0$29335$(E-Mail Removed). dk>...
> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
report on building of python 2.5.2 under msys under wine on linux. Luke Kenneth Casson Leighton Python 0 01-15-2009 09:48 PM
Reading keystrokes using Java under Linux terminals? Ivan_G_S Java 3 08-25-2008 01:32 PM
getting scancodes andmarti@gmail.com Python 10 04-25-2007 09:02 PM
help : my jar file is not running under linux terminal , but it runs under JbuilderX ide bronby Java 1 07-15-2005 07:23 AM
Java application developped under Linux running ridiculously slow under Windows hshdude Java 12 11-04-2004 05:49 PM



Advertisments