3

paredit.el has the following example code for setting a keybinding:

https://github.com/emacsmirror/paredit/blob/8330a41e8188fe18d3fa805bb9aa529f015318e8/paredit.el#L54

    (eval-after-load 'paredit
      '(progn
         (define-key paredit-mode-map (kbd "ESC M-A-C-s-)")
           'paredit-dwim)))

Evaluating (kbd "ESC M-A-C-s-)") outputs [27 213909545].

How to interpret this vector key sequence. What keys does this represent?

3

If you look at the doc string of kbd (C-h f kbd)), it mentions that there is an approximate inverse function called key-description. If you apply this function to the vector, you get

(key-description [27 213909545])
"ESC A-C-M-s-)"

Note the different order!

The explanation is that these represent modifier keys: that's ESC followed by the key combination ALT-CONTROL-META_SUPER-) i.e. you have to hold all of those modifier keys down while you press the closing paren key. That also explains why the order of the modifiers does not matter, so kbd and key-description can list them in different orders.

Since, AFAICT, paredit-dwim does not exist as a function, and since most keyboards define some but not all of these modifier keys (making it impossible to press that combination unless you use something like xmodmap to define all the modifiers), I can only assume that the example is meant as tongue-in-cheek.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.