-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Ctrl underscore sends RET in Emacs and terminal #11194
Comments
@sivaramn it depends how the keys are pressed. For Emacs undo to work first press crtl then shift+underscore. This will execute undo function in emacs inside WSL instance. Here's a sample screenshot, notice Undo! in the echo area: And this is the output of showkey:
First line is ctrl followed by shift+underscore. The 2nd line is crtl+shift+underscore. |
Yes, I'm aware of this. I've been using emacs for quite some time and know to C-S _ . |
@sivaramn Emacs has "C+x u" for undo actions. Why not use this key combination instead of "C+S+_" which I find more difficult to type than "C+x u". |
True. But I work with both Win and Linux OSes, ctrl-X does cut in Win apps; Ctrl _ works universally without any side effects and unintended results. |
Yep, that's a real bug alright. There's a little bit of weird handling for a couple ctrl+key combos, ^_ is one of them. I'll toss this on the backlog, thanks for following up! |
In case it helps: I get this as well in nano and in the terminal, keyboard is 'Belgian (Period)'. |
I get this for
I would also like to see a very quick fix to this issue as I use I installed my windows from scratch today and don't remember seeing this before, so something changed when I installed everything again. |
For those of you that are getting a The reason it works correctly on a US keyboard (and several others) is because the keyboard itself has a built in mapping for that key combination, so it doesn't rely on the terminal to do the translation. I've recently been experimenting with a rewrite of the VT keyboard handler which fixes this bug (amongst other things). However, I don't want to promise that it's going to be fixed soon - it's still very much a work in progress. |
@j4james do you mean that the US keyboard has a mapping for Indeed I'm on a Finnish keyboard, which is quite different from the US one. On my keyboard |
@hvesalai I mean it has a mapping specifically for Ctrl+Shift+Minus. You can see what the mappings are on the Keyboard Layout Info website. Compare the US keyboard layout and the Finnish layout. On both of them, the minus key is What that means is that on your keyboard, Ctrl+Minus should produce the |
@j4james OK, that makes a lot of sense. Indeed when using the Terminal, |
Windows Terminal version (or Windows build number)
Windows Terminal Version: 1.9.1942.0
Other Software
Bug is seen in
Emacs 27.2
too in WSLSteps to reproduce
ctrl underscore got by pressing ctrl and _ (underscore)key sends RET in terminal as well as emacs in WSL. ubuntu 20.04
Expected Behavior
In Emacs Ctrl + _ is usually mapped to
undo
. It seems to be mapped toRET
in emacs as well as terminal as reported aboveActual Behavior
getting RET passed to terminal and in emacs instead of _ or
undo
inemacs
The text was updated successfully, but these errors were encountered: