Linux/X11 Keyboard interceptor
Posted on 2004-04-11
for some twisted reason, i need to write a program that locks any input from keyboard/mouse for other than my application.
I already tried, with limited success, with SDL WM_GrabInput, but that does not grab key combinations like CTRL+ALT+BACKSPACE or CTRL+ALT+F2.
What i need is advice, and possibly C (im programming in FPC for this) code to accomplish a total lockout from the keyboard, in order to prevent X shutdown, or console switching.
I dont expect answers or comments like "use XDM" or "disable the TTYs and run in X runlevel", since that's not what im looking for (actually might be the worst case scenario if there's no other solution to my problem".