Hl.dsp.exec_cmd bound keys intermittently stop firing, requires repeated key presses to "unstick"

Hyprland version
Hyprland 0.56.1 built from branch v0.56.1 at commit 5c9377c15f85c50648f35ca5a213754f95b93ca0 clean (version: bump to 0.56.1).
Date: Mon Jul 27 16:33:49 2026
Tag: v0.56.1, commits: 7643

Libraries:
Hyprgraphics: built against 0.5.1, system has 0.5.1
Hyprutils: built against 0.14.0, system has 0.14.1
Hyprcursor: built against 0.1.13, system has 0.1.13
Hyprlang: built against 0.6.8, system has 0.6.8
Aquamarine: built against 0.14.0, system has 0.14.0

Version ABI string: 5c9377c15f85c50648f35ca5a213754f95b93ca0_aq_0.14_hu_0.14_hg_0.5_hc_0.1_hlg_0.6
no flags were set

Describe your issue / feature…

snippet:

hl.bind("F2", hl.dsp.exec_cmd("pamixer -d 2"), { locked = false, repeating = false })
hl.bind("F3", hl.dsp.exec_cmd("pamixer -i 2"), { locked = false, repeating = false })

Bug:

Pressing F2/F3 to adjust the volume works normally most of the time, but intermittently and unpredictably the bind stops doing anything, the command inside exec_cmd simply doesn’t run on keypress. There’s no crash and no visible error. The only way to recover is to hold the key down or spam-press it or whatever until it “unsticks” and starts responding again, this is SO annoying, i have tried everything to fix this.

I have had this issue or bug or whatever for a long time. PLEASE HELP.

I suffered the same. My guess is that there is some sort of race condition with the continuous keypress to increase/decrease volume.

So I ended up with the following

hl.bind(“XF86AudioRaiseVolume”, hl.dsp.exec_cmd(“wpctl set-volume -l 1.0 @DEFAULT_AUDIO_SINK@ 2%+”), { locked = true }) – adding repeating = true scales volume up uncontrollably

hl.bind(“XF86AudioLowerVolume”, hl.dsp.exec_cmd(“wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-”), { locked = true })

hl.bind(“XF86AudioMute”, hl.dsp.exec_cmd(“wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle”), { locked = true, repeating = true })

The setback is that you have to press/release the bind to achieve the targeted sound level.

Works for me.