Skip to content

Fix inverted scrollwheel direction in keybinds - #14749

Merged
vaxerski merged 1 commit into
hyprwm:mainfrom
zjeffer:fix/zjeffer/inverted-scrollwheel
May 22, 2026
Merged

Fix inverted scrollwheel direction in keybinds#14749
vaxerski merged 1 commit into
hyprwm:mainfrom
zjeffer:fix/zjeffer/inverted-scrollwheel

Conversation

@zjeffer

@zjeffer zjeffer commented May 21, 2026

Copy link
Copy Markdown
Contributor

Describe your PR, what does it fix/add?

hl.bind("mouse_down", function ()
    hl.notification.create({text = "Mouse down", timeout = 1000})
end)
hl.bind("mouse_up", function ()
    hl.notification.create({text = "Mouse up", timeout = 1000})
end)

The above binds are an easy way to show the issue: when scrolling down, you'll see the "Mouse up" notification and vice versa. The if statement needs to be inverted.

Checking with wev, scrolling down yields:

[        15:      wl_pointer] axis: time: 14953488; axis: 0 (vertical), value: 15.000000

so a positive delta.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

This has been broken for 4 years (from its initial implementation in #265) so this might break some people's configs.

Is it ready for merging, or does it need work?

Ready. I didn't test it though but this seems pretty trivial.

@github-actions

Copy link
Copy Markdown

Hello and thank you for making a PR to Hyprland!

Please check the PR Guidelines and make sure your PR follows them.
It will make the entire review process faster. :)

If your code can be tested, please always add tests. See more here.

beep boop, I'm just a bot. A real human will review your PR soon.

@vaxerski vaxerski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one of the moments of all time

@vaxerski
vaxerski merged commit 342f5bd into hyprwm:main May 22, 2026
13 of 14 checks passed
@wabarTM

wabarTM commented May 22, 2026

Copy link
Copy Markdown

Probably worth mentioning in breaking changes tracker since this will break literally every config

@vaxerski

Copy link
Copy Markdown
Member

well no it will fix every cofig that used mosue_ to bind anything, I doubt many do tbh

@zjeffer
zjeffer deleted the fix/zjeffer/inverted-scrollwheel branch May 22, 2026 20:37
ItsOhen pushed a commit to ItsOhen/Hyprland that referenced this pull request Jun 1, 2026
Kitty-Hivens added a commit to Kitty-Hivens/YukiUI that referenced this pull request Jul 20, 2026
Hyprland 0.56.0 corrects a long-standing inversion where mouse_up/mouse_down in keybinds fired on the opposite physical wheel direction (hyprwm/Hyprland#14749). That flipped Super+scroll workspace focus and Super+Shift/Alt+scroll window-move relative to the wheel.

Swap the bind prefixes so scroll-down again lands on the next workspace.
@rakibdev

rakibdev commented Jul 21, 2026

Copy link
Copy Markdown

it broke everything. lost my job, family

lwestlund added a commit to lwestlund/dotfiles that referenced this pull request Jul 23, 2026
RayJameson added a commit to RayJameson/dotfiles that referenced this pull request Jul 24, 2026
alonso-herreros added a commit to alonso-herreros/dotfiles that referenced this pull request Aug 3, 2026
Since hyprwm/Hyprland#14749 mouse_up and
mouse_down have been swapped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants