Gamepad: Difference between revisions

From Alpine Linux
(Initial page creation)
(No difference)

Revision as of 09:21, 11 November 2024

This article covers gamepads, joysticks and other game controllers.

With eudev

By default, only members of the input group can access gamepad and joystick devices. However, making users members of the input has a negative security impact on which processes can obtain raw keyboard and mouse input.

To grant members of the plugdev group access to gamepads, create an udev rule. For example, /etc/udev/rules.d/90-joysticks.rules:

ACTION=="add", KERNEL=="js[0-9]*", SUBSYSTEM=="input", RUN+="/bin/chown root:plugdev /dev/input/js%n"

Reload all rules with

udevadm control --reload

The (re)connect the game controller.