1YDOTOOL(1)                  General Commands Manual                 YDOTOOL(1)
2
3
4

NAME

6       ydotool - command-line /dev/uinput automation tool
7

SYNOPSIS

9       ydotool cmd args
10
11       ydotool cmd --help
12

DESCRIPTION

14       ydotool lets you programmatically (or manually) simulate keyboard input
15       and mouse activity, etc. The ydotoold(8) daemon must be running.
16
17       Currently implemented command(s):
18
19       type
20           Type a string
21       key
22           Press keys
23       mousemove
24           Move mouse pointer to absolute position
25       click
26           Click on mouse buttons
27

KEYBOARD COMMANDS

29       key [-d,--key-delay <ms>] [<KEYCODE:PRESSED> ...]
30
31           Type a given keycode.
32
33           e.g. 28:1 28:0 means pressing on the Enter button on a standard US
34           keyboard. (where :1 for pressed means the key is down and then :0
35           means the key is released)
36
37           42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0 - "LOL"
38
39           Non-interpretable values, such as 0, aaa, l0l, will only cause a
40           delay.
41
42           See `/usr/include/linux/input-event-codes.h' for available key
43           codes (KEY_*).
44
45           You can find the key name/number your keyboard is sending to libin‐
46           put by running `sudo libinput record` and then selecting your key‐
47           board from the list it will show you the libinput proper key name
48           and number for each key you press.
49
50           Options: -d,--key-delay <ms>
51               Delay time between keystrokes. Default 12ms.
52
53       type [-D,--next-delay <ms>] [-d,--key-delay <ms>] [-f,--file
54       <filepath>] "text"
55
56           Types text as if you had typed it on the keyboard.
57
58           Options:
59
60           -d,--key-delay <ms>
61               Delay time between key events (up/down each). Default 12ms.
62
63           -D,--next-delay <ms>
64               Delay between strings. Default 0ms.
65
66           -f,--file <filepath>
67               Specify a file, the contents of which will be typed as if
68               passed as an argument. The filepath may also be '-' to read
69               from stdin.
70
71           Example: to type 'Hello world!' you would do:
72               ydotool type 'Hello world!'
73

MOUSE COMMANDS

75       mousemove [-a,--absolute] <x> <y>
76           Move the mouse to the relative X and Y coordinates on the screen.
77
78           Options: --absolute
79               Use absolute position
80
81           Example: to move the cursor to absolute coordinates (100,100):
82               ydotool mousemove --absolute 100 100
83
84       click [-d,--next-delay <ms>] [-r,--repeat N ] [button ...]
85           Send a click.
86
87           Options: -d,--next-delay <ms>
88               Delay between input events (up/down, a compete click means dou‐
89               bled time). Default 25ms.
90
91           -r,--repeat N
92               Repeat entire sequence N times
93
94           all mouse buttons are represented using hexadecimal numeric values,
95           with an optional bit mask to specify if mouse up/down needs to be
96           omitted.
97
98           •   0x00 - LEFT
99           •   0x01 - RIGHT
100           •   0x02 - MIDDLE
101           •   0x03 - SIDE
102           •   0x04 - EXTR
103           •   0x05 - FORWARD
104           •   0x06 - BACK
105           •   0x07 - TASK
106           •   0x40 - Mouse down
107           •   0x80 - Mouse up
108
109
110       Examples:
111
112           •   0x00: chooses left button, but does nothing (you can use this
113               to implement extra sleeps)
114           •   0xC0: left button click (down then up)
115           •   0x41: right button down
116           •   0x82: middle button up
117
118
119           The '0x' prefix can be omitted if you want.
120

YDOTOOL SOCKET

122       The socket to write to for ydotoold(8) can be changed by the environ‐
123       ment variable YDOTOOL_SOCKET.
124

AUTHOR

126       ydotool was written by ReimuNotMoe.
127
128       This manpage was written by bob.hepple@gmail.com but updated since.
129

LICENCE

131       AGPLv3
132

SEE ALSO

134       ydotoold(8)
135
136       Project site: <https://github.com/ReimuNotMoe/ydotool>
137
138
139
140                                  2023-07-22                        YDOTOOL(1)
Impressum