Find the answer to your Linux question:
Results 1 to 3 of 3
So how can I get all keyboard events (press/release) from all windows no matter which window has the focus ?...
  1. #1
    RLg
    RLg is offline
    Just Joined!
    Join Date
    Dec 2009
    Posts
    3

    keyboard events

    So how can I get all keyboard events (press/release) from all windows no matter which window has the focus ?

  2. #2
    Linux Newbie
    Join Date
    Nov 2007
    Location
    Planet Earth
    Posts
    152
    Depends on your desktop manager, there are options to assings scripts (on any language) to global shortcuts (at least in KDE is pretty easy, event mouse gestures) ... buf if you want something like a keylogger, there are options such as LKL (Linux key logger)
    EOF

  3. #3
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    The only sure way is to intercept all keyboard input. The best way to do that is via a kernel module. You can log the keyboard events and then pass them on to the normal keyboard handler. As mentioned by hugotega, the Linux key logger (LKL) might do something like that. I haven't investigated this issue in Linux as yet, so I cannot say with authority what is the best method to use. There could well be a user-space API that will allow a user application to be informed of keyboard events, but I'm not familiar with it, if it exists.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...