-
Did you know the command
C-h m(describe-mode), which usually shows a description of the current major and minor modes, usually with their keymaps? -
(substitute-command-keys "\\{foo-map}")is whatdescribe-modeuses internally to generate the user-friendly description of the keymapfoo-map. -
If you’d like to have something closer to the keymap structure, the API is documented in “Classifying Events” in the Emacs Lisp manual. For example,
(event-modifiers 33554445)==>(shift control)
(format "%c" (event-basic-type 33554445))==>"m"