Questions tagged [xdotool]

fake keyboard/mouse input, window management, and more

www.semicomplete.com/projects/xdotool:

This tool lets you simulate keyboard input and mouse activity, move and resize windows, etc. It does this using X11's XTEST extension and other Xlib functions.

Additionally, you can search for windows and move, resize, hide, and modify window properties like the title. If your window manager supports it, you can use xdotool to switch desktops, move windows between desktops, and change the number of desktops.

165 questions
5
votes
1 answer

Sending Keystrokes to a X Window

I am currently experimenting with xdotool to send keys to a process (I understand that it may not work for all processes that does not set _NET_WM_PID). I have trouble sending keystrokes to windows other from the focus. It does work if you are…
swtdrgn
  • 1,154
  • 4
  • 17
  • 49
4
votes
1 answer

What is the name of the POS1 key in xdotool?

I need xdotool to press pos1, but I don't know the name of this key. It's not pos1, POS1, Pos1, Beginning. How can I find the name of the key which is used by xdotool?
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
4
votes
3 answers

How to Switch Focus to a Gnome Terminal Tab via Script or Shell Command

I am currently writing a script to open several tabs in gnome-terminal, and set their titles. I can open multiple tabs, but I need to change focus to those tabs (programatically) in order to set their titles from my script. I use zsh and bash…
Todd
  • 2,824
  • 2
  • 29
  • 39
4
votes
1 answer

encoding of period in text output

I am trying to output this xdotool type '172.06' into a textbox, but it enters 17206. Is there something wrong with the encoding? Why would it enter the period last? Note that when I run this in terminal it works perfectly. I found a google group…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
4
votes
2 answers

xdotool mousemove won't work on ubuntu vmware vm

I installed xdotool on ubuntu 15.10 on a vmware fusion vm on a mac. I tried running the following commands in the terminal. >xdotool returns the list of commands. >xdotool mousemove 200 200 does not move the mouse, it should move it. >xdotool…
user873477
  • 87
  • 2
  • 8
4
votes
1 answer

xdotool - Why sleep before running commands?

I'm using xdotool to automate running commands, opening new tabs, etc. The thing is when doing it on the current window, I've to specifically sleep for some time or use xdotool keyup Return before doing anything or else xdotool won't press the enter…
Kartik Anand
  • 4,513
  • 5
  • 41
  • 72
4
votes
2 answers

Undefined References After Linking Against Static Library

I wrote a simple program to test if xdotool can fulfill my requirements. (Well, not really. My first step is to make sure if I can make calls into the xdotool library.) #include #include using namespace std; int main(){ cout…
swtdrgn
  • 1,154
  • 4
  • 17
  • 49
3
votes
1 answer

Error: Can't open display: (null) Failed creating new xdo instance on mac OS

I looked at many answers on internet but no solutions helped. When I just do open http://google.com it works, my default browser is Google Chrome. I downloaded xdotool package via brew What I want to do is, to open the webpage(any webpage) and…
C.J
  • 169
  • 1
  • 12
3
votes
1 answer

key+mouse click simultaneous (xdotool)

Is it possible to simulate a keystroke ("N") and a mouse click simultaneous in linux? I use xdotool on fedora linux distro I didn't find nothing related to this possibility Later Edit : I found the following workaround. I post it as someone might…
Laurentiu B
  • 33
  • 1
  • 6
3
votes
1 answer

Map key sequence of more than two keys

I have created and script that uses xdotool to open new tabs in specific firefox containers. I need to map three keys, for instance ctrl+y+p to open a personal container, ctrl+y+b to open the banking container and so on. I cannot find a tool that…
letFunny
  • 31
  • 5
3
votes
1 answer

Xdotool Fails On Raspberry Pi

I'm running retropie on my Raspberry Pi, and I want to figure out a way to use the GPIO to simulate keystrokes. Xdotool seems like my best bet, but it doesn't work locally or over ssh. When I enter xdotool key 'd' I get the error: Error: Can't open…
Minecat40
  • 41
  • 1
  • 5
3
votes
1 answer

BASH XDOTool Mouse click, repeat and stop

I am trying to integrate a simple infinite click script using XDOToool with another piece of script to detect keyboard input; to end the running clicking script when a key is pressed but unsure how to match them up. This script runs infinitely…
3
votes
1 answer

Activities Overview not closing with xbindkeys

I have a shiny new mouse with which I'm trying to map a keypress to a mouse button. Specifically, I want a mouseclick to open and close the activities overview in Gnome 3. When I press the Left Super key, the overview opens. When I press it again,…
gnew
  • 43
  • 3
2
votes
0 answers

xdotool key does not work in any other terminal except the one it's run in

I'm trying to write a short bash script that opens some gnome-terminals and runs a program and issues keystrokes to them. Got parts 1 & 2 done and working. I am trying to use xdotool to do part three, sending keystrokes to those terminals. At this…
Adam Mills
  • 21
  • 4
2
votes
0 answers

Why xdotool's window position and geometry don't add up to the total size of the display?

I'm trying to get a program to automatically crop a screenshot of the display to the correct size of the visible window. Using this command to get the size and the position of the window: $ xdotool getwindowfocus getwindowgeometry Window 104857603 …
Gustavo
  • 668
  • 13
  • 24
1
2
3
10 11