Skip to content

Instantly share code, notes, and snippets.

@identifysun
Last active June 4, 2020 02:14
Show Gist options
  • Save identifysun/204688ff33945770bd30b033918904c8 to your computer and use it in GitHub Desktop.
Save identifysun/204688ff33945770bd30b033918904c8 to your computer and use it in GitHub Desktop.

当你使用 Mac OS X 系统自带当输入法,在键盘按住元音字符时(如字符 A),

会弹出与字符 A 相似的框供选择,如果是非元音字符,也未出现重复的按键字符:

元音字符:

非元音字符:

其实在 Mac OS X 系统早期版本中,引入了按键开关,我们可以通过如下方式改变默认按键的行为:

Disable Popup / Enable Key Repeat

$ defaults write -g ApplePressAndHoldEnabled -bool false

Enable Popup / Disable Key Repeat

$ defaults write -g ApplePressAndHoldEnabled -bool true

以上配置是全局的,如果你想未某个软件独立设置,参考如下:

Sublime

$ defaults write com.sublimetext.3 ApplePressAndHoldEnabled -bool false

VSCODE

To disable the Apple press and hold for VSCode only, run this command in a terminal:

$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false

To re-enable, run this command in a terminal:

$ defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool true

注: 此设置变更需要重启应用;

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment