microsoft / microsoft/terminal
Make mouse wheel alternate scroll delta/length configurable
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Description of the new feature
When scrolling with the mouse wheel in an application that uses alternate mode (e.g., Less in Git Bash), Windows Terminal always scrolls by exactly one line per mouse wheel change. I would like to be able to configure the number of lines that Windows Terminal scrolls per mouse wheel change, at least for the vertical mouse wheel.
As said in #13187 (see [comment 1](https://github.com/microsoft/terminal/issues/13187#issuecomment-1155351777) and [comment 2](https://github.com/microsoft/terminal/issues/13187#issuecomment-1155361804)), other terminal emulators also allow the user to configure the delta. The default value can/should still be 1 to be backward-compatible to the current behavior.
### Proposed technical implementation details
I think this code would need to be changed:
https://github.com/microsoft/terminal/blob/83d0d9df1432592bc61ff04661cc8b58d6d4a6a5/src/terminal/input/mouseInput.cpp#L496-L526
It currently only sends a single up/down key press and would need to send multiple.
Contributor guide
Research direction
Start in src/terminal/input/mouseInput.cpp around the referenced lines and trace how alternate-mode vertical mouse-wheel input currently becomes a single key press. Determine how the scroll amount should be configured while preserving a default of 1. Done means alternate-mode vertical scrolling uses the configured number of lines and retains the current default behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100