英文:
Key repeat in GitHub Codespaces
问题
在GitHub Codespace的文本编辑器中...
- 如果我按住键盘上的箭头键,键会重复。完美!
- 如果我按住
j
键,只会插入一个j
。不完美!
如何在GitHub Codespaces编辑器中启用像j
这样的键的键重复功能?
(如果有影响的话,我正在使用Google Chrome和MacOS。)
英文:
In the text editor of a GitHub Codespace...
- If I press-and-hold an arrow key on my keyboard, the key repeats. Perfect!
- If I press-and-hold the
j
key, only onej
is inserted. Not perfect!
How do I enable key repeat in the editor of a GitHub Codespaces for keys like j
?
(If it makes a difference, I am using Google Chrome and MacOS.)
答案1
得分: 0
-
在macOS终端中,运行以下之一:
-
全局启用:
defaults write -g ApplePressAndHoldEnabled 0
-
仅为Chrome启用:
defaults delete -g ApplePressAndHoldEnabled
defaults write "com.google.Chrome" ApplePressAndHoldEnabled 0
-
-
重新启动您的浏览器。
您可能会好奇为什么要将 ApplePressAndHoldEnabled
设置为 false。这是因为将其设置为 true 会启用显示字符重音菜单。有关更多详细信息,请参阅此答案。
HT:IntelliJ IdeaVim插件提示我了 ApplePressAndHoldEnabled
设置的存在。
英文:
- In a macOS terminal, run one of the following:
-
Enable globally:
defaults write -g ApplePressAndHoldEnabled 0
-
Enable only for Chrome:
defaults delete -g ApplePressAndHoldEnabled
defaults write "com.google.Chrome" ApplePressAndHoldEnabled 0
- Restart your browser.
You may be curious why you are setting ApplePressAndHoldEnabled
to false. It is because setting it to true enables the show character accents menu. For more detail, see this answer.
HT: The IntelliJ IdeaVim plugin clued me into the existence of the ApplePressAndHoldEnabled
setting.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论