[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems binding odd C- & M-keys in Elisp
From: |
Kevin Rodgers |
Subject: |
Re: Problems binding odd C- & M-keys in Elisp |
Date: |
Fri, 10 Mar 2006 14:55:11 -0700 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
My first reply could have been formatted a little more clearly, and as
Katsumi Yamaoka pointed out the semicolon should generally be escaped in
Emacs Lisp:
The [Customizing] Key Bindings node of the Emacs manual has a subnode
called Init Rebinding (aka Rebinding Keys in Your Init File), which
explains that non-ASCII characters such as `C-;' and `C-TAB' must be
represented using the more general vector (vs. string) notation:
[?\C-\;] and [?\C-\t]
Since <left> and <up> are function keys, not characters,
M-<left> and M-<right> are modified function keys (not characters):
[M-left] and [M-up]
The Changing Key Bindings node of the Emacs Lisp manual describes an
alternate syntax:
'(control ?\;) and '(control ?\t) or '(control tab)
'(meta left) and '(meta up)
Finally, there is the kbd function:
(kbd "C-\;") and (kbd "C-TAB")
(kbd "M-<left>") and (kbd "M-<up>")
--
Kevin Rodgers
- Problems binding odd C- & M-keys in Elisp, Joe Fineman, 2006/03/08
- Re: Problems binding odd C- & M-keys in Elisp, Katsumi Yamaoka, 2006/03/08
- Re: Problems binding odd C- & M-keys in Elisp, Peter Dyballa, 2006/03/09
- Re: Problems binding odd C- & M-keys in Elisp, Alan Mackenzie, 2006/03/09
- Re: Problems binding odd C- & M-keys in Elisp, Kevin Rodgers, 2006/03/09
- Re: Problems binding odd C- & M-keys in Elisp,
Kevin Rodgers <=
- Re: Problems binding odd C- & M-keys in Elisp, Joe Fineman, 2006/03/09