emacs - 在 Emacs 键映射值中显示键

标签 emacs elisp

当我查询键映射的当前值时,例如使用 M-: (current-local-map) ,它向我展示了以下内容:

Value: 
(keymap
 (S-mouse-2 . muse-follow-name-at-mouse-other-window)
 (mouse-2 . muse-follow-name-at-mouse)
 (33554445 . muse-follow-name-at-point-other-window)
 (S-return . muse-follow-name-at-point-other-window)
 (13 . muse-follow-name-at-point)
 (return . muse-follow-name-at-point)
 keymap
 (67108924 . muse-decrease-list-item-indentation)
 (67108926 . muse-increase-list-item-indentation)
 (M-return . muse-insert-list-item)
 (33554441 . muse-previous-reference)
 (S-iso-lefttab . muse-previous-reference)
 (S-tab . muse-previous-reference)
 (S-mouse-2 . muse-follow-name-at-mouse-other-window)
 (mouse-2 . muse-follow-name-at-mouse)
 (33554445 . muse-follow-name-at-point-other-window)
 (9 . muse-next-reference)
 (tab . muse-next-reference)
 (3 keymap
    (19 . muse-search)
    (2 . muse-find-backlinks)
    (tab . muse-insert-thing)
    (9 . muse-insert-thing)
    (16 . muse-project-publish)
    (6 . muse-project-find-file)
    (61 . muse-what-changed)
    (22 . muse-browse-result)
    (27 keymap
        (20 . muse-publish-this-file))
    (33554452 . muse-publish-this-file)
    (20 . muse-project-publish-this-file)
    (12 . font-lock-mode)
    (5 . muse-edit-link-at-point)
    (1 . muse-index))
 keymap
 (27 keymap
     (9 . ispell-complete-word)))

我希望看到的不是数字而是更有意义的东西,例如 (control ?c) return例如。我怎么做 ?

最佳答案

  • 你知道命令 C-h m ( describe-mode ),通常显示当前主要和次要模式的描述,通常带有它们的键盘映射?
  • (substitute-command-keys "\\{foo-map}")是什么describe-mode内部使用以生成用户友好的键映射描述 foo-map .
  • 如果您想要更接近键映射结构的东西,该 API 记录在 Emacs Lisp 手册的“分类事件”中。例如,(event-modifiers 33554445) ==> (shift control)(format "%c" (event-basic-type 33554445)) ==> "m"
  • 关于emacs - 在 Emacs 键映射值中显示键,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3480173/

    相关文章:

    scala - sbt项目添加依赖时需要生成.ensime目录吗?

    emacs 外壳 : change directory with ido

    emacs - 可能在 latex 模式下使emacs在段落填充期间忽略注释?

    Emacs 缓冲区内的 OpenGL 上下文

    emacs - 为什么使用命令 M-x jedi :install-server in Emacs doesn't reply

    emacs - Emacs 中的文件扩展名 Hook

    emacs - 在 emacs-lisp 中,如何将点定位在文本字符串的中间?

    emacs - 用 %H 格式化时间差

    emacs - Elisp 编程 - 最好的设置是什么?

    emacs - TRAMP忽略流浪者远程路径