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.
假设,我有代码:
(defun dummy () (interactive) (message "aaa")) (local-set-key (kbd "<left>") 'dummy)
当您<left>在当前缓冲区中单击键时,它将打印“aaa”。
<left>
是否可以将此操作附加到按下的任何键上?
这是解决方案:
(defun dummy () (interactive) (message "aaa")) (local-set-key [t] 'dummy)
我无法真正设想这个用例,但听起来“默认键绑定”键映射机制会促进它。
对于初学者,请看一下:
(elisp) Format of Keymaps
(elisp) Searching Keymaps