sway: bindsym to mouse button release doesn't work
- Sway Version: 1.4-a8a6ed66 (May 12 2020, branch ‘master’)
- Debug Log: https://gist.github.com/ChrisLane/a2891320775c0b3848856d2b2415eab3
- Configuration File: https://gist.github.com/ChrisLane/4bb153f74c320c6334cbeda12d6a35b2
(default +
bindsym --whole-window --release BTN_EXTRA notify-send "key released")
I’ve found that I am unable to bind to the release of mouse buttons.
Steps to reproduce:
- Bind command to spare mouse button with
bindsym --whole-window --release - Refresh config (same after restart too)
- Press mouse button that was bound
- Nothing happens
Additional info
- In my example I used the
BTN_EXTRAbutton, this was found vialibinput debug-events - Binding to the normal press of a mouse button works
- Binding to the release of a keyboard key works
About this issue
- Original URL
- State: open
- Created 7 years ago
- Reactions: 5
- Comments: 15 (6 by maintainers)
Commits related to this issue
- input: merge `seatop_down` into `seatop_default` This commit merges `seatop_down` into `seatop_default`, so that they can share binding state. Previously, bindings on button release would never activ... — committed to Xyene/sway by Xyene 6 years ago
- input: merge `seatop_down` into `seatop_default` This commit merges `seatop_down` into `seatop_default`, so that they can share binding state. Previously, bindings on button release would never activ... — committed to Xyene/sway by Xyene 6 years ago
- input: merge `seatop_down` into `seatop_default` This commit merges `seatop_down` into `seatop_default`, so that they can share binding state. Previously, bindings on button release would never activ... — committed to Xyene/sway by Xyene 6 years ago
- input: merge `seatop_down` into `seatop_default` This commit merges `seatop_down` into `seatop_default`, so that they can share binding state. Previously, bindings on button release would never activ... — committed to Xyene/sway by Xyene 6 years ago
@Xyene This issue seems to persists in version 1.5-e5913f81 on arch
I tried to do this:
both
wevandlibinput debug-eventsseem to register bothBTN_FORWARDevents, but the cursor release never seems to occur. I’ve tried mappingseat - cursor release button1to a separate key (without--release), which worked flawlesslyOK, I understand what’s going on now.
Release bindings are triggered only when the release hits
seatop_default. When clicking a window, the press goes throughseatop_default(and the press binding gets fired), before startingseatop_down.seatop_downreceives the eventual release event and resets toseatop_default, but since the release didn’t go throughseatop_default, the binding isn’t fired.Pressing and releasing on an empty workspace will trigger the release binding, since we never enter
seatop_downin that case – which is why I wasn’t able to reproduce it in https://github.com/swaywm/sway/issues/5333#issuecomment-646762263.