Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[help-gnu-emacs] What are the numbers on car of keymaps

9 views
Skip to first unread message

Daniel Hilst

unread,
Jul 15, 2012, 11:57:11 AM7/15/12
to help-gn...@gnu.org
I, yet, do not understand keymaps... What are the number on car of
keymaps and how do they map to keys

Here is a sample http://pastebin.com/eAAytqx9

Cheers

Mark Simpson

unread,
Jul 15, 2012, 7:31:10 PM7/15/12
to help-gn...@gnu.org

Daniel Hilst <danie...@gmail.com> writes:

> I, yet, do not understand keymaps... What are the number on car of
> keymaps and how do they map to keys

Those appear to be the ASCII value of the key being mapped.

0x27 is ESC, 0x114 is 'r'

For reference: http://www.asciitable.com/ or 'man ascii' (if available).

Ciao
Mark


Pascal J. Bourguignon

unread,
Jul 16, 2012, 7:07:55 AM7/16/12
to help-gn...@gnu.org
Daniel Hilst <danie...@gmail.com> writes:

> I, yet, do not understand keymaps... What are the number on car of
> keymaps and how do they map to keys
>
> Here is a sample http://pastebin.com/eAAytqx9

In emacs lisp, characters are integers.

So a key that correspond to a character will be represented by this
character (ie. the code of this character).

But other keys, or key chords will be represented by bigger integers,
that are not the code of any character. You can find them with kbd or
edmacro-parse-keys.

(kbd "C-M-a") --> [134217729]


--
__Pascal Bourguignon__ http://www.informatimago.com/
A bad day in () is better than a good day in {}.


0 new messages