Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions content/Configuring/Advanced and Cool/Devices.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ Additional properties only present in per-device configs:
- `keybinds` -> (only for devices that send key events)
- enables / disables keybinds for the device
- default: Enabled
- `tags` -> (only for keyboards / pointers)
- provides grouping and alt-names is device specific binds (see [Per-Device Binds](../../Basics/Binds#per-device-binds)). comma separated list of tags
- default: ""

> [!NOTE]
> Per-device layouts will by default not alter the keybind keymap, so for example
Expand Down
9 changes: 5 additions & 4 deletions content/Configuring/Basics/Binds.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down