microsoft / microsoft/terminal
Add mouse navigation button support for actions
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
# Description of the new feature/enhancement
Follow-up on #10801: the added `browser_back` and `_forward` keys are the keyboard keys, not the mouse buttons. It might be nice to add support for these buttons as well, usually they are `VK_XBUTTON1` and `VK_XBUTTON2`.
# Proposed technical implementation details (optional)
The implementation will be a bit more complicated than just adding the key definitions, as now the mouse handlers should also check for keychord bindings. My proposal would be to add this to `TermControl::_PointerPressedHandler`. This would limit the support to when hovering the terminal control, so that might not be ideal. I am not sure what is actually desirable here.
Things to consider:
- Add support for "just" XBUTTON1/2, or also for other buttons?
- What should the textual representation of these buttons be? Make them coincide with `browser_back` and `_forward`, or separate names `mouse_back` and `_forward`?
- How do mouses with more macro buttons operate?
Contributor guide
Research direction
Start by reviewing the related issue #10801 and the proposed TermControl::_PointerPressedHandler entry point. Determine the desired scope for VK_XBUTTON1/VK_XBUTTON2, naming, keychord handling, and additional mouse buttons before identifying the relevant tests or acceptance criteria; the issue is done when the agreed mouse-button behavior is implemented and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100