@@ -28,7 +28,26 @@ chmod +x install.sh
2828./install.sh
2929```
3030
31- After installation, ** log out and log back in** (required for permissions).
31+ Run the script as your normal user, not with ` sudo ` . It will ask for sudo only
32+ when it needs to install packages or update input-device permissions.
33+
34+ The installer:
35+
36+ - installs Python/system dependencies
37+ - creates a local ` .venv `
38+ - installs Python packages into that ` .venv `
39+ - installs a menu launcher (` rofi-wayland ` when available, otherwise ` rofi ` )
40+ - adds your user to the ` input ` group
41+ - enables the ` keypilot ` user service
42+
43+ After installation, ** log out and log back in** or reboot. This is required so
44+ Linux applies the new ` input ` group permission to your desktop session.
45+
46+ Then start/restart KeyPilot:
47+
48+ ``` bash
49+ systemctl --user restart keypilot
50+ ```
3251
3352---
3453
@@ -41,6 +60,18 @@ A menu will appear where you can:
4160- Open browser
4261- Run custom actions
4362
63+ To check whether the background service is running:
64+
65+ ``` bash
66+ systemctl --user status keypilot
67+ ```
68+
69+ To watch logs while pressing the Copilot key:
70+
71+ ``` bash
72+ journalctl --user -u keypilot -f
73+ ```
74+
4475---
4576
4677## Customization
@@ -155,22 +186,85 @@ def run_action(action):
155186---
156187
157188Thats it. you can launch anything.
158- At last run the file again ``` ./install.sh ```
189+ After changing the service file or reinstalling dependencies, run:
190+
191+ ``` bash
192+ ./install.sh
193+ systemctl --user restart keypilot
194+ ```
159195
160196---
161197
162198## Requirements
163199
164- - Linux (X11 session)
165- - Python 3
166- - rofi
200+ - Linux
201+ - Python 3
202+ - ` python3-venv `
203+ - one supported menu launcher:
204+ - ` rofi-wayland ` recommended for Wayland
205+ - ` wofi `
206+ - ` fuzzel `
207+ - ` rofi ` for X11
167208
168209---
169210
170211## Notes
171212
172213- Uses low-level input (` /dev/input ` ) → permissions handled in install script
173- - Wayland support is limited (common Linux limitation)
214+ - The installer uses a local ` .venv ` , so it avoids Python's
215+ ` externally-managed-environment ` / PEP 668 error.
216+ - KeyPilot tries menu launchers in this order: ` rofi-wayland ` , ` wofi ` ,
217+ ` fuzzel ` , then ` rofi ` .
218+ - On GNOME Wayland, classic ` /usr/bin/rofi ` may crash. Install ` rofi-wayland `
219+ or ` wofi ` , then restart the service.
220+
221+ ---
222+
223+ ## Troubleshooting
224+
225+ ### Service says "No suitable input device found"
226+
227+ Check your active groups:
228+
229+ ``` bash
230+ id -nG | grep -w input
231+ ```
232+
233+ If nothing prints, log out completely and log back in, or reboot. Then run:
234+
235+ ``` bash
236+ systemctl --user reset-failed keypilot
237+ systemctl --user restart keypilot
238+ journalctl --user -u keypilot -n 30 --no-pager
239+ ```
240+
241+ When it works, the logs should contain something like:
242+
243+ ``` text
244+ [KeyPilot] Using F23 device: /dev/input/event3 (...)
245+ [KeyPilot] Listening...
246+ ```
247+
248+ ### Ubuntu reports that rofi crashed
249+
250+ If you see an Ubuntu crash dialog for ` /usr/bin/rofi ` , install a Wayland-friendly
251+ launcher:
252+
253+ ``` bash
254+ sudo apt install rofi-wayland
255+ ```
256+
257+ If that package is not available:
258+
259+ ``` bash
260+ sudo apt install wofi
261+ ```
262+
263+ Then restart KeyPilot:
264+
265+ ``` bash
266+ systemctl --user restart keypilot
267+ ```
174268
175269---
176270
@@ -180,4 +274,5 @@ On Linux, the Copilot key is useless.
180274
181275KeyPilot turns it into something actually useful.
182276
183- Works best on X11. Wayland support may be limited.
277+ Works on X11 and can work on Wayland when a Wayland-friendly menu launcher is
278+ installed.
0 commit comments