The raw-input interface

The raw-input interface allows raw access to input devices. Application with a connected plug is allowed to:

  • read from and write to /dev/input/* for observing raw input events i.e. every key press or mouse pointer movement
  • read from /sys/devices/*/input*/capabilities/* (typically symbolic links from /sys/class/input/event*) to inspect the properties of input devices

Requires snapd version 2.51+.

If your application needs to access input controllers like joysticks, consider using the joystick interface instead.

This interface is restricted because it gives privileged access to events on all input devices and should only be used with trusted apps.

Auto-connect: no

This is a snap interface. See Interface management and Supported interfaces for further details on how interfaces are used.

Code examples

The source code for this interface is in the snapd repository: https://github.com/snapcore/snapd/blob/master/interfaces/builtin/raw_input.go


Last updated 15 hours ago.