-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 win32-input-mode for more complete key support on Windows #2357
Comments
@zadjii-msft am I reading microsoft/terminal#6309 right in that you just have a separate mode that when enabled passes all input over the Windows Console API instead of via VT text (and using |
Sort of. If you enable that mode, then we'll accept input to conpty in I never really got around to documenting this super well. The best example is at https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md. IIRC we also did hide this behind a conpty flag so a Terminal that wanted to do this would have to explicitly opt-in. If you're interested at taking a swing at doing this on the xterm.js side, I can help as best I can |
Ah I see thanks, so when |
I ran into this recently. It's actually really hard to create PowerShell bindings that also work in xterm. Here are the results from trying to bind the period key on a US keyboard:
In the case of the vscode if you want to retain mnemonics in terminal editors there are literally no valid bindings with the period key. |
@akbyrd fyi vscode actually has special logic in shell integration to enable these keybindings in pwsh:
We should be able to support these if we know what xterm sends
|
That makes sense. I just encountered the Ctrl+Backspace weirdness. vscode sends Ctrl+W instead, and if you have that bound to something else, say Exit-Shell, you get a surprise.
Well yea, but I want mnemonics to work. I use terminal editors and it feels weird to have to switch to another editor to be able to open a folder. Side note, the implementation for that is unnecessarily conservative. I can bind e.g. Alt+. in vscode and not lose the ability to open the file menu with Alt+F. But in the terminal once that setting is on every Alt and Ctrl+Alt combo skips the terminal, regardless of whether it's actually a mnemonic. |
If you have a keybinding setup for alt+. it should work: So you could use this to get the behavior you're after before alt+. is supported properly in xterm.js: { "key": "alt+.", "command": "workbench.action.terminal.sendSequence", "args": { "text": "whatever alt+. sends" } } |
If/when conpty supports this then it could get PSReadline keybindings working, see microsoft/terminal#879
The text was updated successfully, but these errors were encountered: