You are not logged in.
Hi,
I am using xmonad as a window manager and I'm trying to use xdotool to open a new browser tab in either Firefox or Chromium. For some reason I cannot get this working. I know I am selecting the window properly because I can type arbitrary characters into the window, or reload the page using F5 for example. It seems like whenever I try to use the cntrl key the key is not registering in the Window. I feel like I must be doing something stupid. This command works fine to reload the page
xdotool search --onlyvisible --class "firefox" windowfocus key 'F5'
Although neither of these (or similar permutations) do:
xdotool search --onlyvisible --class "firefox" windowfocus key 'ctrl+t'
xdotool search --onlyvisible --class "firefox" windowfocus key --delay=1000 'ctrl+t'
xdotool search --onlyvisible --class "firefox" windowfocus key --clearmodifiers --delay=1000 't'
xdotool search --onlyvisible --class "firefox" windowfocus key 'Control_L+t'
Am I missing something? I would appreciate it if somebody could help me with this.
Dan
Last edited by dsulli99 (2015-12-24 13:28:33)
Offline
Looks like a timing issue.
sleep 3 && xdotool key Ctrl+t...giving you time to focus the firefox window, works. Also:
xdotool search --onlyvisible --class "firefox" windowfocus && xdotool key Ctrl+t...works.
Offline
Indeed it does work. Thank you. :-)
Dan
Offline