hl.bind -> send_shortcut or send_key_state broken until explicitly dispatched
#14772
Replies: 2 comments
|
Similar issue here on 0.55.4. I have the following two binds hl.bind(mainMod .. " + X", function()
local window = hl.get_active_window()
if window.class == whatsapp then
hl.dispatch(hl.dsp.exec_cmd("cat " .. emojipath .. "whatsapp/lol | tr -d '\n' | wl-copy && " .. paste_cmd))
end
end)
hl.bind(mainMod .. " + SHIFT + X", function()
local window = hl.get_active_window()
if window.class == whatsapp then
hl.dispatch(hl.dsp.exec_cmd("cat " .. emojipath .. "whatsapp/rofl | tr -d '\n' | wl-copy && " .. paste_cmd))
end
end)The first one always works. The second doesn't work unless I use the first one before it once, and then it keeps working unless I deselect the text field. Somehow it has to do with the SHIFT modifier, this temporarily breaks something with |
|
@Josse3 seems to be on to something with the suspicion that this is connected to Just tested using the default config with the latest commit ( hl.bind("SHIFT + A", hl.dsp.send_shortcut({mods = "", key = "B"}))
hl.bind("ALT + B", hl.dsp.send_shortcut({mods = "", key = "C"}))the first bind ( Then adding a manual hl.dispatch(hl.dsp.send_shortcut({mods = "", key = "B", window = "address:-1"}))
hl.bind("SHIFT + A", hl.dsp.send_shortcut({mods = "", key = "B"}))
hl.bind("ALT + B", hl.dsp.send_shortcut({mods = "", key = "C"}))Makes Note that adding that |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This is a bit of a weird one. Reproducible both from
0.55.2and342f5bd.After starting Hyprland, if I have a bind defined with multiple modifiers that trigger
send_shortcutorsend_key_state, like in this example:Then when I press
Super + Shift + LI get the error:?:?: send_shortcut: key not foundBut if I then run the exact same
send_shortcutorsend_key_statecall with hyprctl:This executes as expected, and then the defined
hl.bindbegins working as expected for the remainder of the hyprland session.All reactions