![]() |
Best way to send keycodes - emulate keyboard press
Hi Guys!
Has anybody a idea how to send a keycode from my application in the background to the acutally running application in the foreground? I would prefer a way that works similar at Maemo5 and MeeGo Tablet / Handset. It should feel for the target application like a normal hardware keyboard press. What is the mostly common linux way to do this? |
Re: Best way to send keycodes - emulate keyboard press
Quote:
|
Re: Best way to send keycodes - emulate keyboard press
|
Re: Best way to send keycodes - emulate keyboard press
No one? :(
|
Re: Best way to send keycodes - emulate keyboard press
Quote:
Maybe on that kumatux site? At worst just get the debian armel package and extract the binary strait out of it. |
Re: Best way to send keycodes - emulate keyboard press
Quote:
Sadly, it seems, it supports exactly as xte only strings. So I have to translate from the keycode to the string and call the shell command afterwards. It works but feels very ugly, is very slow and resource hungry. I found this piece of code: Code:
#include <X11/extensions/XTest.h>I guess my C++ skills are still to weak. (learing since several months) Am I able to include this and XTestFakeKeyEvent in my Qt Project without bending over backwards? At MeeGo there is a elegant way to send keycodes using DBus: maliit.org But it seems this works only on MeeGo, not Fremantle maemo5. :( |
Re: Best way to send keycodes - emulate keyboard press
Whats the difference to the non-extension XSendEvent?
|
Re: Best way to send keycodes - emulate keyboard press
I compiled xdotool before for the N900 - not .deb packaged let alone in the repositories, but I made a thread about it. (It does exactly what you want, if you're okay with doing it through the command line or having your app do it through the command line.)
Look under my account's statistics, all threads posted by me. It's called "[Announce] xdotool" or something like that. |
Re: Best way to send keycodes - emulate keyboard press
Quote:
My small application works now. Not perfect, but rudimentary. Glad to see that I got my idea working. Will try to package your bin into my package. But I'm still searching for a better solution that accepts keycodes directly and not thru Characters. Preferential without using the commandline. Many combinations are still not working and I expect many language settings related problems in the near future... Will create a new Thread as soon as I have the packaging done. :) |
Re: Best way to send keycodes - emulate keyboard press
Quote:
|
| All times are GMT. The time now is 21:26. |
vBulletin® Version 3.8.8