[PR #12569] [MERGED] Add support for alternate scroll mode in Terminal #29111

Open
opened 2026-01-31 09:32:53 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/12569
Author: @zadjii-msft
Created: 2/24/2022
Status: ✅ Merged
Merged: 4/13/2022
Merged by: @undefined

Base: main ← Head: dev/migrie/b/3321-altscroll-in-terminal


📝 Commits (10+)

  • 83466a4 I think this is the conhost half of the changes
  • e94e08c This quite nearly implements everything for the Terminal half
  • dd702c7 Most of the remaining todos, comments
  • 1209fa4 one last comment
  • bf24cdd more comments are always good
  • 97029f6 Add support for alternate scroll mode in Terminal
  • dff1b94 spel
  • 60d2c2e fix tests
  • 54dc304 Stashing this for now. I think this does the save/restore cursor stuff that we're supposed to do when entering/exiting the alt buffer
  • 57094b7 start writing tests

📊 Changes

9 files changed (+57 additions, -9 deletions)

View changed files

📝 src/cascadia/TerminalControl/ControlCore.cpp (+5 -0)
📝 src/cascadia/TerminalControl/ControlCore.h (+1 -0)
📝 src/cascadia/TerminalControl/ControlInteractivity.cpp (+19 -2)
📝 src/cascadia/TerminalControl/ControlInteractivity.h (+1 -0)
📝 src/cascadia/TerminalCore/Terminal.cpp (+14 -0)
📝 src/cascadia/TerminalCore/Terminal.hpp (+1 -0)
📝 src/cascadia/TerminalCore/TerminalApi.cpp (+8 -0)
📝 src/terminal/input/mouseInput.cpp (+7 -6)
📝 src/terminal/input/terminalInput.hpp (+1 -1)

📄 Description

"Alternate scroll mode" is a neat little mode where the app wants mouse wheel events to come through as arrow keypresses instead, when in the alternate buffer. Now that we've got support for the alt buffer in the Terminal, we can support this as well.

Tested manually with

printf "\e[?1007h" ; man ps

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/12569 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 2/24/2022 **Status:** ✅ Merged **Merged:** 4/13/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/3321-altscroll-in-terminal` --- ### 📝 Commits (10+) - [`83466a4`](https://github.com/microsoft/terminal/commit/83466a4381f897e18a822ddc084ddd7d44872669) I think this is the conhost half of the changes - [`e94e08c`](https://github.com/microsoft/terminal/commit/e94e08c303cd60d86919426105ca3c81e2744221) This quite nearly implements everything for the Terminal half - [`dd702c7`](https://github.com/microsoft/terminal/commit/dd702c769dab6ae261e971ee76ac0530f5a60416) Most of the remaining todos, comments - [`1209fa4`](https://github.com/microsoft/terminal/commit/1209fa40c307be9d3856a8f7440ee654361e613d) one last comment - [`bf24cdd`](https://github.com/microsoft/terminal/commit/bf24cdd4b05091e151b2474f73390438c8f0c96c) more comments are always good - [`97029f6`](https://github.com/microsoft/terminal/commit/97029f64619806af32bbb4c933fad1e9ea47c0fd) Add support for alternate scroll mode in Terminal - [`dff1b94`](https://github.com/microsoft/terminal/commit/dff1b94016651324ad0a50f9bd32b27369deb684) spel - [`60d2c2e`](https://github.com/microsoft/terminal/commit/60d2c2e26dbfc9497fbb7f03045b3dc93123046a) fix tests - [`54dc304`](https://github.com/microsoft/terminal/commit/54dc30411c3c429308a15c7683e748fe3132b30d) Stashing this for now. I think this does the save/restore cursor stuff that we're supposed to do when entering/exiting the alt buffer - [`57094b7`](https://github.com/microsoft/terminal/commit/57094b7d98bad2e7c690692f2b03afc3a968ef01) start writing tests ### 📊 Changes **9 files changed** (+57 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+5 -0) 📝 `src/cascadia/TerminalControl/ControlCore.h` (+1 -0) 📝 `src/cascadia/TerminalControl/ControlInteractivity.cpp` (+19 -2) 📝 `src/cascadia/TerminalControl/ControlInteractivity.h` (+1 -0) 📝 `src/cascadia/TerminalCore/Terminal.cpp` (+14 -0) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+1 -0) 📝 `src/cascadia/TerminalCore/TerminalApi.cpp` (+8 -0) 📝 `src/terminal/input/mouseInput.cpp` (+7 -6) 📝 `src/terminal/input/terminalInput.hpp` (+1 -1) </details> ### 📄 Description "Alternate scroll mode" is a neat little mode where the app wants mouse wheel events to come through as arrow keypresses instead, when in the alternate buffer. Now that we've got support for the alt buffer in the Terminal, we can support this as well. * [x] Closes #3321 * [x] I work here * [ ] Tests would be nice Tested manually with ```bash printf "\e[?1007h" ; man ps ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:32:53 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#29111