Enhanced Keyboard Driver
Hi all,
Would it be feasable to modify the current keyboard driver in such a way that it would log the last 1000 keystrokes pushed (possibly log it somewhere in /proc or something)? When I say keystrokes, I mean everything...even the ctrl and alt and shift bit keys
Something like this would greatly simplify the program I am attempting to make.
Thanks
Alan
Quoted 5 lines · Alan Bryan
Would it be feasable to modify the current keyboard driver in such a way that it would log the last 1000 keystrokes pushed (possibly log it somewhere in /proc or something)? When I say keystrokes, I mean everything...even the ctrl and alt and shift bit keys
That's simple if you do it in a hackish way, but maybe a bit different to what you think. You'd extend the struct atkbd to contain a 1000 entry array and in rolling index. Then stuff your current keypress into the array and you're done.
You'd need to hack in the proc interface, though.
Quoted 2 lines
Something like this would greatly simplify the program I am attempting to make.
What do you actually want to do?
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 3 lines
What do you actually want to do?
specifically, I am trying to write a program similar to the old Sidekick program of the DOS days. A "daemon", if you will, that will popup on the screen when a predetermined series of keystrokes are hit. The program will then do various things, like record/play macros, calculator, calendar, programmer's guide, etc etc...
The part I'm having trouble with though is having it popup when predetermined keystrokes are pushed. I don't think Linux has a way to hook into the keyboard (if I'm wrong, someone please tell me).
Alan
Quoted 10 lines · Alan Bryan
Quoted 3 lines
What do you actually want to do?
specifically, I am trying to write a program similar to the old Sidekick program of the DOS days. A "daemon", if you will, that will popup on the screen when a predetermined series of keystrokes are hit. The program will then do various things, like record/play macros, calculator, calendar, programmer's guide, etc etc...
Then a keyboard driver isn't the good solution. You'd better write a userspace app which uses the XTEST extension.
Xav
Quoted 10 lines · Alan Bryan
Quoted 3 lines
What do you actually want to do?
specifically, I am trying to write a program similar to the old Sidekick program of the DOS days. A "daemon", if you will, that will popup on the screen when a predetermined series of keystrokes are hit. The program will then do various things, like record/play macros, calculator, calendar, programmer's guide, etc etc...
why not just use screen? or emacs as your shell?
Quoted 13 lines
The part I'm having trouble with though is having it popup when predetermined keystrokes are pushed. I don't think Linux has a way to hook into the keyboard (if I'm wrong, someone please tell me).
Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
-------------------------------------------------------------------------- Joel Jaeggli Unix Consulting [email protected] GPG Key Fingerprint: 5C6E 0104 BAF0 40B0 5BD3 C38B F000 35AB B67F 56B2
Quoted 6 lines · Alan Bryan
Quoted 1 line
What do you actually want to do?
The part I'm having trouble with though is having it popup when predetermined keystrokes are pushed. I don't think Linux has a way to hook into the keyboard (if I'm wrong, someone please tell me).
Well, this sounds more like a userspace problem. Write a small app that select()s on /dev/input/event* and get the keystrokes from there. From there, you'd even start applikations. That's a lot more complicated to achieve in kernel space :-)
MfG, JBG
Signature · 4 lines
Jan-Benedict Glaw [email protected] . +49-172-7608481 _ O _ "Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
Quoted 11 lines · Alan Bryan
Quoted 3 lines
What do you actually want to do?
specifically, I am trying to write a program similar to the old Sidekick program of the DOS days. A "daemon", if you will, that will popup on the screen when a predetermined series of keystrokes are hit. The program will then do various things, like record/play macros, calculator, calendar, programmer's guide, etc etc...
Quoted 5 lines
The part I'm having trouble with though is having it popup when predetermined keystrokes are pushed. I don't think Linux has a way to hook into the keyboard (if I'm wrong, someone please tell me).
Well, I don't think you want to tap into the kernel driver for that. I mean if one uses X over the network I would assume that the popup driver will run on the remote box while keyboard is on my local box.
The daemon is for X environment, right? You need to work with X server, not kernel.
Signature · 1 line
Dmitry
Hi Alan,
Quoted 10 lines · Alan Bryan
Hi all,
Would it be feasable to modify the current keyboard driver in such a way that it would log the last 1000 keystrokes pushed (possibly log it somewhere in /proc or something)? When I say keystrokes, I mean everything...even the ctrl and alt and shift bit keysSomething like this would greatly simplify the program I am attempting to make.
What kind of information that you need is missing if you just read input events from /dev/input/eventX?
Signature · 1 line
Dmitry