diff -Nur ydotool-1.0.1-orig/manpage/ydotool.1.scd ydotool-1.0.1/manpage/ydotool.1.scd --- ydotool-1.0.1-orig/manpage/ydotool.1.scd 2022-02-16 19:38:49.000000000 +1000 +++ ydotool-1.0.1/manpage/ydotool.1.scd 2022-03-21 14:46:37.916103638 +1000 @@ -1,12 +1,11 @@ YDOTOOL(1) - # NAME ydotool - command-line _/dev/uinput_ automation tool # SYNOPSIS -*ydotool* *cmd* _args_ [ , *cmd* _args_ ... ] +*ydotool* *cmd* _args_ *ydotool* *cmd* --help @@ -14,8 +13,6 @@ *ydotool* lets you programmatically (or manually) simulate keyboard input and mouse activity, etc. It does this by writing directly to _/dev/uinput_ so it generally needs to run as root. -It's possible to chain multiple commands together, separated by a comma between two spaces. - Currently implemented command(s): *type* @@ -26,67 +23,37 @@ Move mouse pointer to absolute position *click* Click on mouse buttons -*recorder* - Record/replay input events -*sleep* - sleep for a while # KEYBOARD COMMANDS -*key* [*--up*] [*--down*] [*--next-delay* __] [*--key-delay* __] [*--repeat* __] [*--repeat-delay *] __ +*key* [*-d*,*--key-delay* __] [__ ...] - Type a given keystroke. Examples being "alt+r", "ctrl+J", - "ctrl+alt+n", "backspace". + Type a given keycode. + + e.g. 28:1 28:0 means pressing on the Enter button on a standard US keyboard. - Options: + 42:1 38:1 38:0 24:1 24:0 38:1 38:0 42:0 - "LOL" - *--up* - Only keyup - - *--down* - Only keydown + Non-interpretable values, such as 0, aaa, l0l, will only cause a delay. - *--delay* __ - Delay before starting to output keystrokes. Default 100ms. + See `/usr/include/linux/input-event-codes.h' for available key codes (KEY_\*). - *--key-delay* __ + Options: + *-d*,*--key-delay* __ Delay time between keystrokes. Default 12ms. - *--repeat* __ - Times to repeat the key sequence. - - *--repeat-delay* __ - Delay time between repetitions. Default 0ms. - - Generally, any valid name from _/usr/include/linux/input-event-codes.h_ will work. Multiple keys are separated by '+'. - - 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 - - Since we are emulating keyboard input, combinations like Shift+# is invalid because typing a `#' involves pressing Shift and 3. - - Example: Switch to tty1: - ydotool key ctrl+alt+f1 - - Example: Close a window in graphical environment: - ydotool key Alt+F4 - -*type* [*--next-delay* __] [*--key-delay* __] [*--texts* _arg_] [*--file* __] "_texts_" +*type* [*-D*,*--next-delay* __] [*-d*,*--key-delay* __] [*-f*,*--file* __] "_text_" Types text as if you had typed it on the keyboard. Options: - *--next-delay* __ - Delay before starting typing. Default 100ms. + *-d*,*--key-delay* __ + Delay time between key events (up/down each). Default 12ms. - *--key-delay* __ - Delay time between keystrokes. Default 12ms. - - *--texts* _arg_ - Texts to type + *-D*,*--next-delay* __ + Delay between strings. Default 0ms. - *--file* __ + *-f*,*--file* __ 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. Example: to type 'Hello world!' you would do: @@ -94,8 +61,8 @@ # MOUSE COMMANDS -*mousemove* _ _ - Move the mouse to the specific relative X and Y coordinates on the screen. +*mousemove* [*-a*,*--absolute*] _ _ + Move the mouse to the relative X and Y coordinates on the screen. Options: *--absolute* @@ -104,47 +71,38 @@ Example: to move the cursor to absolute coordinates (100,100): ydotool mousemove --absolute 100 100 -*click* [*--next-delay* __] _button_ - Send a click. Buttons are: _left_, _right_ or _middle_ - - Options: - - *--next-delay* __ - Delay before click. Default 100ms. - - *--up* - Only mouseup - - *--down* - Only mousedown - - *--buttons* __ - Buttons to press (left, right, middle) - - Example: Mouse middle click: - ydotool click middle - -*recorder* [*--record* __] [*--replay* __] [*--display*] [*--duration* __] [*--devices* __] [*--file* __] +*click* [*-d*,*--next-delay* __] [*-r*,*--repeat* _N_ ] [_button_ ...] + Send a click. Options: + *-d*,*--next-delay* __ + Delay between input events (up/down, a compete click means doubled time). Default 25ms. - *--record* __ - Devices to record from. Default is all, including non-keyboard devices. - - *--replay* __ - The record file can't be replayed on an architecture with different endianness. - - *--display* - Display + *-r*,*--repeat* _N_ + Repeat entire sequence N times - *--duration* __ - Record duration. Otherwise use SIGINT to stop recording. + all mouse buttons are represented using hexadecimal numeric values, with an optional + bit mask to specify if mouse up/down needs to be omitted. - *--devices* __ - Devices, separated by comma, to record from. Default is all devices (default: "") + - 0x00 - LEFT + - 0x01 - RIGHT + - 0x02 - MIDDLE + - 0x03 - SIDE + - 0x04 - EXTR + - 0x05 - FORWARD + - 0x06 - BACK + - 0x07 - TASK + - 0x40 - Mouse down + - 0x80 - Mouse up + + Examples: + + - 0x00: chooses left button, but does nothing (you can use this to implement extra sleeps) + - 0xC0: left button click (down then up) + - 0x41: right button down + - 0x82: middle button up - *--file* __ - File to record to / replay from + The '0x' prefix can be omitted if you want. # AUTHOR