Open tmccombs opened 2 years ago
In sway 1.8, it appears that what I had above no longer works. In fact, it seams like seat - cursor press button4
and similar don't seem to work at all.
In sway 1.8.1 scroll bindings don't work
Or maybe add an option to ignore modifier keys for a bindsym, but continue using the modifier for buttons triggered as a result.
Fwiw, Hyprland has a bindi command that does this.
Although, since you can't bind to scroll events anymore, that wouldn't be sufficient.
Also worth pointing out this is possible in X with xinput set-button-map
Unfortunately, I don't think it is possible to work around this with udev rules either, as described in https://github.com/swaywm/sway/issues/3960#issuecomment-2068083432. Because in udev at least scroll events aren't key presses, they are EV_REL events, which as far as I can tell can't be mapped to a different event.
I tried this:
bindsym --whole-window {
button6 seat - cursor press button4
button7 seat - cursor press button5
}
which consistently kept crashing sway whenever I scrolled for a random amount of time:
2024-05-07 06:49:23 - [swaybg-1.2.1/main.c:282] Found config * for output eDP-1 (BOE 0x09B6)
sway: types/seat/wlr_seat_pointer.c:332: wlr_seat_pointer_send_axis: Assertion `wlr_seat->pointer_state.cached_axis_source == source' failed.
(btw also note the inconsistency of quoting: backtick for beginning of expression and quote for end. Is this really the normal assert()
behaviour?)
Originally I also had seat - cursor press SHIFT_LEFT
because I wanted to map horizontal scroll to shift scroll for gimp and other apps, but that also did nothing. Though at least no crashes were happening at that point.
I would like to swap vertical and horizontal scroll (so that using my vertical scroll wheel scrolls horizontally and vice versa).
It's sort of possible to do this with config like:
However, this doesn't work if a modifier key (such as shift) is pushed down. And having to add additional bindsyms for each modifier is a little much.
It would be nice if there was a specific option for swapping the axes. Or maybe add an option to ignore modifier keys for a bindsym, but continue using the modifier for buttons triggered as a result.