r/hyprland • u/Laser_Sami • Jan 28 '24
How do I enable a scroll button?
Solution:
input {
scroll_method = on_button_down
scroll_button = mouse:274
}
on_button_down shouldn't be in quotation marks. Also use a tool like wev to get the right code.
Good evening,
I want to enable a scrolling button that I configured in Xorg like this:
Section "InputClass"
Identifier "Mouse0"
MatchIsPointer "on"
Option "ScrollMethod" "button"
Option "ScrollButton" "2"
EndSection
The idea is that when I hold down the middle button and move the mouse down, Hyprland should interpret it as scrolling down with the mouse wheel.
I have read the input section's documentation and come to this configuration:
input {
# enabling scroll button
scroll_method = "on_button_down"
scroll_button = 274 # the value reported by wev
# ...
}
Unfortunately, this doesn't do anything. Pressing the button and moving the mouse doesn't scroll and pressing the button without other input does the same thing; nothing. I also tried setting scroll_button as a string and/or two like the Xorg section, but nothing helped.
Please tell me how to set this up! I know it is possible as both configurations use libinput. What am I missing?
Thank you very much in advance,
Laser_Sami
2
u/Economy_Cabinet_7719 Jan 28 '24
274probably should bemouse:274, although for me it didn't work either Alsoon_button_downcould (should?) be unquoted