Atom Editor键映射是否支持功能键?(Does the Atom Editor keymap support function keys? Like F5)

编程入门 行业动态 更新时间:2024-10-28 00:29:11
Atom Editor键映射是否支持功能键?(Does the Atom Editor keymap support function keys? Like F5)

我用这个条目设置了keymap.cson 。 在调色板中,我可以看到F5与此命令相关联,但按F5不会触发它

'.workspace .editor': 'F5': 'runner:run'

I setup keymap.cson with this entry. In the palette, I can see F5 is associated with this command but pressing F5 does not trigger it

'.workspace .editor': 'F5': 'runner:run'

最满意答案

是的,Atom支持功能键。 键的名称区分大小写, F5的名称为f5 ,请注意小写“f”。 以下应该有效:

'atom-workspace atom-text-editor': 'f5': 'runner:run'

另外,请注意,您可能希望将atom-workspace atom-text-editor替换为atom-workspace ,除非您在Tree View,Markdown Preview或任何其他内容时不希望键执行命令。查看不是编辑器。

Yes, Atom supports function keys. The names of the keys are case-sensitive and the name of F5 is f5, note the lowercase "f". The following should work:

'atom-workspace atom-text-editor': 'f5': 'runner:run'

Also, note that you may want to replace atom-workspace atom-text-editor with just atom-workspace, unless you don't want the key to execute the command when you're on the Tree View, a Markdown Preview or any other view that isn't an editor.

更多推荐

本文发布于:2023-08-07 23:17:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1466175.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:功能键   keymap   Atom   Editor   keys

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!