469,579 Members | 1,085 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Reading scancodes under Linux

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.

Jul 19 '05 #1
1 3236
Mikkel Holm Olsen <mo*@symlink.dk> wrote in message news:<3f***********************@dread15.news.tele. 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.
Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Kevin T. Ryan | last post: by
3 posts views Thread by LIN | last post: by
6 posts views Thread by David M | last post: by
6 posts views Thread by paultawk | last post: by
10 posts views Thread by andmarti | last post: by
9 posts views Thread by Hal Vaughan | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.