Replies: 2 comments 1 reply
|
So I was curious and went ahead and tested the dogfood implementation from Pimpmuckl#7, including a local build with the current ConPTY fallbacks from #1909 for Shift+Enter and Pimpmuckl/herdr#6 for Escape removed. Results:
This suggests a clearer boundary:
This leaves a fairly clean shape for the implementation: Native-record transport handles physical Windows input, while targeted fallbacks remain available for semantic input created through The Escape-specific ConPTY reconstruction should therefore become redundant as well as similar class of issues that might pop up in the future. The Shift+Enter fallback and the Kitty keyboard / |
Uh oh!
There was an error while loading. Please reload this page.
idea / problem
On Windows, Herdr receives the full native information for each physical key, but reduces it to a cross-platform key and modifiers before sending it through the rest of the application. When that input eventually reaches a native Windows application through ConPTY, Herdr has to reconstruct the original Windows key from less information than it started with.
That reconstruction is not always accurate. Escape and Shift+Enter have already needed narrow Windows-specific fixes, while, for example, Ctrl+Space can arrive as Ctrl+Shift+2 instead of the physical Space key. These look like separate key bugs, but they share the same underlying cause: Herdr discards the original Windows key information and later tries to guess it again.
The investigation and reproductions are tracked in #1929.
requested change
Keep the original Windows key record alongside Herdr's normal cross-platform interpretation while the key passes through the existing input and keybinding flow.
Herdr would continue using the cross-platform interpretation for its own keybindings. If a keybinding consumes the input, nothing is forwarded. Otherwise, when the destination is a normal Windows ConPTY pane, Herdr can forward the original record instead of reconstructing it. Kitty keyboard,
modifyOtherKeys, non-Windows panes, remote Windows-to-Unix input, and input created through the API would continue using the existing behavior.This should remain one input-routing path, with the native Windows record carried as additional information rather than introducing a separate Windows routing system or adding more key-specific mappings.
This change would only cover physical keys received by the Windows client. The
pane send-textEscape behavior from #1929 and Ctrl+Break are separate problems because they enter Herdr through different paths and should be handled separately.why you want this
Native Windows applications inside Herdr should receive the key the user actually pressed rather than Herdr's best reconstruction of it.
Fixing the point where that information is lost should address this class of ConPTY input problems once, instead of adding another special case whenever a modified key is found to behave differently. It also keeps the change Windows-specific and avoids changing key handling on Linux, macOS, or applications that already negotiate a richer keyboard protocol.
This should also enable a revert of the band-aid input-PRs for windows input wiring which seems like a good nice to have.
All reactions