Skip to content

Gdk.Seat

class — extends GObject.Object

Represents a collection of input devices that belong to a user.

Methods

get_capabilities

def get_capabilities(self) -> SeatCapabilities

Returns the capabilities this GdkSeat currently has.

get_devices

def get_devices(self, capabilities: SeatCapabilities | int) -> list[Device]

Returns the devices that match the given capabilities.

Parameters:

  • capabilities — capabilities to get devices for

get_display

def get_display(self) -> Display

Returns the GdkDisplay this seat belongs to.

get_keyboard

def get_keyboard(self) -> Device | None

Returns the device that routes keyboard events.

get_pointer

def get_pointer(self) -> Device | None

Returns the device that routes pointer events.

get_tools

def get_tools(self) -> list[DeviceTool]

Returns all GdkDeviceTools that are known to the application.

Properties

display

display: Display  # read/write

GdkDisplay of this seat.

Signals

device-added

def on_device_added(self, device: Device) -> None: ...

Emitted when a new input device is related to this seat.

device-removed

def on_device_removed(self, device: Device) -> None: ...

Emitted when an input device is removed (e.g. unplugged).

tool-added

def on_tool_added(self, tool: DeviceTool) -> None: ...

Emitted whenever a new tool is made known to the seat.

The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the Device.tool-changed signal accordingly.

A same tool may be used by several devices.

tool-removed

def on_tool_removed(self, tool: DeviceTool) -> None: ...

Emitted whenever a tool is no longer known to this seat.