Add Per-Device Submap support #14516
Is your feature request related to a problem? Please describe.Currently, Hyprland allows global keybinds, per-device keybinds, Describe the solution you'd likeI want the ability to scope submap definitions to specific input devices, How it should work:
Describe alternatives you've consideredGlobal Submaps:
External Daemons (kanata, kmonad):
What it would look like in a configuration file-- Define a specific stream deck or macro pad
MacroPad = {
inclusive = true,
list = {
-- example devices
"by-tech-usb-gaming-keyboard",
"by-tech-usb-gaming-keyboard-consumer-control",
"by-tech-usb-gaming-keyboard-1",
"by-tech-usb-gaming-keyboard-system-control",
},
}
-- the bind to activate the submap can already be per-device
hl.bind(SUPR .. "+O", hl.dsp.submap("obs_macros"), {
device = MacroPad,
})
hl.define_submap("obs_macros", function()
-- normal per-device bindings inside the submap
hl.bind( "R", hl.dsp.pass( { window = "class:^(com.obsproject.Studio)$" }, { device = MacroPad }))
hl.bind("ESCAPE", utils.reset_submap(), { device = MacroPad })
end, {
-- define a device for the submap in the same way you would for any
-- other binding. This keeps the API somewhat consistent
device = MacroPad
}) |
Replies: 3 comments 1 reply
|
I would personally love to see this implemented. As things stand, using a Stream Deck or dedicated macro pad on Hyprland often relies on external daemons or workarounds that are shaky at best. The current 'global lock' on sub-maps is the biggest hurdle for multi-device setups. Having the ability to isolate a sub-map to a specific hardware ID would effectively turn any cheap numpad into a fully independent, programmable macro station without losing the ability to type on your main board. This would be a massive quality of life improvement for anyone doing streaming, video editing, or complex CAD work. |
|
@vaxerski
|

#15640