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

Closed
opened 2026-01-31 04:48:38 +00:00 by claunia · 5 comments
Owner

Originally created by @hkak03key on GitHub (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.

Originally created by @hkak03key on GitHub (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.
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2021):

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 commented on GitHub (Nov 8, 2021): > 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](https://github.com/microsoft/terminal/wiki/Enabling-the-debug-tap) trace of you pressing <kbd>ctrl+:</kbd>? That might clue us in to the physical keypresses the Terminal is receiving.
Author
Owner

@hkak03key commented on GitHub (Nov 8, 2021):

@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?

@hkak03key commented on GitHub (Nov 8, 2021): @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?
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2021):

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 commented on GitHub (Nov 8, 2021): > 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](https://kbdlayout.info/kbdjpn) 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](https://user-images.githubusercontent.com/18356694/140753882-f8ab0a68-7155-4d81-8ee4-02520fef9dda.png) Interestingly, I'm not getting _any_ key for <kbd>ctrl+:</kbd>. Like, that's just showing up as a singular `^[` in the input. Lemme go dig out a gnome-terminal and see what that does...
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2021):

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

@zadjii-msft commented on GitHub (Nov 8, 2021): Okay in gnome-terminal <kbd>ctrl+:</kbd> at least sends `:`, so we should probably be doing at least that. ![image](https://user-images.githubusercontent.com/18356694/140757330-e30599ea-f889-438d-b404-fea18770272c.png)
Author
Owner

@hkak03key commented on GitHub (Nov 8, 2021):

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!!!

@hkak03key commented on GitHub (Nov 8, 2021): > > 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!!!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15797