Skip to content

Class pinnacle.input.libinput.DeviceHandle

A handle to an input device.

Fields

sysname

sysname: string

The name of the device's system path.

Functions

method capabilities

function pinnacle.input.libinput.DeviceHandle:capabilities()
    -> pinnacle.input.libinput.Capabilities

Gets this device's libinput capabilities.

Returns

  1. pinnacle.input.libinput.Capabilities

method name

function pinnacle.input.libinput.DeviceHandle:name()
    -> string

Gets the name of this device.

Returns

  1. string

method product_id

function pinnacle.input.libinput.DeviceHandle:product_id()
    -> integer

Gets this device's product id.

Returns

  1. integer

method vendor_id

function pinnacle.input.libinput.DeviceHandle:vendor_id()
    -> integer

Gets this device's vendor id.

Returns

  1. integer

method device_type

function pinnacle.input.libinput.DeviceHandle:device_type()
    -> pinnacle.input.libinput.DeviceType

Gets the type of this device.

Note: This uses heuristics to determine the type and may not be correct. For example a device with both pointer and keyboard capabilities will be a "mouse" when it may actually be a keyboard.

Returns

  1. pinnacle.input.libinput.DeviceType

method map_to_output

function pinnacle.input.libinput.DeviceHandle:map_to_output(output: pinnacle.output.OutputHandle)

Maps the absolute input from this device to the corresponding output.

This will cause touch input from this device to map proportionally to the area of an output. For example, tapping in the middle of the device will generate a tap event at the middle of the output.

This only affects devices with touch capability.

Parameters

output: pinnacle.output.OutputHandle - The output to map the device's input to

See also

method map_to_region

function pinnacle.input.libinput.DeviceHandle:map_to_region(region: { x: integer, y: integer, width: integer, height: integer })

Maps the absolute input from this device to the corresponding region in the global space.

This will cause touch input from this device to map proportionally to the given region within the global space. For example, tapping in the middle of the device will generate a tap event at the middle of the region. This can be used to map a touch device to more than one output, for example.

This only affects devices with touch capability.

Parameters

region: { x: integer, y: integer, width: integer, height: integer } - The region in the global space to map input to

See also

method set_accel_profile

function pinnacle.input.libinput.DeviceHandle:set_accel_profile(accel_profile: pinnacle.input.libinput.AccelProfile)

Sets this device's acceleration profile.

Parameters

accel_profile: pinnacle.input.libinput.AccelProfile

method set_accel_speed

function pinnacle.input.libinput.DeviceHandle:set_accel_speed(accel_speed: number)

Sets this device's acceleration speed.

Parameters

accel_speed: number

method set_calibration_matrix

function pinnacle.input.libinput.DeviceHandle:set_calibration_matrix(calibration_matrix: number[])

Sets this device's calibration matrix.

Parameters

calibration_matrix: number[] - The calibration matrix as an array of 6 floats.

method set_click_method

function pinnacle.input.libinput.DeviceHandle:set_click_method(click_method: pinnacle.input.libinput.ClickMethod)

Sets this device's click method.

Parameters

click_method: pinnacle.input.libinput.ClickMethod

method set_disable_while_typing

function pinnacle.input.libinput.DeviceHandle:set_disable_while_typing(disable_while_typing: boolean)

Sets whether or not this device is disabled while typing.

Parameters

disable_while_typing: boolean

method set_left_handed

function pinnacle.input.libinput.DeviceHandle:set_left_handed(left_handed: boolean)

Sets this device to left-handed or not.

Parameters

left_handed: boolean

method set_middle_emulation

function pinnacle.input.libinput.DeviceHandle:set_middle_emulation(middle_emulation: boolean)

Sets whether or not middle emulation is enabled.

Parameters

middle_emulation: boolean

method set_rotation_angle

function pinnacle.input.libinput.DeviceHandle:set_rotation_angle(rotation_angle: integer)

Sets this device's rotation angle.

Parameters

rotation_angle: integer

method set_scroll_button

function pinnacle.input.libinput.DeviceHandle:set_scroll_button(scroll_button: integer)

Sets this device's scroll button.

Parameters

scroll_button: integer

method set_scroll_button_lock

function pinnacle.input.libinput.DeviceHandle:set_scroll_button_lock(scroll_button_lock: boolean)

Sets whether or not the scroll button locks on this device.

Parameters

scroll_button_lock: boolean

method set_scroll_method

function pinnacle.input.libinput.DeviceHandle:set_scroll_method(scroll_method: pinnacle.input.libinput.ScrollMethod)

Sets this device's scroll method.

Parameters

scroll_method: pinnacle.input.libinput.ScrollMethod

method set_natural_scroll

function pinnacle.input.libinput.DeviceHandle:set_natural_scroll(natural_scroll: boolean)

Enables or disables natural scroll on this device.

Parameters

natural_scroll: boolean

method set_tap_button_map

function pinnacle.input.libinput.DeviceHandle:set_tap_button_map(tap_button_map: pinnacle.input.libinput.TapButtonMap)

Sets this device's tap button map.

Parameters

tap_button_map: pinnacle.input.libinput.TapButtonMap

method set_tap_drag

function pinnacle.input.libinput.DeviceHandle:set_tap_drag(tap_drag: boolean)

Enables or disables tap dragging on this device.

Parameters

tap_drag: boolean

method set_tap_drag_lock

function pinnacle.input.libinput.DeviceHandle:set_tap_drag_lock(tap_drag_lock: boolean)

Sets whether or not tap dragging locks on this device.

Parameters

tap_drag_lock: boolean

method set_tap

function pinnacle.input.libinput.DeviceHandle:set_tap(tap: boolean)

Enables or disables tap-to-click on this device.

Parameters

tap: boolean

method set_send_events_mode

function pinnacle.input.libinput.DeviceHandle:set_send_events_mode(send_events_mode: pinnacle.input.libinput.SendEventsMode)

Sets this device's send events mode.

Parameters

send_events_mode: pinnacle.input.libinput.SendEventsMode

Last updated: