1
0
Fork 0
forked from wry/wry

config: allow mapping input devices to outputs

This commit is contained in:
Julian Orth 2024-05-01 15:29:52 +02:00
parent efdca4de49
commit 86e283d255
18 changed files with 420 additions and 13 deletions

View file

@ -841,6 +841,14 @@
"on-converted-to-tablet": {
"description": "An action to execute when the convertible device is converted to a tablet.\n\nThis should only be used in the top-level inputs array.\n",
"$ref": "#/$defs/Action"
},
"output": {
"description": "Maps this input device to an output.\n\nThis is used to map touch screen and graphics tablets to outputs.\n\n- Example:\n\n ```toml\n [[inputs]]\n match.name = \"Wacom Bamboo Comic 2FG Pen\"\n output.connector = \"DP-1\"\n ```\n",
"$ref": "#/$defs/OutputMatch"
},
"remove-mapping": {
"type": "boolean",
"description": "Removes the mapping of from this device to an output.\n\nThis should only be used within `configure-input` actions.\n\n- Example:\n\n ```toml\n [shortcuts]\n alt-x = { type = \"configure-input\", input = { match.tag = \"wacom\", remove-mapping = true } }\n\n [[inputs]]\n tag = \"wacom\"\n match.name = \"Wacom Bamboo Comic 2FG Pen\"\n output.connector = \"DP-1\"\n ```\n"
}
},
"required": [

View file

@ -1685,6 +1685,42 @@ The table has the following fields:
The value of this field should be a [Action](#types-Action).
- `output` (optional):
Maps this input device to an output.
This is used to map touch screen and graphics tablets to outputs.
- Example:
```toml
[[inputs]]
match.name = "Wacom Bamboo Comic 2FG Pen"
output.connector = "DP-1"
```
The value of this field should be a [OutputMatch](#types-OutputMatch).
- `remove-mapping` (optional):
Removes the mapping of from this device to an output.
This should only be used within `configure-input` actions.
- Example:
```toml
[shortcuts]
alt-x = { type = "configure-input", input = { match.tag = "wacom", remove-mapping = true } }
[[inputs]]
tag = "wacom"
match.name = "Wacom Bamboo Comic 2FG Pen"
output.connector = "DP-1"
```
The value of this field should be a boolean.
<a name="types-InputMatch"></a>
### `InputMatch`

View file

@ -1285,6 +1285,40 @@ Input:
An action to execute when the convertible device is converted to a tablet.
This should only be used in the top-level inputs array.
output:
ref: OutputMatch
required: false
description: |
Maps this input device to an output.
This is used to map touch screen and graphics tablets to outputs.
- Example:
```toml
[[inputs]]
match.name = "Wacom Bamboo Comic 2FG Pen"
output.connector = "DP-1"
```
remove-mapping:
kind: boolean
required: false
description: |
Removes the mapping of from this device to an output.
This should only be used within `configure-input` actions.
- Example:
```toml
[shortcuts]
alt-x = { type = "configure-input", input = { match.tag = "wacom", remove-mapping = true } }
[[inputs]]
tag = "wacom"
match.name = "Wacom Bamboo Comic 2FG Pen"
output.connector = "DP-1"
```
AccelProfile: