-
Notifications
You must be signed in to change notification settings - Fork 30k
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
macOS: alt+i always inserts '^' character #41024
Comments
The root cause is the The default keybinding for go to definition is bound only when
Out of the box:
In your case, I believe you would want the keybinding BEFORE:
AFTER:
|
Thanks for the explanation @alexandrudima, but the workaround doesn't work, and the bug happens regardless of any |
Indeed, I can reproduce and get the circumflex character too when e.g. binding
|
The same happens for |
I can reproduce in Chrome and have filed https://bugs.chromium.org/p/chromium/issues/detail?id=887519 |
after using : Solved my problem |
The same happens for |
Similar issue with |
https://stackoverflow.com/questions/11876485/how-to-disable-generating-special-characters-when-pressing-the-alta-optiona |
alt - n insert ˜ too alt - m can work as expected |
@codebysandwich , did you ever find a solution? This is really bothering me as I would like to be able to use alt+n as well, but keep getting a ˜character |
i'm sorry about that, i used ⌃ + ⌥ + n instead of ⌥ + n |
The macOS option key (⌥) is used for special characters, symbols, and accents. The macOS option key bindings and Windows alt key binding are not equivalent. Simply mapping Windows alt key bindings to macOS option key bindings will conflict with existing macOS option key bindings. Many of the issues tracked here are key binding conflicts. The Keyboard Viewer with a US keyboard shows as follows without any modifier key pressed: and with the option key pressed: |
This StackOverflow answer explains how to completely prevent Option+key from producing special characters, allowing you to use these combinations for shortcuts in VS Code and various other editors. In short:
|
The selected input source is global for the user. It's not limited to VSCode. I'd suggest keeping the existing keyboard so that it is possible to switch (in the input menu) to a keyboard that supports normal |
So, yes, macOS does insert special characters on alt/option+, rather than trigger special keys. However, not in all apps. Emacs for example handles all those bindings correctly, and both Terminal and iTerm have settings that allow them to capture alt/option keybindings and pass them to whatever you have running in a terminal, instead of inserting the character macOS would normally insert. So macOS definitely exposes some mechanism for apps to capture alt/option keybings. I don't know enough about macOS development myself to say what that mechanism is, but I know it's possible as other apps do it. Hence it would be nice if we could see VSCode support it too. |
Agreed, but until Chromium deals with the upstream issue I don't think that will be possible. This workaround at least allows those who don't need extended character sets to use these shortcuts. |
I'm hitting this issue with dead keys overriding the keyboard shortcuts defined by the dance extension. I've had to resort to the same solution as @codebysandwich. Interestingly, the keyboard shortcuts "recording keys" mode is able to capture the key combination, so there could be a workaround by using the same key capture mechanism used there. |
Could there not be an option similar to |
Although to be fair |
Steps to Reproduce:
Reproduces without extensions: Yes
#22664 & #22894 might be relevant.
Upstream issue: https://bugs.chromium.org/p/chromium/issues/detail?id=887519
The text was updated successfully, but these errors were encountered: