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?