Skip to content

Commit 48bde64

Browse files
committed
docs: add physical device access to uinput-access tutorial
1 parent 640e95d commit 48bde64

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

‎tutorials/uinput-access.md‎

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,26 @@ by the current user.
6969
```text
7070
crw-rw---- 1 root uinput 10, <minor> <MMM DD HH:MM> /dev/uinput
7171
```
72+
73+
## Physical Device Access (`input` group)
74+
75+
If your Lua program needs to read from existing physical input devices (e.g.,
76+
`/dev/input/event*`), your user must also be a member of the system `input`
77+
group:
78+
79+
1. Add your user to the `input` group:
80+
81+
```bash
82+
sudo usermod -aG input "$USER"
83+
```
84+
85+
2. Refresh the current shell group list:
86+
87+
```bash
88+
newgrp input
89+
```
90+
91+
> [!TIP]
92+
>
93+
> Like with `uinput`, logging out and back in is the cleanest way to apply
94+
> this group membership system-wide.

0 commit comments

Comments
 (0)