You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a strange quirk after starting to use a new HP EliteBook: hitting Fn-R by mistake would kill the current WSL session. The exit code is 0xc000013a, which is STATUS_CONTROL_C_EXIT. In other words, Fn-R is sending Ctrl-C. Using a key logger shows the same: the key code is 0x03, which is End of Text (EOT), usually seen as ^C. This seems to hold true in CMD and Powershell sessions: there I can kill ping and other programs with Ctrl-C or Fn-R the same. The mystery is why this does not hold true if being in WSL!
To visualize this I have captured two screenshots, one where I startup WSL from CMD by invoking ubuntu.exe. Pressing Fn-R there kills ubuntu.exe and gets me back to CMD.exe. The next screenshot shows this happening from a session started directly from Terminal (Ctrl-Shift-5 maps to Ubuntu).
What gives? Why is it treated differently, if the key code is the same? Can I do something about it? Is perhaps some underlying ConPTY API looking at not just the code point (0x03), which is the same, but also which modifier was pressed? That would explain it, perhaps.
I have tried reading both the FAQ in the Wiki, as well as the underlying ConPTY docs without getting further on this, so hoping someone could explain what is going on here :-)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I found a strange quirk after starting to use a new HP EliteBook: hitting Fn-R by mistake would kill the current WSL session. The exit code is 0xc000013a, which is STATUS_CONTROL_C_EXIT. In other words, Fn-R is sending Ctrl-C. Using a key logger shows the same: the key code is
0x03
, which is End of Text (EOT), usually seen as^C
. This seems to hold true in CMD and Powershell sessions: there I can killping
and other programs with Ctrl-C or Fn-R the same. The mystery is why this does not hold true if being in WSL!To visualize this I have captured two screenshots, one where I startup WSL from CMD by invoking
ubuntu.exe
. Pressing Fn-R there kills ubuntu.exe and gets me back to CMD.exe. The next screenshot shows this happening from a session started directly from Terminal (Ctrl-Shift-5 maps to Ubuntu).What gives? Why is it treated differently, if the key code is the same? Can I do something about it? Is perhaps some underlying ConPTY API looking at not just the code point (0x03), which is the same, but also which modifier was pressed? That would explain it, perhaps.
I have tried reading both the FAQ in the Wiki, as well as the underlying ConPTY docs without getting further on this, so hoping someone could explain what is going on here :-)
I first asked this question on SuperUser, but found this might actually be a bug or quirk in Terminal or WSL, which probably makes this a more fitting forum.
Beta Was this translation helpful? Give feedback.
All reactions