[PR #15606] Properly filter focus events from the console API #30683

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

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

State: closed
Merged: Yes


This is an improved fix for #13238. Instead of handling focus events in
the TerminalInput::HandleKey function and the need to filter them
out depending on where they came from, we simply don't call HandleKey
in the first place. This makes the somewhat unreliable CameFromApi
function unnecessary and the code a bit more robust.

This change is required because CameFromApi is not representable
in a INPUT_RECORD and I'm getting rid of IInputEvent.

Validation Steps Performed

  • No [O when exiting nvim ✅
  • Mouse input in nvim works ✅
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15606 **State:** closed **Merged:** Yes --- This is an improved fix for #13238. Instead of handling focus events in the `TerminalInput::HandleKey` function and the need to filter them out depending on where they came from, we simply don't call `HandleKey` in the first place. This makes the somewhat unreliable `CameFromApi` function unnecessary and the code a bit more robust. This change is required because `CameFromApi` is not representable in a `INPUT_RECORD` and I'm getting rid of `IInputEvent`. ## Validation Steps Performed * No `[O` when exiting nvim ✅ * Mouse input in nvim works ✅
claunia added the pull-request label 2026-01-31 09:42:18 +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#30683