Skip to content
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

feat(viewport): horizontal scroll with mouse wheel #761

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

UnseenBook
Copy link
Contributor

Add support for the events of a horizontal mouse wheel and when holding shift while using the regular mouse wheel now scrolls the screen left and right.

I chose to use the horizontalStep value instead of the MouseWheelDelta because it is already used for horizontal movement.

@UnseenBook UnseenBook requested a review from meowgorithm as a code owner March 26, 2025 10:16
Add support for the events of a horizontal mouse wheel and when holding
shift while using the regular mouse wheel now scrolls the screen left
and right.
@caarlos0 caarlos0 requested a review from Copilot March 28, 2025 13:56
@caarlos0 caarlos0 added the enhancement New feature or request label Mar 28, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for horizontal mouse wheel scrolling in the viewport module. The changes introduce new handling for horizontal scrolling events by using the existing horizontalStep value and by enabling horizontal scrolling when holding the shift key with the regular mouse wheel.

Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

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

I'll test this, but overall lgtm!

thanks!

@UnseenBook
Copy link
Contributor Author

Thanks for taking a look!
I had also opened a discussion about the topic in case it needs that.
#762

@caarlos0 caarlos0 merged commit ea344ab into charmbracelet:master Mar 28, 2025
11 checks passed
@caarlos0
Copy link
Member

cool! thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants