?
=?ISO-8859-1?Q?Rapha=EBl?=
Hi,
On Linux, does somebody know how to get the keyboard status in Perl ?
I explane :
-> I would like to write a Perl script which scan the keyboard and
return the list of pressed keys.
For example, let "keyboard_scan()" be the name of this function, with
the following behavior:
- When keyboard_scan() is called, if the user is pressing no keys, I
would like keyboard_scan() to return the empty string "".
- When keyboard_scan() is called, if the user is pressing the CTRL key,
I would like keyboard_scan() to return the code string of the CTRL key.
- When keyboard_scan() is called, if the user is pressing the ALT key
and the SHIFT key, I would like the function to return the string
containing the code of the SHIFT key and the code of the ALT key.
etc ...
Or perhaps somebody knows how to do it in another language (C, TCL, ...) ?
Thanks !
Raphaël.
On Linux, does somebody know how to get the keyboard status in Perl ?
I explane :
-> I would like to write a Perl script which scan the keyboard and
return the list of pressed keys.
For example, let "keyboard_scan()" be the name of this function, with
the following behavior:
- When keyboard_scan() is called, if the user is pressing no keys, I
would like keyboard_scan() to return the empty string "".
- When keyboard_scan() is called, if the user is pressing the CTRL key,
I would like keyboard_scan() to return the code string of the CTRL key.
- When keyboard_scan() is called, if the user is pressing the ALT key
and the SHIFT key, I would like the function to return the string
containing the code of the SHIFT key and the code of the ALT key.
etc ...
Or perhaps somebody knows how to do it in another language (C, TCL, ...) ?
Thanks !
Raphaël.