[PR #6461] Pass <Alt> to the application #26696

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

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

State: closed
Merged: Yes


For mysterious reasons lost to the sands of time, XAML will never pass
us a VK_MENU event. This is something that'll probably get fixed in
WinUI 3, but considering we're stuck on system XAML for the time being,
the only way to work around this bug is to pass the event through
manually. This change generalizes the F7 handler into a "direct key
event" handler that uses the same focus and tunneling method to send
different key events, and then uses it to send VK_MENU.

Validation Steps Performed

Opened the debug tap, verified that I was seeing alt key ups.
Also used some alt keybindings to make sure I didn't break them.

Closes #6421

**Original Pull Request:** https://github.com/microsoft/terminal/pull/6461 **State:** closed **Merged:** Yes --- For mysterious reasons lost to the sands of time, XAML will _never_ pass us a VK_MENU event. This is something that'll probably get fixed in WinUI 3, but considering we're stuck on system XAML for the time being, the only way to work around this bug is to pass the event through manually. This change generalizes the F7 handler into a "direct key event" handler that uses the same focus and tunneling method to send different key events, and then uses it to send VK_MENU. ## Validation Steps Performed Opened the debug tap, verified that I was seeing alt key ups. Also used some alt keybindings to make sure I didn't break them. Closes #6421
claunia added the pull-request label 2026-01-31 09:17:36 +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#26696