-
-
Notifications
You must be signed in to change notification settings - Fork 833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for win32-input-mode #1509
Comments
…ut-mode This is a baby step that formalizes the different encoding schemes into an enum, and hooks up the decset sequence for win32-input-mode. It doesn't change any of the actual encoding at this time. refs: #1509
Nothing generates them right now, and the mux client has no way to represent them on the wire. I'm considering constraining them to just win32 for now. refs: #1509
This commit causes the terminal to emit win32-input-mode encoded key up and down events for a limited subset of keys When win32-input-mode is enabled. We limit them to keys where we know the VK key code equivalent, and where those keys are either not representable (eg: modifier only key events), or may generate ambiguous output (eg: CTRL-SPACE in different keyboard layouts). However, in my experiments, modifier only key presses confuse powershell and cause it to emit `@`, so I've disabled that in the code for now. refs: #318 refs: #1509 refs: #1510
This is now implemented in the nightly, with restrictions: only for ambiguous or modifier only keys, which are the ones where this makes the most sense anyway. |
I can confirm holding modifier keys seems to work fine on nigthtly |
We need 100% of the info for it to work correctly, so this commit: * Exposes the keyboard encoding mode via the Pane trait * Adds the scan code to the RawKeyEvent * Has the GUI perform the encoding if the keyboard is set that way * Removes the basic encoder from termwiz in favor of the gui level one The net result is that we bypass the Pane::key_up/Pane::key_down methods in almost all cases when the encoding mode is set to win32-input-mode. There is now a config option: allow_win32_input_mode that can be used to prevent using this mode. refs: #1509
@DHowett: first bug report about this is: with W32IM enabled in a cmd or pwsh, CTRL+key works correctly. If that session then runs wsl.exe the CTRL modifier is lost, so CTRL-C just sends C, CTRL-L is just L and so on. This is what wezterm is sending in; the
|
Our last update was more than 6 months ago. refs: #1509
Until we can figure out why running wsl breaks CTRL modifiers! refs: #1509
@nico-abram heads up: I turned off |
refs: microsoft/terminal#13134 refs: #1904 refs: #1509 refs: #2009
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
As mentioned in #318 (comment) VT sequences cannot send everything that windows console programs expect (Encoded as win32 INPUT_RECORD's). That issue is about a very specific issue, so I'm opening this one to track support for the propietary
win32-input-mode
as described in https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.mdLike wez mentioned in this comment xtermjs/xterm.js#2357 may have some useful comments.
The specific issue I'm having that makes me interested in this is the "Modifier keys are not properly propagated to applications on windows" (documented well for WT here, and more specifically with far manager as mentioned here) listed in the document, but I imagine eventually users with all the problems mentioned in the abstract will show up.
Here are the alternatives I can think of:
The text was updated successfully, but these errors were encountered: