Terminal: Powershell: Ctrl-Alt-? does not work in Windows Terminal

Created on 5 Oct 2019  ·  6Comments  ·  Source: microsoft/terminal

Environment

Windows build number: 10.0.18362.388
Windows Terminal version (if applicable): 0.5.2762.0

Powershell version:
PSVersion                      5.1.18362.145                                                                           
PSEdition                      Desktop                                                                                  PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}       
BuildVersion                   10.0.18362.145                                                                       
CLRVersion                     4.0.30319.42000                                                                          
WSManStackVersion              3.0                                                                                      
PSRemotingProtocolVersion      2.3                                                                                      
SerializationVersion           1.1.0.1              

Steps to reproduce

  • Open Powershell tab
  • Press Ctrl-Alt-? (Ctrl-Alt-Shift-/)

Expected behavior

it should display Powershell existing key binding
Basic editing functions

=======================
Enter            AcceptLine         Accept the input or move to the next line if input is missing a closing token.
Shift+Enter      AddLine            Move the cursor to the next line without attempting to execute the input
Backspace        BackwardDeleteChar Delete the character before the cursor
Ctrl+h           BackwardDeleteChar Delete the character before the cursor
Ctrl+Home        BackwardDeleteLine Delete text from the cursor to the start of the line
Ctrl+Backspace   BackwardKillWord   Move the text from the start of the current or previous word to the cursor to th...
Ctrl+C           Copy               Copy selected region to the system clipboard.  If no region is selected, copy th...
Ctrl+c           CopyOrCancelLine   Either copy selected text to the clipboard, or if no text is selected, cancel ed...
Ctrl+x           Cut                Delete selected region placing deleted text in the system clipboard

Actual behavior

it displays weird characters:
^_

Area-Input Area-TerminalControl Issue-Bug Priority-2 Product-Terminal Resolution-Fix-Committed v1-Scrubbed

All 6 comments

Interesting. We transmit Ctrl+Alt+Shift+/ the same way we transmit Ctrl+/. That's not right.

That is: for both of them, we send , U+001F UNIT SEPARATOR. Just as a note, though, for all keyboardable characters the Ctrl+Shift and Ctrl chords produce the same values (by design).

Just as a note, though, for all keyboardable characters the Ctrl+Shift and Ctrl chords produce the same values (by design).

What is the reason behind this? Probably that's why the Far manager is unusable in Windows Terminal: ctrl+1,..., ctrl+0 seems to not work properly.

Sadly, #4947 does _not_ fix this issue. This is actually a subset of the problems in #879.

Now, ctrl+alt+? falls into the #879 category of keys. We can't differentiate between that and Alt+Bksp, but that's probably okay.

There still looks to be a problem with this.

Using CTRL+ALT+0 on AZERTY keyboard correctly types @ Same goes for { [ | \ ^ ] } (

However, it processes CTRL+[tab_number] before CTRL+SHIFT+[key], leading to tab switching.

For example, if you have 3 opened tabs and you try to use CTRL+ALT+3 for #, it goes to 3rd tab (caught as CTRL+3). And nothing is typed. Of course, it's not common to get # with that combination, because Alt. Gr. key is close to the right hand, but it's common that we type CTRL+TAB+7 for orCTRL+TAB+8for`. And if you have 7 or 8 opened tabs, it's caught as CTRL+7 and CTRL+8.

Interestingly, deadkeys kinda go through, as CTRL+ALT+2 (~) first goes to 2nd tab but still does its job if you press another key after it. So it works on 2nd tab 🤪

:tada:This issue was addressed in #6309, which has now been successfully released as Windows Terminal Preview v1.1.1671.0.:tada:

Handy links:

Was this page helpful?
0 / 5 - 0 ratings