“Key repeat in GitHub Codespaces” 可以翻译为 “GitHub Codespaces 中的按键重复”。

huangapple go评论116阅读模式
英文:

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 one j 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

  1. 在macOS终端中,运行以下之一:

    • 全局启用:
      defaults write -g ApplePressAndHoldEnabled 0

    • 仅为Chrome启用:
      defaults delete -g ApplePressAndHoldEnabled
      defaults write "com.google.Chrome" ApplePressAndHoldEnabled 0

  2. 重新启动您的浏览器。

您可能会好奇为什么要将 ApplePressAndHoldEnabled 设置为 false。这是因为将其设置为 true 会启用显示字符重音菜单。有关更多详细信息,请参阅此答案

HT:IntelliJ IdeaVim插件提示我了 ApplePressAndHoldEnabled 设置的存在。

英文:
  1. 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

  1. 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.

huangapple
  • 本文由 发表于 2023年4月19日 23:20:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76056235.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定