GIMX doesn't recognise xdotool events
Posted: Mon Jul 14, 2014 1:34 pm
Hi there,
I've built a bot which watches the screen and plays FF9's "100 nobles" minigame. Unfortunately, I can't get the bot to actually send a command through to GIMX...
I'm using xdotool to (try to) simulate keypresses, but GIMX is unaware of xdotool's presence as a virtual keyboard. I suspect this is because x-automation tools do not use /dev/input/eventN nodes. I modified GIMX/event/src/linux/events.c to print the devices it comes across - they're all physical:
xinput --list on the other hand shows the virtual device:
Given that this worked at some point (see http://gimx.fr/forum/viewtopic.php?f=5&t=247 ), I'm wondering if anybody knows either what's changed, or how I can alternatively supply keypresses to GIMX via xte / xdotool or something similar. I should note that I'm not running the release build - it was segfaulting for me, so I found a stable commit in dev. I'm currently on e5dbd10.
Any advice much appreciated, and thanks Matlo for an awesome tool.
Cheers
Ben
I've built a bot which watches the screen and plays FF9's "100 nobles" minigame. Unfortunately, I can't get the bot to actually send a command through to GIMX...
I'm using xdotool to (try to) simulate keypresses, but GIMX is unaware of xdotool's presence as a virtual keyboard. I suspect this is because x-automation tools do not use /dev/input/eventN nodes. I modified GIMX/event/src/linux/events.c to print the devices it comes across - they're all physical:
Code: Select all
14:17:23 [~/Installs/gimx-src/GIMX/core] ./emuclient --config default2.xml --status --nograb
option -c with value `default2.xml'
grab flag is unset
status flag is set
connected to emu 0
using default refresh period: 11.25ms
/dev/input/event0 Logitech USB Receiver
/dev/input/event1 Logitech USB Receiver
/dev/input/event2 Gaming Keyboard
/dev/input/event3 Gaming Keyboard
/dev/input/event4 G15 Keyboard G15 Keyboard
/dev/input/event5 Power Button
/dev/input/event6 Power Button
/dev/input/event7 PC Speaker
/dev/input/event8 HDA Intel Line Out Side
/dev/input/event9 HDA Intel Line Out CLFE
/dev/input/event10 HDA Intel Line Out Surround
/dev/input/event11 HDA Intel Line Out Front
/dev/input/event12 HDA Intel Line
/dev/input/event13 HDA Intel Front Mic
/dev/input/event14 HDA Intel Rear Mic
/dev/input/event15 HDA ATI HDMI HDMI/DP,pcm=3
Code: Select all
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=8 [slave pointer (2)]
⎜ ↳ Logitech USB Receiver id=9 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Power Button id=7 [slave keyboard (3)]
↳ Gaming Keyboard id=10 [slave keyboard (3)]
↳ Gaming Keyboard id=11 [slave keyboard (3)]
↳ G15 Keyboard G15 Keyboard id=12 [slave keyboard (3)]
Any advice much appreciated, and thanks Matlo for an awesome tool.
Cheers
Ben