I'm using a German keyboard. On German keyboards, some characters have been turfed to an indirection with the right Alt key, labeled AltGr (I think English keyboards label that one simply Alt as well, just like the left one).
I'm accessing my workstation which is under my desk at work from my home office via a Virtual Client from which I perform a remote desktop login (yes, two indirections). That works surprisingly well but may have to do with my issue. Unfortunately I cannot try the directly attached keyboard now.
Suddenly, these characters stopped working properly in mintty. This happened around the time I updated the remote machine I log into to Windows 10 22H2. The bizarre thing is that the characters stopped working in an ancient cygwin installation as well as in a recently updated msys2 installation, so it is probably not a mintty upgrade issue. And yet it must be related to mintty because other programs, as well as a cygwin bash in a console Window, react to the keystrokes without any issue. This means that we can exclude the home keyboard as well as the settings for keyboard and language on any of the three machines involved. I also renamed .inputrc, .minttyrc and .bashrc to check that none of my customizations is involved, to no avail.
Each of the keys has a slightly different effect. I use Ctrl-V to display the raw character sequences arriving from every key press:
- {: Displays nothing but erases the line input and jumps to column 1 (that means, I think, that the key emits a character sequence which is only partially digested by Ctrl-V so that the rest is interpreted as a control sequence by the terminal).
- [: Displays ^[
- ]: Displays ^]
- }: Displays ^[[1;7p
- : Displays ^\
As I said, Windows programs and a bash console work just fine.
I traced the windows events with the visual studio tool spyxx_amd64. Here is the trace for mintty with the backslash. I press AltGR and hold. This continuously sends the two events for VK_MENU VK_CONTROL, alternating (I only show the last ones preceding the actual \ keystroke). Then I quickly press and release \ while continuing to hold AltGr, then continue to hold AltGr. Curiously, no events are sent any longer when I continue to hold AltGr.
<001568> 0000000000110DBE P WM_KEYDOWN nVirtKey:VK_MENU cRepeat:1 ScanCode:38 fExtended:1 fAltDown:1 fRepeat:1 fUp:0<001569> 0000000000110DBE P WM_KEYDOW||N nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:1 fRepeat:1 fUp:0<001570> 0000000000110DBE P WM_KEYDOWN nVirtKey:VK_MENU cRepeat:1 ScanCode:38 fExtended:1 fAltDown:1 fRepeat:1 fUp:0<001571> 0000000000110DBE P WM_KEYDOWN nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:1 fRepeat:1 fUp:0<001572> 0000000000110DBE P WM_KEYDOWN nVirtKey:VK_OEM_4 cRepeat:1 ScanCode:0C fExtended:0 fAltDown:1 fRepeat:0 fUp:0<001573> 0000000000110DBE P WM_KEYUP nVirtKey:VK_OEM_4 cRepeat:1 ScanCode:0C fExtended:0 fAltDown:1 fRepeat:1 fUp:1<001574> 0000000000110DBE P WM_SYSKEYUP nVirtKey:VK_MENU cRepeat:1 ScanCode:38 fExtended:1 fAltDown:0 fRepeat:1 fUp:1<001575> 0000000000110DBE P WM_KEYUP nVirtKey:VK_CONTROL cRepeat:1 ScanCode:1D fExtended:0 fAltDown:0 fRepeat:1 fUp:1
Any ideas?