You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-26Lines changed: 50 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,26 +14,8 @@ ydotool will then be rewritten in JavaScript afterwards, to enable more people t
14
14
## Important Note
15
15
The man page is not always up to date. Please use `--help` to ensure correctness.
16
16
17
-
## ChangeLog
18
-
This project is now refactored. (from v1.0.0)
19
-
20
-
Changes:
21
-
- Rewritten in pure C99
22
-
- No external dependencies
23
-
- Uses a lot less memory & no dynamic memory allocation
24
-
25
-
Breaking Changes:
26
-
-`recorder` removed because it's irrelevant. It will become a separate project
27
-
- Command chaining and `sleep` are removed because this should be your shell's job
28
-
-`ydotool` now must work with `ydotoold`
29
-
- Usage of `click` and `key` are changed
30
-
31
-
Good News:
32
-
- Some people can finally build this project offline
33
-
-`key` now (only) accepts keycodes, so it's not limited to a specific keyboard layout
34
-
- Now it's possible to implement support for different keyboard layouts in `type`
35
-
36
17
## Usage
18
+
### Commands
37
19
Currently implemented command(s):
38
20
-`click` - Click on mouse buttons
39
21
-`mousemove` - Move mouse pointer to absolute position
@@ -43,7 +25,7 @@ Currently implemented command(s):
43
25
-`bakers` - Show the honorable bakers
44
26
-`stdin` - Sends the key presses as it was a keyboard (i.e from ssh) See [PR #229](https://github.com/ReimuNotMoe/ydotool/pull/229)
45
27
46
-
## Examples
28
+
###Examples
47
29
Switch to tty1 (Ctrl+Alt+F1), wait 2 seconds, and type some words:
48
30
49
31
ydotool key 29:1 56:1 59:1 59:0 56:0 29:0; sleep 2; ydotool type 'echo Hey guys. This is Austin.'
@@ -72,14 +54,18 @@ Repeat the keyboard presses from stdin:
72
54
73
55
ydotool stdin
74
56
57
+
Click keys ctrl+Tab (equivalent of `xdotool ctrl+Tab`):
58
+
59
+
ydotool key 29:1 15:1 29:0 15:0
60
+
75
61
## Notes
76
-
#### Runtime
77
-
`ydotoold` (daemon) program requires access to `/dev/uinput`. **This usually requires root permissions.**
62
+
###Available key names
63
+
To get all key names check out `/usr/include/linux/input-event-codes.h`.
78
64
79
-
#### Available key names
80
-
See `/usr/include/linux/input-event-codes.h`
65
+
###Runtime
66
+
`ydotoold` (daemon) program requires access to `/dev/uinput`. **This usually requires root permissions.**
81
67
82
-
####Why a background service is needed
68
+
### Why a background service is needed
83
69
ydotool works differently from xdotool. xdotool sends X events directly to X server, while ydotool uses the uinput framework of Linux kernel to emulate an input device.
84
70
85
71
When ydotool runs and creates a virtual input device, it will take some time for your graphical environment (X11/Wayland) to recognize and enable the virtual input device. (Usually done by udev)
@@ -101,7 +87,6 @@ There are a few extra options that can be configured when running CMake
101
87
- SYSTEMD_SYSTEM_SERVICE=ON|OFF - whether to use systemd system service file, depends on ``systemd``. Default: OFF
102
88
- OPENRC=ON|OFF - whether to use openrc service file. Default: OFF (TBD)
103
89
104
-
105
90
### Compile
106
91
107
92
mkdir build
@@ -118,6 +103,45 @@ Debian-based:
118
103
RHEL-based:
119
104
120
105
sudo dnf install scdoc
106
+
107
+
## Installation
108
+
### Create a systemd service
109
+
In order for `ydotool` to work the `ydotoold` deaemon must be running.
Currently, ydotool does not recognize if the user is using a custom keyboard layout. In order to comfortably use ydotool alongside a custom keyboard layout, the user could use one of the following fixes/workarounds:
0 commit comments