summaryrefslogtreecommitdiff
path: root/contrib/SDL-3.2.8/src/hidapi/udev
diff options
context:
space:
mode:
author3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
committer3gg <3gg@shellblade.net>2025-12-27 12:03:39 -0800
commit5a079a2d114f96d4847d1ee305d5b7c16eeec50e (patch)
tree8926ab44f168acf787d8e19608857b3af0f82758 /contrib/SDL-3.2.8/src/hidapi/udev
Initial commit
Diffstat (limited to 'contrib/SDL-3.2.8/src/hidapi/udev')
-rw-r--r--contrib/SDL-3.2.8/src/hidapi/udev/69-hid.rules36
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/SDL-3.2.8/src/hidapi/udev/69-hid.rules b/contrib/SDL-3.2.8/src/hidapi/udev/69-hid.rules
new file mode 100644
index 0000000..02d6a2c
--- /dev/null
+++ b/contrib/SDL-3.2.8/src/hidapi/udev/69-hid.rules
@@ -0,0 +1,36 @@
1# This is a sample udev file for HIDAPI devices which lets unprivileged
2# users who are physically present at the system (not remote users) access
3# HID devices.
4
5# If you are using the libusb implementation of hidapi (libusb/hid.c), then
6# use something like the following line, substituting the VID and PID with
7# those of your device.
8
9# HIDAPI/libusb
10SUBSYSTEMS=="usb", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uaccess"
11
12# If you are using the hidraw implementation (linux/hid.c), then do something
13# like the following, substituting the VID and PID with your device.
14
15# HIDAPI/hidraw
16KERNEL=="hidraw*", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", TAG+="uaccess"
17
18# Once done, optionally rename this file for your application, and drop it into
19# /etc/udev/rules.d/.
20# NOTE: these rules must have priority before 73-seat-late.rules.
21# (Small discussion/explanation in systemd repo:
22# https://github.com/systemd/systemd/issues/4288#issuecomment-348166161)
23# for example, name the file /etc/udev/rules.d/70-my-application-hid.rules.
24# Then, replug your device or run:
25# sudo udevadm control --reload-rules && sudo udevadm trigger
26
27# Note that the hexadecimal values for VID and PID are case sensitive and
28# must be lower case.
29
30# TAG+="uaccess" only gives permission to physically present users, which
31# is appropriate in most scenarios. If you require access to the device
32# from a remote session (e.g. over SSH), add
33# GROUP="plugdev", MODE="660"
34# to the end of the udev rule lines, add your user to the plugdev group with:
35# usermod -aG plugdev USERNAME
36# then log out and log back in (or restart the system).