Configuring/Binds: Rewrite of per-device section for lua and dev tags

This commit is contained in:
ArchSav 2026-05-02 13:57:33 +10:00
parent 8f9c17ad98
commit 288d88e9d6

View file

@ -194,12 +194,13 @@ For more information have a look at [Using Hyprctl](../../Advanced-and-Cool/Usin
### Per-Device Binds
You can set keybinds to be device specific with the `devices` flag.
Devices are provided in a whitespace separated list that goes in front of `dispatcher`.
An `!` can be prepended to the list to exclude the those devices, allowing all other devices to use that bind instead.
You can set keybinds to be device specific with the `devices` flag. This flag is a table consisting of an `inclusive` flag and device list
If `inclusive` is set to true only devices specified in the list are capable of triggering the keybind. If set to false all devices except those specified can trigger the keybind. If `inclusive` is not present it defaults to true.
A list of devices is specified in the `list` field as a comma separated list of strings.
Device tags may also be used in place of device names. See [Devices](../../Advanced-and-Cool/Devices).
```lua
hl.bind(keys, dispatcher(params), { device = { inclusive = true, list = { "device1", "device1" } } })
hl.bind(keys, dispatcher(params), { device = { inclusive = true, list = { "device1", "device2" } } })
```
```lua