VSCode Mac BigSur option key not working as expected

Viewed 766

When I press the [Option+Z] to toggle word wrap it instead prints a character (ˀ)

OS: Mac BigSur
Processor: M1

Keypress event log

[2021-04-21 11:15:15.609] [renderer3] [info] [KeybindingService]: / Received  keydown event - modifiers: [alt], code: AltLeft, keyCode: 18, key: Alt
[2021-04-21 11:15:15.609] [renderer3] [info] [KeybindingService]: | Converted keydown event - modifiers: [alt], code: AltLeft, keyCode: 6 ('Alt')
[2021-04-21 11:15:15.609] [renderer3] [info] [KeybindingService]: \ Keyboard event cannot be dispatched in keydown phase.
[2021-04-21 11:15:15.978] [renderer3] [info] [KeybindingService]: + Storing single modifier for possible chord alt.
[2021-04-21 11:15:16.283] [renderer3] [info] [KeybindingService]: + Clearing single modifier due to 300ms elapsed.
1 Answers

Try changing the Keyboard Layout.

  • Goto System Preferences > Keyboard > Input Sources.
  • Add the English > ABC Source
  • Remove the existing source that is there. (In my case it was ABC India which contained that special character ˀ for Option+z key combination, the ABC input source will replace that with Ω, which somehow works with VS Code to trigger the special actions instead of inserting that as text)

Finally the input sources should look like this: Keyboard Settings Window

Related