Emulating a key press
Hello!
I need a program which emulates a key press, which has to be captured by the foreground application (like virtual keyboards do). Is this easy to implement? I thought that it's just a matter of writing to a /dev/something file, but I'm not sure whether this can be done or whether such a device file exists. Any help is appreciated! Thanks! |
For a command-line solution, try xvkbd with the -xsendevent flag. You can set up a '-text' event to send keypress combinations.
'xvkbd -xsendevent -text "\Ca"' should send a control+a combination to the focused window. There are also gui options such as the kde 'input actions' if you want to set up mouse gestures or custom hotkey combos, or something like that. |
All times are GMT -5. The time now is 04:44 AM. |