If you run
(kbd "M-r") you'll get back the bit vector
. But what if I want to go the other way around: start with
 and return
M-r. How does one do that?
I Have looked at the
edmacro-parse-keys function inside
edmacro.el, and that describes how to go from the string to the bitvector. However this code is a bit tough to read, let alone figure out how to reverse.
For context, you'll see this in LAP disassembly, and I would like to provide the human-readable format instead, (although I suppose that's not strictly necessary).
One other slight complication: although understanding how to do this in Elisp would be great, the decompiler right now is in Python. So if it is easier to describe that way, this would be helpful.