all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How do you use a number as an argument to global-set-key?
Date: Tue, 21 Apr 2009 15:13:16 +0900	[thread overview]
Message-ID: <buo4owih6v7.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: a73bc375-8f62-4234-9bdb-670da1bf6347@x31g2000prc.googlegroups.com

formido <formido@gmail.com> writes:
> I want to use the numbers above the keyboard in 'global-set-key',
> e.g., have a command trigger with C-2. "\C-2" doesn't work. What does?

Use a vector instead of a string (strings can only contain a limited
subset of keys).

E.g.: (global-set-key [?\C-2] 'foo)

-Miles

-- 
Quotation, n. The act of repeating erroneously the words of another. The words
erroneously repeated.


      parent reply	other threads:[~2009-04-21  6:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-19 16:05 How do you use a number as an argument to global-set-key? formido
2009-04-19 17:31 ` thierry.volpiatto
2009-04-19 17:34 ` Peter Dyballa
     [not found] ` <mailman.5694.1240162703.31690.help-gnu-emacs@gnu.org>
2009-04-19 17:58   ` formido
2009-04-21  6:13 ` Miles Bader [this message]

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buo4owih6v7.fsf@dhlpc061.dev.necel.com \
    --to=miles@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.