Pass keyboard layout down to ConPTY and consider readding support for GetConsoleKeyboardLayoutName #22511

Open
opened 2026-01-31 08:15:30 +00:00 by claunia · 0 comments
Owner

Originally created by @lhecker on GitHub (Nov 6, 2024).

Description of the new feature

To help PowerShell with their ToUnicode usage we should pass down the keyboard layout to ConPTY so that their keyboard-layout hack works:
e87a265ef8/PSReadLine/PlatformWindows.cs (L1106-L1109)

To avoid the need for such a workaround, we should readd support for the existing GetConsoleKeyboardLayoutName function. There's not really a good reason to not support it. It's also used by vim and probably others so it may be quite helpful.

Proposed technical implementation details

No response

Originally created by @lhecker on GitHub (Nov 6, 2024). ### Description of the new feature To help PowerShell with their `ToUnicode` usage we should pass down the keyboard layout to ConPTY so that their keyboard-layout hack works: https://github.com/PowerShell/PSReadLine/blob/e87a265ef8d2c6c5498500deb155bf6258b34629/PSReadLine/PlatformWindows.cs#L1106-L1109 To avoid the need for such a workaround, we should readd support for the existing `GetConsoleKeyboardLayoutName` function. There's not really a good reason to not support it. It's also used by vim and probably others so it may be quite helpful. ### Proposed technical implementation details _No response_
claunia added the Product-ConhostIssue-TaskArea-ServerProduct-Conpty labels 2026-01-31 08:15:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22511