[PR #11306] [MERGED] Fix KeyChord constructor assertion failure during tab dragging #28486

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11306
Author: @lhecker
Created: 9/22/2021
Status: Merged
Merged: 9/22/2021
Merged by: @undefined

Base: mainHead: dev/lhecker/11076-keychord-assertion


📝 Commits (1)

  • 005de32 Fix KeyChord constructor assertion failure during tab dragging

📊 Changes

1 file changed (+21 additions, -12 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+21 -12)

📄 Description

For some weird reason we sometimes receive a WM_KEYDOWN
message without vkey or scanCode if a user drags a tab.
The KeyChord constructor has a debug assertion ensuring that all KeyChord
either have a valid vkey/scanCode. This is important, because this prevents
accidential insertion of invalid KeyChords into classes like ActionMap.

PR Checklist

Validation Steps Performed

  • Tab dragging doesn't produce assertion failures anymore ✔️

🔄 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/11306 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 9/22/2021 **Status:** ✅ Merged **Merged:** 9/22/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/11076-keychord-assertion` --- ### 📝 Commits (1) - [`005de32`](https://github.com/microsoft/terminal/commit/005de32e1054ab7ad6f876d0499e0876b92508bd) Fix KeyChord constructor assertion failure during tab dragging ### 📊 Changes **1 file changed** (+21 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+21 -12) </details> ### 📄 Description For some weird reason we sometimes receive a WM_KEYDOWN message without vkey or scanCode if a user drags a tab. The KeyChord constructor has a debug assertion ensuring that all KeyChord either have a valid vkey/scanCode. This is important, because this prevents accidential insertion of invalid KeyChords into classes like ActionMap. ## PR Checklist * [x] Closes #11076 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Tab dragging doesn't produce assertion failures anymore ✔️ --- <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:28:49 +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#28486