1
0
Fork 0
forked from wry/wry

input: add click method and middle button emulation

This commit is contained in:
Stipe Kotarac 2025-05-12 17:52:36 +02:00 committed by Julian Orth
parent 0524e01a3c
commit b20153550e
24 changed files with 598 additions and 21 deletions

View file

@ -500,6 +500,15 @@
}
]
},
"ClickMethod": {
"type": "string",
"description": "The click method to apply to an input device.\n\nSee the libinput documentation for more details.\n",
"enum": [
"none",
"button-areas",
"clickfinger"
]
},
"ClientMatch": {
"description": "Criteria for matching clients.\n\nIf no fields are set, all clients are matched. If multiple fields are set, all fields\nmust match the client.\n",
"type": "object",
@ -1173,6 +1182,14 @@
"type": "boolean",
"description": "Whether the device uses natural scrolling.\n\nSee the libinput documentation for more details.\n"
},
"middle-button-emulation": {
"type": "boolean",
"description": "Converts a simultaneous left and right button click into a middle button click.\n\nSee the libinput documentation for more details.\n"
},
"click-method": {
"description": "Defines how button events are triggered on a clickable touchpad.\n\nSee the libinput documentation for more details.\n",
"$ref": "#/$defs/ClickMethod"
},
"px-per-wheel-scroll": {
"type": "boolean",
"description": "The number of pixels to scroll for each scroll wheel dedent.\n"

View file

@ -700,6 +700,32 @@ The string should have one of the following values:
The brightness in cd/m^2.
<a name="types-ClickMethod"></a>
### `ClickMethod`
The click method to apply to an input device.
See the libinput documentation for more details.
Values of this type should be strings.
The string should have one of the following values:
- `none`:
No click method handling.
- `button-areas`:
Bottom area of the touchpad is divided into a left, middle and right button area.
- `clickfinger`:
Number of fingers on the touchpad decide the button type.
Clicking with 1, 2, 3 fingers triggers a left, right, or middle click, respectively.
<a name="types-ClientMatch"></a>
### `ClientMatch`
@ -2455,6 +2481,22 @@ The table has the following fields:
The value of this field should be a boolean.
- `middle-button-emulation` (optional):
Converts a simultaneous left and right button click into a middle button click.
See the libinput documentation for more details.
The value of this field should be a boolean.
- `click-method` (optional):
Defines how button events are triggered on a clickable touchpad.
See the libinput documentation for more details.
The value of this field should be a [ClickMethod](#types-ClickMethod).
- `px-per-wheel-scroll` (optional):
The number of pixels to scroll for each scroll wheel dedent.

View file

@ -1372,6 +1372,20 @@ Input:
description: |
Whether the device uses natural scrolling.
See the libinput documentation for more details.
middle-button-emulation:
kind: boolean
required: false
description: |
Converts a simultaneous left and right button click into a middle button click.
See the libinput documentation for more details.
click-method:
ref: ClickMethod
required: false
description: |
Defines how button events are triggered on a clickable touchpad.
See the libinput documentation for more details.
px-per-wheel-scroll:
kind: boolean
@ -1524,6 +1538,23 @@ AccelProfile:
See the libinput documentation for more details.
ClickMethod:
kind: string
values:
- value: none
description: No click method handling.
- value: button-areas
description: Bottom area of the touchpad is divided into a left, middle and right button area.
- value: clickfinger
description: |
Number of fingers on the touchpad decide the button type.
Clicking with 1, 2, 3 fingers triggers a left, right, or middle click, respectively.
description: |
The click method to apply to an input device.
See the libinput documentation for more details.
LogLevel:
kind: string
description: A log level.