Module: cwc.input
Lua library for managing input device from libinput.
| data |
table |
user data table |
Read only
|
| type |
integer |
Type of this device.
|
Read only
|
| name |
string |
The descriptive device name as advertised by the kernel and/or the hardware
itself.
|
Read only
|
| sysname |
string |
System name of this device.
|
Read only
|
| output_name |
string |
The name of the output this device is mapped to, or nil if no output is set.
|
Read only
|
| id_vendor |
integer |
The vendor ID of this device.
|
Read only
|
| id_bustype |
integer |
The bus type ID of this device.
|
Read only
|
| id_product |
integer |
The product ID of this device.
|
Read only
|
| send_events_mode |
integer |
The send-event mode for this device.
|
|
| left_handed |
boolean |
Set the left-handed configuration of the device.
|
|
| sensitivity |
number |
Acceleration speed or as a sensitivity when using flat acceleration profile.
|
|
| accel_profile |
integer |
Acceleration profile of this device.
|
|
| natural_scroll |
boolean |
Natural scroll property of this device.
|
|
| middle_emulation |
boolean |
Middle emulation property of this device.
|
|
| rotation_angle |
integer |
The rotation of a device in degrees clockwise off the logical neutral
position.
|
|
| tap |
boolean |
Tap-to-click property of this device.
|
|
| tap_drag |
boolean |
Tap-and-drag property of this device.
|
|
| tap_drag_lock |
integer |
Drag-lock during tapping property on this device.
|
|
| click_method |
integer |
The button click method of this device.
|
|
| scroll_method |
integer |
The scroll method of this device.
|
|
| dwt |
boolean |
Disable-while-typing feature state.
|
|
|
input::new
|
Emitted when an input device is created.
|
|
|
input::destroy
|
Emitted when an input device is about to be destroyed.
|
|
-
🔗
cwc.input.get ()
-> cwc_input[]
-
Get all input device in the server.
Returns:
cwc_input[]
-
🔗
type
integer
· read only
-
Type of this device.
Constraints:
|
Default value
|
: provided by wlroots. |
|
Negative allowed
|
: false |
See also:
-
🔗
name
string
· read only
-
The descriptive device name as advertised by the kernel and/or the hardware
itself.
Constraints:
|
Default value
|
: provided by libinput. |
-
🔗
sysname
string
· read only
-
System name of this device.
Constraints:
|
Default value
|
: provided by libinput. |
-
🔗
output_name
string
· read only
-
The name of the output this device is mapped to, or nil if no output is set.
Constraints:
|
Default value
|
: provided by libinput. |
-
🔗
id_vendor
integer
· read only
-
The vendor ID of this device.
Constraints:
|
Default value
|
: provided by libinput. |
|
Negative allowed
|
: false |
-
🔗
id_bustype
integer
· read only
-
The bus type ID of this device.
Constraints:
|
Default value
|
: provided by libinput. |
|
Negative allowed
|
: false |
-
🔗
id_product
integer
· read only
-
The product ID of this device.
Constraints:
|
Default value
|
: provided by libinput. |
|
Negative allowed
|
: false |
-
🔗
send_events_mode
integer
-
The send-event mode for this device.
Set it to SEND_EVENTS_DISABLE to disable the device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Negative allowed
|
: false |
See also:
-
🔗
left_handed
boolean
-
Set the left-handed configuration of the device.
Constraints:
|
Default value
|
: false |
|
Valid values
|
: true or false. |
-
🔗
sensitivity
number
-
Acceleration speed or as a sensitivity when using flat acceleration profile.
Constraints:
|
Default value
|
: 0.0 |
|
Minimum value
|
: -1.0 |
|
Maximum value
|
: 1.0 |
-
🔗
accel_profile
integer
-
Acceleration profile of this device.
Constraints:
|
Default value
|
: flat profile. |
|
Negative allowed
|
: false |
See also:
-
🔗
natural_scroll
boolean
-
Natural scroll property of this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Valid values
|
: true or false. |
-
🔗
middle_emulation
boolean
-
Middle emulation property of this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Valid values
|
: true or false. |
-
🔗
rotation_angle
integer
-
The rotation of a device in degrees clockwise off the logical neutral
position.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Minimum value
|
: 0 |
|
Maximum value
|
: 360 |
See also:
-
🔗
tap
boolean
-
Tap-to-click property of this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Valid values
|
: true or false. |
-
🔗
tap_drag
boolean
-
Tap-and-drag property of this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Valid values
|
: true or false. |
-
🔗
tap_drag_lock
integer
-
Drag-lock during tapping property on this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Negative allowed
|
: false |
See also:
-
🔗
click_method
integer
-
The button click method of this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Negative allowed
|
: false |
See also:
-
🔗
scroll_method
integer
-
The scroll method of this device.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Negative allowed
|
: false |
See also:
-
🔗
dwt
boolean
-
Disable-while-typing feature state.
Constraints:
|
Default value
|
: hardware configuration dependent. |
|
Valid values
|
: true or false. |
See also:
-
🔗
:map_to_output (output)
-> boolean
-
Map input surface to a screen.
Parameters:
| output |
|
cwc_output |
The output. |
Returns:
boolean
-
🔗
:map_to_region (region)
-> boolean
-
Map input to rectangular region.
Parameters:
| region |
|
table |
|
| x |
|
integer |
|
| y |
|
integer |
|
| width |
|
integer |
|
| height |
|
integer |
|
Returns:
boolean
-
🔗
input::new
-
Emitted when an input device is created.
Arguments:
| device |
|
cwc_input |
The input device object. |
-
🔗
input::destroy
-
Emitted when an input device is about to be destroyed.
Arguments:
| device |
|
cwc_input |
The input device object. |