1

我正在尝试更改评论/取消评论热键,但它不起作用。我在 Mac 上,但我想实际使用Ctrl键修饰符而不是Cmd键。由于我要使用的热键已经分配给其他东西,所以我也在尝试分配热键,以避免冲突。

我在用户设置中输入了以下内容并保存了文件,但它不起作用。默认热键仍然有效。

--[[--
  Use this file to specify **User** preferences.
  Review [examples](+/Volumes/ZeroBraneStudio/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg/user-sample.lua) or check [online documentation](http://studio.zerobrane.com/documentation.html) for details.
--]]--

  keymap[ID.REPPLACEINFILES] = "Ctrl-Alt-R"
  keymap[ID.REPLACE]         = "Ctrl-Shift-R"
  keymap[ID.COMMENT]         = "Ctrl-R"

我做错了什么或错过了什么?

4

1 回答 1

0

由于我要使用的热键已经分配给其他东西,所以我也在尝试分配该热键,以避免冲突。

这是正确的想法。

我看到两个原因:您在ID.REPPLACEINFILES(double P) 中有错字,并且Ctrl始终映射到CmdmacOS。您需要RawCtrl改用(因为它映射到Ctrl所有平台,包括 macOS)。详见本节:https ://github.com/pkulchenko/ZeroBraneStudio/blob/master/src/editor/keymap.lua#L27-L29

于 2020-04-20T02:07:17.113 回答