Add mouse navigation button support for actions #14697

Open
opened 2026-01-31 04:17:11 +00:00 by claunia · 2 comments
Owner

Originally created by @FWest98 on GitHub (Jul 27, 2021).

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?
Originally created by @FWest98 on GitHub (Jul 27, 2021). <!-- 🚨🚨🚨🚨🚨🚨🚨🚨🚨🚨 I ACKNOWLEDGE THE FOLLOWING BEFORE PROCEEDING: 1. If I delete this entire template and go my own path, the core team may close my issue without further explanation or engagement. 2. If I list multiple bugs/concerns in this one issue, the core team may close my issue without further explanation or engagement. 3. If I write an issue that has many duplicates, the core team may close my issue without further explanation or engagement (and without necessarily spending time to find the exact duplicate ID number). 4. If I leave the title incomplete when filing the issue, the core team may close my issue without further explanation or engagement. 5. If I file something completely blank in the body, the core team may close my issue without further explanation or engagement. All good? Then proceed! --> # 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?
claunia added the Issue-TaskProduct-TerminalArea-TerminalControl labels 2026-01-31 04:17:11 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Aug 5, 2021):

Team decision: We're cool with these being allowed as keys in actions _if they come through as keys in PreviewKeyDown, where keybindings are processed. In 1.11, we thought you might just be able to get away with vk(5) (for VK_XBUTTON1 for example).

However, our cursory investigation makes us think that these don't come through as keys. This might be better off being dealt with by #1553. Probably as a sub-task of the bigger feature over there.

Thanks!

@zadjii-msft commented on GitHub (Aug 5, 2021): Team decision: We're cool with these being allowed as `keys` in actions _if they come through as keys in `PreviewKeyDown`, where keybindings are processed. In 1.11, we thought you might just be able to get away with `vk(5)` (for `VK_XBUTTON1` for example). However, our cursory investigation makes us think that these _don't_ come through as _keys_. This might be better off being dealt with by #1553. Probably as a sub-task of the bigger feature over there. Thanks!
Author
Owner

@FWest98 commented on GitHub (Aug 5, 2021):

I tried myself by adding these VK_XBUTTON1 entries, but those are not registered through any KeyDown or similar methods. I think it would be much neater to combine it with the issue you linked indeed.

@FWest98 commented on GitHub (Aug 5, 2021): I tried myself by adding these `VK_XBUTTON1` entries, but those are not registered through any KeyDown or similar methods. I think it would be much neater to combine it with the issue you linked indeed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14697