How to scan Keyboard in Perl or else on Linux ?

From: Raphaël (Raphael.Rochet_at_xilinx.com)
Date: 11/04/04

  • Next message: Måns Rullgård: "Re: How to scan Keyboard in Perl or else on Linux ?"
    Date: Thu, 04 Nov 2004 17:45:43 +0100
    
    

    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.


  • Next message: Måns Rullgård: "Re: How to scan Keyboard in Perl or else on Linux ?"

    Relevant Pages

    • How to scan Keyboard in Perl or else on Linux ?
      ... does somebody know how to get the keyboard status in Perl? ... -> I would like to write a Perl script which scan the keyboard and ... I would like keyboard_scanto return the code string of the CTRL key. ... containing the code of the SHIFT key and the code of the ALT key. ...
      (comp.lang.perl.misc)
    • How to scan Keyboard in Perl or else on Linux ?
      ... does somebody know how to get the keyboard status in Perl? ... -> I would like to write a Perl script which scan the keyboard and ... I would like keyboard_scanto return the code string of the CTRL key. ... containing the code of the SHIFT key and the code of the ALT key. ...
      (comp.lang.perl)
    • How to scan Keyboard in Perl or else on Linux ?
      ... does somebody know how to get the keyboard status in Perl? ... -> I would like to write a Perl script which scan the keyboard and ... I would like keyboard_scanto return the code string of the CTRL key. ... containing the code of the SHIFT key and the code of the ALT key. ...
      (comp.os.linux.development.system)
    • Re: Regarding reg. exp.
      ... I have a string and I need to parse that string to check whether it is ... in required format or not. ... I have mentioned in the Perl script that input should be in the ...
      (perl.beginners)
    • What could potentially be wrong in this script?
      ... I am writing a Perl script to check that dependency files exist that ... opening it, and then based on the type of file, saving a regex to ... foreach my $files ... The index call isn't working on this bizarre string. ...
      (comp.lang.perl.misc)