From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: Problems binding odd C- & M-keys in Elisp
Date: Thu, 09 Mar 2006 10:52:00 -0700 [thread overview]
Message-ID: <dupq1a$kst$1@sea.gmane.org> (raw)
In-Reply-To: <ufylsif3h.fsf@verizon.net>
Joe Fineman wrote:
> I can bind commands to the following odd combinations using M-x
> global-set-key, but I cannot figure out how to express the same
> bindings in Elisp for inclusion in .emacs:
>
> C-; ("\C-\;" gives "Invalid modifier in string")
> C-<tab> ("\C-\t" gives the same)
> M-<left>
> M-<up>
>
> What am I missing?
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]
[M-left] and [M-up]
Note that since <left> and <up> are function keys, not characters,
M-<left> and M-<right> are modified function keys, not characters.
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
next prev parent reply other threads:[~2006-03-09 17:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-09 1:25 Problems binding odd C- & M-keys in Elisp Joe Fineman
2006-03-09 2:15 ` Katsumi Yamaoka
2006-03-09 8:08 ` Alan Mackenzie
2006-03-09 10:30 ` Peter Dyballa
2006-03-09 17:52 ` Kevin Rodgers [this message]
2006-03-10 21:55 ` Kevin Rodgers
2006-03-10 1:36 ` Joe Fineman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='dupq1a$kst$1@sea.gmane.org' \
--to=ihs_4664@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).