GdkDevice
GdkDevice is an object in the GDK library used by GTK applications to represent an input device. It provides a programmatic handle to hardware such as mice, keyboards, touchscreens, and drawing tablets, abstracted to work across different display systems like X11 and Wayland. Each device has an identity, a type (for example pointer-like, keyboard-like, or touch-like), a source that indicates the original hardware family, and a set of capabilities describing which kinds of events the device can generate (movement, button presses, touch contact, pressure, tilt). Applications can query these properties to implement per-device behavior, filter input sources, or collect per-device statistics.
Events in GDK can be associated with a specific GdkDevice, enabling applications to distinguish input from
Common use cases include handling per-device motion or pressure data from tablets and styluses, or recognizing
Related topics include GdkSeat, which groups devices for a user session, and GdkDisplay, which manages the overall