[PR #12260] Add a keyboard shortcut handler to the TabRowControl #28938

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

Original Pull Request: https://github.com/microsoft/terminal/pull/12260

State: closed
Merged: Yes


This makes the scenario mentioned in #8480 work. It's maybe not as holistic a solution as we'd like, but it definitely works.

Tested both with Narrator, and using the TabView scroll handles to get tab focus into the tab row manually

  • Closing the active tab with Ctrl+Shift+w works (not the TabViewItem that has focus, but that's how Edgium works so that seems fine)
  • Opening a tab with Ctrl+Shift+t works
  • Opening the cmdpal with Ctrl+Shift+p works
  • Will take care of #8480 once we get the a11y team to validate
  • I work here

Notes:

None of

PreviewKeyDown="_KeyDownHandler"
KeyDown="_KeyDownHandler"
KeyUp="_KeyDownHandler"

On the TerminalPage directly seem to fire when the focus is in the TabViewItem or the New Tab flyout. But they fire just fine when focus is in the TermControl. Interesting, because you'd think that the TermControl would have already handled the key...

**Original Pull Request:** https://github.com/microsoft/terminal/pull/12260 **State:** closed **Merged:** Yes --- This makes the scenario mentioned in #8480 work. It's maybe not as holistic a solution as we'd like, but it definitely works. Tested both with Narrator, and using the TabView scroll handles to get tab focus into the tab row manually * [x] Closing the _active_ tab with <kbd>Ctrl+Shift+w</kbd> works (not the `TabViewItem` that has focus, but that's how Edgium works so that seems fine) * [x] Opening a tab with <kbd>Ctrl+Shift+t</kbd> works * [x] Opening the cmdpal with <kbd>Ctrl+Shift+p</kbd> works * [x] Will take care of #8480 once we get the a11y team to validate * [x] I work here #### Notes: None of ```xaml PreviewKeyDown="_KeyDownHandler" KeyDown="_KeyDownHandler" KeyUp="_KeyDownHandler" ``` On the TerminalPage directly seem to fire when the focus is in the `TabViewItem` or the New Tab flyout. But they fire just fine when focus is in the `TermControl`. Interesting, because you'd think that the `TermControl` would have already handled the key...
claunia added the pull-request label 2026-01-31 09:31:45 +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#28938