Open GoogleCodeExporter opened 9 years ago
[deleted comment]
If xdotool search is indeed finding the correct window, then it is likely your
system update included a change to your Terminal application (or a UI library)
which now ignores X11 window events that are synthetic (originate via
XSendEvent). The xdotool manpage explains this a bit under the 'SENDEVENT
NOTES' section.
If this is the case (ignoring events), there isn't much we can do. You can
sometimes monkeypatch XNextEvent to hack send_event to false, but that requires
your application use libX11 (not libxcb or any other interface).
Sorry for this confusion.
Original comment by j...@semicomplete.com
on 28 May 2014 at 2:42
I thought about that, but if that would be the case, why does it work if the
keystroke is executed on the active window? I think that is also a synthetic
keystroke and shouldn't work either. However, if someone else runs into this
problem, here is the script I use as a workaround:
#! /bin/bash
l=$(xdotool getactivewindow)
xdotool search "THE_NAME_OF_THE_TARGET_WINDOW" windowactivate
xdotool key THE_KEY_YOU_WANT_TO_SEND
xdotool windowactivate $l
Original comment by kohli.al...@gmail.com
on 2 Jun 2014 at 11:05
EDIT: There might be a a delay needed sometimes. Add this after the second
command:
sleep 0.1
Original comment by kohli.al...@gmail.com
on 2 Jun 2014 at 11:11
Original issue reported on code.google.com by
kohli.al...@gmail.com
on 27 May 2014 at 11:04