Hyprland
Hyprland copied to clipboard
[Feature]: Binding keys to specific devices
It would be cool if each device could have binds specifically for that device. In the config file it would look something like this:
device:some-device {
bind=SUPER,w,exec,notify-send "pressed w with <some-device>"
}
Another solution, would be to be able to interact with key presses in a script. maybe hyprland can write keypresses (with the device that caused it) to the event socket, or a special one specifically for key presses.
Another solution, would be to be able to interact with key presses in a script. maybe hyprland can write keypresses (with the device that caused it) to the event socket, or a special one specifically for key presses.
no, cuz keyloggers.
I am also very interested in the addition of device-specific binds.
This would allow me to forgo input-remapper completely, and make my Razer Naga side buttons actually functional by default.
~~Upon some digging around, I think its already implemented, see~~ https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs
Edit: It does not work.
device: razer-naga-pro {
bind=SUPER,mouse:272,exec, notify-send "test"
}
This bind will activate with both the touchpad and my Razer device.
I have another use case, unless there is a solution for that: I have two keyboards: one that only does qwerty, so I set it's keymap to colemak in software (hyprland here), and one that outputs colemak, so I configure a us or eurkey key for this device.
Now, when I try SUPER+d from one keyboard, it open wofi, but on the colemak one I end up having to use SUPER+g which ends up being a key at a different position than the D on colemak.
Is there any way to make that work?
Would also love to see this functionality natively in hyprland. If the devs aren't interested or as a stop gap the mention of tools such as input-remaper on the wiki would be greatly appreciated.
If the devs aren't interested
hah, devs, lol, I wish there were multiple of me.
It's not "not interested", it's "not a priority and I have 294 other open issues"
If you feel the wiki could use a mention, make a pr to it.
If you feel hl could use a feature, make a pr to it.