Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've made a hardware keylogger for PS/2 (it is connected between keyboard and PC) and it's storing keystrokes directly as keyboard is sending signals. When device dumps data to the computer, everything goes exactly the same as normal keyboard. I'd like to write an application which saves the dump. When user types only text, there's no problem - I can open any text editor and everything's saved there. The problem is when user types key combinations like ALT+TAB, CTRL+F1 , CTRL+A and similar.

My question is - how to pass the keyboard keystrokes directly to file ignoring X?

share|improve this question
up vote 1 down vote accepted

You should be able to use the input-events command (on debian from the input-utils package), alternatively you can use xev to see all x-events.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.