Device.getAssociatedDevice

gdk.device.Device getAssociatedDevice()

Returns the associated device to device, if device is of type [gdk.types.DeviceType.Master], it will return the paired pointer or keyboard.

If device is of type [gdk.types.DeviceType.Slave], it will return the master device to which device is attached to.

If device is of type [gdk.types.DeviceType.Floating], null will be returned, as there is no associated device.

Returns

The associated device, or

null