Skip to content
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

Pressing ctrl + : on a JIS-106 keyboard sends ^Z (was: editor (vim, emacs) will stop when push ctrl + :) #11700

Closed
hkak03key opened this issue Nov 6, 2021 · 5 comments · Fixed by #16511
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Milestone

Comments

@hkak03key
Copy link

hkak03key commented Nov 6, 2021

Windows Terminal version (or Windows build number)

10.0.19043.1288, 1.11.2921.0

Other Software

(maybe) all editor (checked about vim, emacs, nano)

Steps to reproduce

  1. open terminal as wsl.exe
  2. open editor (for example vim) on terminal
  3. push ctrl + :

Expected Behavior

(nothing)

Actual Behavior

  • the editor stopped.
    • display [1]+ Stopped vim if vim

appendix

I found WCHAN of the prosess is do_signal_stop .
so ctrl + : will fire SIGSTOP (?) .

append (2021-11-07 22:00 +9:00)

I have found that pushing ctrl + : is interpreted as pushing ctrl + z so editor will stop.
but I don't see yet why this is so, where this key binding is configured.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 6, 2021
@zadjii-msft
Copy link
Member

I have found that pushing ctrl + : is interpreted as pushing ctrl + z so editor will stop.

Weird. The Terminal certainly isn't binding that key be default. I wonder what in the stack is changing that.

  • What keyboard layout are you using?
  • Are you using an IME for keyboard input?
  • Could you grab a debug tap trace of you pressing ctrl+:? That might clue us in to the physical keypresses the Terminal is receiving.

@zadjii-msft zadjii-msft added Area-Input Related to input processing (key presses, mouse, etc.) Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels Nov 8, 2021
@hkak03key
Copy link
Author

@zadjii-msft
Thank you for your reply.

keyboard layout

106/109 JIS. This is suspicious...

IME

Google IME.
but I have got same result in Microsoft IME.

debug tap

I have got as follow output:

␛[17;29;0;1;8;1_␛[186;40;0;1;8;1_␛[?25l␛[65;159H^Z␍␊␛[186C␛[?2004l␛[?1l␛>␛[>4;m␛[23;0;0t␛[32m␛[1m␛[Hhikaru@DESKTOP-WIN10PRO␛[m:␛[34m␛[1m/mnt/c/Users/Hikaru␛[m$␣vim␛[K␍␊␛[K␍␊[1]+␣␣Stopped␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣vim␛[K␛[32m␛[1m␍␊hikaru@DESKTOP-WIN10PRO␛[m:␛[34m␛[1m/mnt/c/Users/Hikaru␛[m$␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␛[4;46H␛[?25h␛[186;40;0;0;8;1_␛[17;29;0;0;0;1_

and I have checked the output in the case pushing ctrl+z on vim:

␛[17;29;0;1;8;1_␛[186;40;0;1;8;1_␛[?25l␛[65;159H^Z␛[?2004l␛[?1l␛>␛[>4;m␛[23;0;0t␍␊␛[32m␛[1m␛[Hhikaru@DESKTOP-WIN10PRO␛[m:␛[34m␛[1m/mnt/c/Users/Hikaru␛[m$␣vim␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␍␊␛[K␛[2;1H␛[?25h␍␊[1]+␣␣Stopped␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣vim␛[32m␛[1m␍␊hikaru@DESKTOP-WIN10PRO␛[m:␛[34m␛[1m/mnt/c/Users/Hikaru␛[m$␣␛[186;40;0;0;8;1_␛[17;29;0;0;0;1_


btw, do you reproduce this trouble on your env?

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Nov 8, 2021
@zadjii-msft
Copy link
Member

do you reproduce this trouble on your env

nope.

Relevant input is:

␛[17;29;0;1;8;1_␛[186;40;0;1;8;1_
...
␛[186;40;0;0;8;1_␛[17;29;0;0;0;1_

Those break down as follows. I'm using this as my reference for what the JIS keyboard layout looks like. I couldn't find anything better

  • ␛[17;29;0;1;8;1_
    • vk: 17 = VK_CONTROL
    • sc: 29 = 0x1d = control, that looks right
    • char: null
    • key down
    • mod: 8 = LEFT_CTRL_PRESSED
    • repeat: 1
  • ␛[186;40;0;0;8;1_
    • vk: 186 = VK_OEM_1, "For the US standard keyboard, the ';:' key"
    • sc: 40 = 0x28 = OEM_7, which is definitely unexpected, but still, that's '" on the map I found
    • char: null
    • key down
    • mod: 8 = LEFT_CTRL_PRESSED
    • repeat: 1
  • ␛[186;40;0;0;8;1_
    • vk: 186 = VK_OEM_1, "For the US standard keyboard, the ';:' key"
    • char: null
    • key up
    • mod: 8 = LEFT_CTRL_PRESSED
  • ␛[17;29;0;0;0;1_
    • vk: 17 = VK_CONTROL
    • key up
    • mod: 0 = none

So, I don't know why the console would be translating LEFT_CTRL_PRESSED + VK_OEM_1 into ^Z. That shouldn't happen.

Just to make sure nothing else weird is going on, can you try showkey -a in WSL? Should look something like:
image

Interestingly, I'm not getting any key for ctrl+:. Like, that's just showing up as a singular ^[ in the input. Lemme go dig out a gnome-terminal and see what that does...

@zadjii-msft
Copy link
Member

Okay in gnome-terminal ctrl+: at least sends :, so we should probably be doing at least that.
image

@zadjii-msft zadjii-msft added Area-VT Virtual Terminal sequence support Help Wanted We encourage anyone to jump in on these. Issue-Bug It either shouldn't be doing this or needs an investigation. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. labels Nov 8, 2021
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Nov 8, 2021
@zadjii-msft zadjii-msft added this to the Terminal v2.0 milestone Nov 8, 2021
@zadjii-msft zadjii-msft added the Priority-2 A description (P2) label Nov 8, 2021
@hkak03key
Copy link
Author

do you reproduce this trouble on your env

nope.

oh...

break down

Thank you for research and I have found some difference:
I'm using 106 keyboard so we should reference https://kbdlayout.info/kbd106/virtualkeys .
and, VK_OEM_1 is mapping as : .

showkey -a

wsl on windows terminal: I got ^Z 26 0032 0x1a .
but, wsl directly: I didn't get anything.
Too mysterious!!!

@zadjii-msft zadjii-msft modified the milestones: Terminal v2.0, 22H2 Jan 4, 2022
@zadjii-msft zadjii-msft changed the title editor (vim, emacs) will stop when push ctrl + : Pressing ctrl + : on a JIS-106 keyboard sends ^Z (was: editor (vim, emacs) will stop when push ctrl + :) Sep 9, 2022
@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Sep 9, 2022
@zadjii-msft zadjii-msft modified the milestones: 22H2, Backlog Jul 5, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the In-PR This issue has a related PR label Dec 31, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Help Wanted We encourage anyone to jump in on these. In-PR This issue has a related PR Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants