I am trying to send keystrokes via
xdotool. However, sending does not work properly.
Below is the log of a script that should select all the text in Gedit and copy it (but it does nothing instead), along with its output (captured by redirecting both stdout and stderr):
+ xdotool getwindowname 29360262 *Unsaved Document 1 - gedit + xdotool key --window 29360262 ctrl+a + sleep 1 + xdotool key --window 29360262 ctrl+c + sleep 1
I have tried with Thunderbird, and the script does send the keys, but without modifiers (no
Control, that is). By the way, in the script, keys are surrounded by
The difference between Gedit and Thunderbird may be that Gedit is a GTK3 application, whilst Thunderbird seems a GTK2 application (but Firefox, which seems a GTK3 application, behaves like Thunderbird).
xdotool version 3.20141006.1
Operating System: Debian GNU/Linux 8.1 (Linux kernel 3.16.0-4-amd64)
Desktop Manager: GNOME Shell 3.14.4
xbindkeysthen you have to release the keys that trigger your script by
xdotool keyup ...for reliable operation