Reading scancodes under Linux

M

Mikkel Holm Olsen

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

nobull

Mikkel Holm Olsen said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top