summaryrefslogtreecommitdiffstats
path: root/accessibility/ydotool/ydotool.1
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/ydotool/ydotool.1')
-rw-r--r--accessibility/ydotool/ydotool.1315
1 files changed, 156 insertions, 159 deletions
diff --git a/accessibility/ydotool/ydotool.1 b/accessibility/ydotool/ydotool.1
index a6dd2fc30a..56b55cb976 100644
--- a/accessibility/ydotool/ydotool.1
+++ b/accessibility/ydotool/ydotool.1
@@ -1,25 +1,26 @@
-.\" Generated by scdoc 1.11.1
+.\" Generated by scdoc 1.11.2
.\" 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" "2022-02-01"
-.P
+.TH "YDOTOOL" "1" "2023-07-12"
.SH NAME
.P
ydotool - command-line \fI/dev/uinput\fR automation tool
.P
.SH SYNOPSIS
.P
-\fBydotool\fR \fBcmd\fR \fIargs.\&.\&.\&\fR
+\fBydotool\fR \fBcmd\fR \fIargs\fR
.P
\fBydotool\fR \fBcmd\fR --help
.P
.SH DESCRIPTION
.P
-\fBydotool\fR lets you programmatically (or manually) simulate keyboard input and mouse activity, etc.\& It does this by writing directly to \fI/dev/uinput\fR so it generally needs to run as root.\&
+\fBydotool\fR lets you programmatically (or manually) simulate keyboard input and mouse activity, etc.\&
+The \fBydotoold\fR(8) daemon must be running.\&
+.P
.P
Currently implemented command(s):
.P
@@ -35,254 +36,250 @@ Press keys
.RS 4
Move mouse pointer to absolute position
.RE
-\fBmousemove_relative\fR
-.RS 4
-Move mouse pointer to relative position
-.RE
\fBclick\fR
.RS 4
Click on mouse buttons
-.RE
-\fBrecorder\fR
-.RS 4
-Record/replay input events
-.RE
-\fBmouseup\fR
-.RS 4
-Send a mouse up event.\&
-.RE
-\fBmousedown\fR
-.RS 4
-Send a mouse down event.\&
.P
.RE
.SH KEYBOARD COMMANDS
-\fBkey\fR [\fB--up\fR] [\fB--down\fR] [\fB--delay\fR \fI<ms>\fR] [\fB--key-delay\fR \fI<ms>\fR] [\fB--repeat\fR \fI<times>\fR] [\fB--repeat-delay <ms>\fR] [\fB--persist-delay <ms>\fR] \fI<key sequence>\fR
+\fBkey\fR [\fB-d\fR,\fB--key-delay\fR \fI<ms>\fR] [\fI<KEYCODE:PRESSED>\fR .\&.\&.\&]
.P
.RS 4
-Type a given keystroke.\& Examples being "alt+r", "ctrl+J",
-"ctrl+alt+n", "backspace".\&
+Type a given keycode.\&
.P
-Options:
+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)
.P
-\fB--up\fR
-.RS 4
-Only keyup
+42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0 - "LOL"
.P
-.RE
-\fB--down\fR
-.RS 4
-Only keydown
+Non-interpretable values, such as 0, aaa, l0l, will only cause a delay.\&
.P
-.RE
-\fB--delay\fR \fI<ms>\fR
-.RS 4
-Delay before starting to output keystrokes.\& Default 100ms.\&
+See `/usr/include/linux/input-event-codes.\&h'\& for available key codes (KEY_*).\&
.P
-.RE
-\fB--key-delay\fR \fI<ms>\fR
-.RS 4
-Delay time between keystrokes.\& Default 12ms.\&
+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.\&
.P
-.RE
-\fB--repeat\fR \fI<times>\fR
-.RS 4
-Times to repeat the key sequence.\&
-.P
-.RE
-\fB--repeat-delay\fR \fI<ms>\fR
-.RS 4
-Delay time between repetitions.\& Default 0ms.\&
-.P
-.RE
-\fB--persist-delay\fR \fI<ms>\fR
-.RS 4
-Keep virtual device alive for \fI<ms>\fR ms.\& Should be used in conjunction with \fB--down\fR or \fB--up\fR
-.P
-.RE
-Generally, any valid name from \fI/usr/include/linux/input-event-codes.\&h\fR will work.\& Multiple keys are separated by '+'.\&
-.P
-Each key sequence can be any number of modifiers and keys, separated by plus (+)
-For example: alt+r Alt+F4 CTRL+alt+f3 aLT+1+2+3 ctrl+Backspace
-.P
-Since we are emulating keyboard input, combinations like Shift+# is invalid because typing a `#' involves pressing Shift and 3.\&
-.P
-Example: Switch to tty1:
-.RS 4
-ydotool key ctrl+alt+f1
-.P
-.RE
-Example: Close a window in graphical environment:
+Options:
+\fB-d\fR,\fB--key-delay\fR \fI<ms>\fR
.RS 4
-ydotool key Alt+F4
+Delay time between keystrokes.\& Default 12ms.\&
.P
.RE
.RE
-\fBtype\fR [\fB--delay\fR \fI<ms>\fR] [\fB--key-delay\fR \fI<ms>\fR] [\fB--args\fR \fI<N>\fR] [\fB--file\fR \fI<filepath>\fR] "\fIsomething to type\fR"
+\fBtype\fR [\fB-D\fR,\fB--next-delay\fR \fI<ms>\fR] [\fB-d\fR,\fB--key-delay\fR \fI<ms>\fR] [\fB-f\fR,\fB--file\fR \fI<filepath>\fR] "\fItext\fR"
.P
.RS 4
Types text as if you had typed it on the keyboard.\&
.P
Options:
.P
-\fB--delay\fR \fI<ms>\fR
-.RS 4
-Delay before starting typing.\& Default 100ms.\&
-.P
-.RE
-\fB--key-delay\fR \fI<ms>\fR
+\fB-d\fR,\fB--key-delay\fR \fI<ms>\fR
.RS 4
-Delay time between keystrokes.\& Default 12ms.\&
+Delay time between key events (up/down each).\& Default 12ms.\&
.P
.RE
-\fB--args\fR \fI<N>\fR
+\fB-D\fR,\fB--next-delay\fR \fI<ms>\fR
.RS 4
-?\&?\&?\&?\&
+Delay between strings.\& Default 0ms.\&
.P
.RE
-\fB--file\fR \fI<filepath>\fR
+\fB-f\fR,\fB--file\fR \fI<filepath>\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.\&
+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.\&
.P
.RE
-Example: to type 'Hello world!\&' you would do:
+Example: to type '\&Hello world!\&'\& you would do:
.RS 4
-ydotool type 'Hello world!\&'
+ydotool type '\&Hello world!\&'\&
.P
.RE
.RE
.SH MOUSE COMMANDS
.P
-\fBmousemove\fR [\fB--delay\fR \fI<ms>\fR] \fI<x> <y>\fR
+\fBmousemove\fR [\fB-a\fR,\fB--absolute\fR] \fI<x> <y>\fR
.RS 4
-Move the mouse to the specific X and Y coordinates on the screen.\&
+Move the mouse to the relative X and Y coordinates on the screen.\&
.P
Options:
-\fB--delay\fR \fI<ms>\fR
+\fB--absolute\fR
.RS 4
-Delay before starting move.\& Default 100ms.\&
+Use absolute position
.P
.RE
Example: to move the cursor to absolute coordinates (100,100):
.RS 4
-ydotool mousemove 100 100
+ydotool mousemove --absolute 100 100
.P
.RE
.RE
-\fBmousemove_relative\fR [\fB--delay\fR \fI<ms>\fR] \fI<x>\fR \fI<y>\fR
+\fBclick\fR [\fB-d\fR,\fB--next-delay\fR \fI<ms>\fR] [\fB-r\fR,\fB--repeat\fR \fIN\fR ] [\fIbutton\fR .\&.\&.\&]
.RS 4
-Move the mouse x,y pixels relative to the current position of the mouse cursor.\&
+Send a click.\&
.P
Options:
-\fB--delay\fR \fI<ms>\fR
+\fB-d\fR,\fB--next-delay\fR \fI<ms>\fR
.RS 4
-Delay before starting move.\& Default 100ms.\&
+Delay between input events (up/down, a compete click means doubled time).\& Default 25ms.\&
.P
.RE
-Example: Relatively move mouse pointer to -100,100:
+\fB-r\fR,\fB--repeat\fR \fIN\fR
.RS 4
-ydotool mousemove_relative -- -100 100
+Repeat entire sequence N times
.P
.RE
-.RE
-\fBclick\fR [\fB--delay\fR \fI<ms>\fR] \fIbutton\fR
-.RS 4
-Send a click.\& Buttons are: 1=left 2=right 3=middle
-.P
-Options:
+all mouse buttons are represented using hexadecimal numeric values, with an optional
+bit mask to specify if mouse up/down needs to be omitted.\&
.P
-\fB--delay\fR \fI<ms>\fR
.RS 4
-Delay before click.\& Default 100ms.\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x00 - LEFT
.RE
-Example: Mouse right click:
.RS 4
-ydotool click 2
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x01 - RIGHT
.RE
-.RE
-\fBrecorder\fR [\fB--delay\fR \fI<ms>\fR] [\fB--record\fR \fI<devices>\fR] [\fB--replay\fR \fI<input files>\fR] [\fB--display\fR] [\fB--duration\fR \fI<ms>\fR]
-.P
.RS 4
-Options:
-.P
-\fB--delay\fR \fI<ms>\fR
-.RS 4
-Delay time before start recording/replaying.\& Default 5000ms.\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x02 - MIDDLE
.RE
-\fB--record\fR \fI<devices>\fR
.RS 4
-Devices to record from.\& Default is all, including non-keyboard devices.\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x03 - SIDE
.RE
-\fB--replay\fR \fI<input files>\fR
.RS 4
-The record file can't be replayed on an architecture with different endianness.\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x04 - EXTR
.RE
-\fB--display\fR
.RS 4
-?\&?\&?\&?\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x05 - FORWARD
.RE
-\fB--duration\fR \fI<ms>\fR
.RS 4
-Record duration.\& Otherwise use SIGINT to stop recording.\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x06 - BACK
.RE
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x07 - TASK
.RE
-\fBmouseup\fR [\fB--delay\fR \fI<ms>\fR] \fIbutton\fR
.RS 4
-Send a mouse up event.\& Buttons are: 1=left 2=right 3=middle
-.P
-Options:
-.P
-\fB--delay\fR \fI<ms>\fR
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x40 - Mouse down
+.RE
.RS 4
-Delay before click.\& Default 100ms.\&
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x80 - Mouse up
.RE
-Example: Mouse right click:
+
.RS 4
-ydotool click 2
-.P
+
.RE
.RE
-\fBmousedown\fR [\fB--delay\fR \fI<ms>\fR] \fIbutton\fR
-.RS 4
-Send a mouse down event.\& Buttons are: 1=left 2=right 3=middle
-.P
-Options:
+Examples:
.P
-\fB--delay\fR \fI<ms>\fR
.RS 4
-Delay before click.\& Default 100ms.\&
-.P
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x00: chooses left button, but does nothing (you can use this to implement extra sleeps)
.RE
-Example: Mouse right click:
.RS 4
-ydotool click 2
-.P
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0xC0: left button click (down then up)
.RE
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x41: right button down
+.RE
+.RS 4
+.ie n \{\
+\h'-04'\(bu\h'+03'\c
+.\}
+.el \{\
+.IP \(bu 4
+.\}
+0x82: middle button up
+
.RE
-.SH AUTHOR
.P
-ydotool was written by ReimuNotMoe.\&
+The '\&0x'\& prefix can be omitted if you want.\&
.P
-This man page by bob.\&hepple@gmail.\&com
+.RE
+.SH YDOTOOL SOCKET
.P
-.SH BUGS
+The socket to write to for \fBydotoold\fR(8) can be changed by the environment variable YDOTOOL_SOCKET.\&
.P
-When \fBydotool\fR(1) runs and creates a virtual input device, it will take some time for your graphical environment (eg X11/Wayland) to recognize and enable the virtual input device.\& (Usually done by udev)
+.SH AUTHOR
.P
-If the delay is too short, the virtual input device may not be recognized & enabled by the graphical environment in time.\&
+ydotool was written by ReimuNotMoe.\&
.P
-In order to solve this problem, there is a persistent background service, \fBydotoold\fR(1), to hold a persistent virtual device, and accept input from \fBydotool\fR(1).\& When \fBydotoold\fR(1) is unavailable, \fBydotool\fR(1) will work without it.\&
+This manpage was written by bob.\&hepple@gmail.\&com but updated since.\&
.P
-.SH COPYRIGHT
-MIT License
+.SH LICENCE
+AGPLv3
.P
.SH SEE ALSO
.P