Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Window
»
The event subtype (sf::Mouse::Wheel::Horizontal) not working.
Print
Pages: [
1
]
Author
Topic: The event subtype (sf::Mouse::Wheel::Horizontal) not working. (Read 95 times)
0 Members and 1 Guest are viewing this topic.
MC1
Newbie
Posts: 4
The event subtype (sf::Mouse::Wheel::Horizontal) not working.
«
on:
February 17, 2026, 02:08:27 pm »
The event subtype (sf::Mouse::Wheel::Horizontal) doesn't work when using the condition:
else if (mouseWheelScrolled->wheel == sf::Mouse::Wheel::Horizontal)
std::cout << "The mouse wheel has been scrolled horizontally.\n";
Unlike when I use:
if (mouseWheelScrolled->wheel == sf::Mouse::Wheel::Vertical)
std::cout << "The mouse wheel has been scrolled vertically.\n";
It works just fine.
Note: I scroll the mouse wheel while pressing shift. My mouse supports it in other applications.
The version of SFML used: (3.0.2).
Logged
eXpl0it3r
SFML Team
Hero Member
Posts: 11296
Re: The event subtype (sf::Mouse::Wheel::Horizontal) not working.
«
Reply #1 on:
February 17, 2026, 03:21:45 pm »
If the mouse doesn't generate/emulate horizontal wheel events, then SFML won't actually provide such events.
Maybe the shift + horizontal wheel is just an application feature, which you'd have to implement yourself, if you like to support this.
Logged
Official FAQ:
https://www.sfml-dev.org/faq/
Official Discord Server:
https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog:
https://duerrenberger.dev/blog/
MC1
Newbie
Posts: 4
Re: The event subtype (sf::Mouse::Wheel::Horizontal) not working.
«
Reply #2 on:
February 17, 2026, 04:14:14 pm »
Okay, thank you for your help.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Window
»
The event subtype (sf::Mouse::Wheel::Horizontal) not working.
anything