Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 Cx-insert 绑定到命令。这有效:
(global-set-key [\C-insert] 'my-func)
但这不会:
(global-set-key [\C-x-insert] 'my-func)
C-hcC-xinsert告诉我
C-x <insert> is undefined
这告诉我 Emacs 如何引用该序列,这反过来意味着我可以将字符串传递给"C-x <insert>"函数kbd,并且它将正常工作。
"C-x <insert>"
kbd
(global-set-key (kbd "C-x <insert>") 'my-func)
kbd是你的朋友。
这似乎有效:
(define-key ctl-x-map [insert] 'beginning-of-line)