Reputation: 397
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.
Upvotes: 8
Views: 1727
Reputation: 640
This 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:
~/Library/Keyboard Layouts/
System Settings
> Keyboard
> Text Input
> Input Sources
> Edit
.+
in the bottom left, scroll to the bottom of the list on the left and select Others
then select QWERTY no option
and click Add
.U.S.
) or just switch to the QWERTY no option
layout using the input-source select in the menu bar.Upvotes: 0
Reputation: 191
Try changing the Keyboard Layout.
System Preferences
> Keyboard
> Input Sources
.English
> ABC
SourceABC 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
Upvotes: 19