.\" Generated by scdoc 1.11.3 .\" Complete documentation for this program is not available as a GNU info page .ie \n(.g .ds Aq \(aq .el .ds Aq ' .nh .ad l .\" Begin generated content: .TH "YDOTOOL" "1" "2024-07-14" .SH NAME .PP ydotool - command-line \fI/dev/uinput\fR automation tool .PP .SH SYNOPSIS .PP \fBydotool\fR \fBcmd\fR \fIargs\fR .PP \fBydotool\fR \fBcmd\fR --help .PP .SH DESCRIPTION .PP \fBydotool\fR lets you programmatically (or manually) simulate keyboard input and mouse activity, etc.\& The \fBydotoold\fR(8) daemon must be running.\& .PP .PP Currently implemented command(s): .PP \fBtype\fR .RS 4 Type a string .RE \fBkey\fR .RS 4 Press keys .RE \fBmousemove\fR .RS 4 Move mouse pointer to absolute position .RE \fBclick\fR .RS 4 Click on mouse buttons .PP .RE .SH KEYBOARD COMMANDS \fBkey\fR [\fB-d\fR,\fB--key-delay\fR \fI\fR] [\fI\fR .\&.\&.\&] .PP .RS 4 Type a given keycode.\& .PP e.\&g.\& 28:1 28:0 means pressing on the Enter button on a standard US keyboard.\& (where :1 for pressed means the key is down and then :0 means the key is released) .PP 42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0 - "LOL" .PP Non-interpretable values, such as 0, aaa, l0l, will only cause a delay.\& .PP See `/usr/include/linux/input-event-codes.\&h'\& for available key codes (KEY_*).\& .PP You can find the key name/number your keyboard is sending to libinput by running `sudo libinput record` and then selecting your keyboard from the list it will show you the libinput proper key name and number for each key you press.\& .PP Options: \fB-d\fR,\fB--key-delay\fR \fI\fR .RS 4 Delay time between keystrokes.\& Default 12ms.\& .PP .RE .RE \fBtype\fR [\fB-D\fR,\fB--next-delay\fR \fI\fR] [\fB-d\fR,\fB--key-delay\fR \fI\fR] [\fB-f\fR,\fB--file\fR \fI\fR] "\fItext\fR" .PP .RS 4 Types text as if you had typed it on the keyboard.\& .PP Options: .PP \fB-d\fR,\fB--key-delay\fR \fI\fR .RS 4 Delay time between key events (up/down each).\& Default 12ms.\& .PP .RE \fB-D\fR,\fB--next-delay\fR \fI\fR .RS 4 Delay between strings.\& Default 0ms.\& .PP .RE \fB-f\fR,\fB--file\fR \fI\fR .RS 4 Specify a file, the contents of which will be typed as if passed as an argument.\& The filepath may also be '\&-'\& to read from stdin.\& .PP .RE Example: to type '\&Hello world!\&'\& you would do: .RS 4 ydotool type '\&Hello world!\&'\& .PP .RE .RE .SH MOUSE COMMANDS .PP \fBmousemove\fR [\fB-a\fR,\fB--absolute\fR] \fI \fR .RS 4 Move the mouse to the relative X and Y coordinates on the screen.\& .PP Options: \fB--absolute\fR .RS 4 Use absolute position .PP .RE Example: to move the cursor to absolute coordinates (100,100): .RS 4 ydotool mousemove --absolute 100 100 .PP .RE .RE \fBclick\fR [\fB-d\fR,\fB--next-delay\fR \fI\fR] [\fB-r\fR,\fB--repeat\fR \fIN\fR ] [\fIbutton\fR .\&.\&.\&] .RS 4 Send a click.\& .PP Options: \fB-d\fR,\fB--next-delay\fR \fI\fR .RS 4 Delay between input events (up/down, a compete click means doubled time).\& Default 25ms.\& .PP .RE \fB-r\fR,\fB--repeat\fR \fIN\fR .RS 4 Repeat entire sequence N times .PP .RE all mouse buttons are represented using hexadecimal numeric values, with an optional bit mask to specify if mouse up/down needs to be omitted.\& .PP .PD 0 .IP \(bu 4 0x00 - LEFT .IP \(bu 4 0x01 - RIGHT .IP \(bu 4 0x02 - MIDDLE .IP \(bu 4 0x03 - SIDE .IP \(bu 4 0x04 - EXTR .IP \(bu 4 0x05 - FORWARD .IP \(bu 4 0x06 - BACK .IP \(bu 4 0x07 - TASK .IP \(bu 4 0x40 - Mouse down .IP \(bu 4 0x80 - Mouse up .RE .RS 4 .PD .RE Examples: .PP .RS 4 .PD 0 .IP \(bu 4 0x00: chooses left button, but does nothing (you can use this to implement extra sleeps) .IP \(bu 4 0xC0: left button click (down then up) .IP \(bu 4 0x41: right button down .IP \(bu 4 0x82: middle button up .PD .PP The '\&0x'\& prefix can be omitted if you want.\& .PP .RE .SH YDOTOOL SOCKET .PP The socket to write to for \fBydotoold\fR(8) can be changed by the environment variable YDOTOOL_SOCKET.\& .PP .SH AUTHOR .PP ydotool was written by ReimuNotMoe.\& .PP This manpage was written by bob.\&hepple@gmail.\&com but updated since.\& .PP .SH LICENCE AGPLv3 .PP .SH SEE ALSO .PP \fBydotoold\fR(8) .PP Project site: