-
Notifications
You must be signed in to change notification settings - Fork 8.7k
Add support for horizontal mouse wheel events #19248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
e326ed1
to
90a82d4
Compare
This adds support for horizontal mouse wheel events (WM_MOUSEHWHEEL). With this change, applications running in the terminal can now receive and respond to horizontal scroll inputs from the mouse/trackpad. Fixes: microsoft#19245
90a82d4
to
b9cfb5a
Compare
b9cfb5a
to
cc95e48
Compare
case WM_MOUSEHWHEEL: | ||
if (delta > 0) | ||
{ | ||
return MakeOutput(_keyMap.at(VK_LEFT)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, that's really cool actually. alternate scroll does this?
winrt::Microsoft::Terminal::Core::Point wheelDelta{ 0, static_cast<int32_t>(HIWORD(wparam)) }; | ||
if (message == WM_MOUSEHWHEEL) | ||
{ | ||
wheelDelta.X = wheelDelta.Y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you want to get too clever, you can probably std::swap(wheelDelta.X, wheelDelta.Y)
Summary of the Pull Request
This adds support for horizontal mouse wheel events (WM_MOUSEHWHEEL). With this change, applications running in the terminal can now receive and respond to horizontal scroll inputs from the mouse/trackpad.
References and Relevant Issues
Closes #19245
Closes #10329
Validation Steps Performed
Tested terminal applications that receive horizontal mouse wheel events.
PR Checklist