From: "Eli Zaretskii" <eliz@gnu.org>
Subject: Re: Binding meta and arrow
Date: Sat, 14 May 2005 10:13:43 +0300 [thread overview]
Message-ID: <01c55854$Blat.v2.4$9ba97b80@zahav.net.il> (raw)
In-Reply-To: <BAY102-F37422DB752AE7A67A40EDEFB120@phx.gbl> (i_crowther@hotmail.com)
> From: "Ian Crowther" <i_crowther@hotmail.com>
> Bcc:
> Date: Sat, 14 May 2005 00:27:27 +0100
>
> I can evaluate "(global-set-key [left] "left was pressed")" and get "left
> was pressed" inserted into the buffer when I press left. All I now need to
> do is try to figure out how to use the alt key on my keyboard.
> I've tried the following:
> (global-set-key [M-left] "M-left was pressed")
> (global-set-key [A-left] "A-left was pressed")
> (global-set-key [alt left] "alt left was pressed")
> (global-set-key [meta left] "meta left was pressed")
>
> And because I don't know what they do, I tried the following combinations
> also:
> (global-set-key [H-left] "H-left was pressed")
> (global-set-key [s-left] "s-left was pressed")
>
>
> None of them work. I know emacs can tell I've pressed M-left though. I'd be
> grateful if somebody could tell me how I'm going wrong trying to bind it.
Just use a name of a function instead of the string. For example:
(global-set-key [M-left] 'beginning-of-line)
(The way you used global-set-key is meant for macros: the thing inside
quotes should be a sequence of one or more keys, it cannot be an
arbitrary string, and it certainly isn't displayed in the echo area,
it's fed back to the Emacs keyboard input.)
next prev parent reply other threads:[~2005-05-14 7:13 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 23:27 Binding meta and arrow Ian Crowther
2005-05-14 7:13 ` Eli Zaretskii [this message]
2005-05-14 15:56 ` Peter Dyballa
2005-05-14 23:51 ` Ian Crowther
2005-05-15 9:32 ` Peter Dyballa
2005-05-16 1:01 ` Ian Crowther
2005-05-16 8:50 ` Peter Dyballa
[not found] <mailman.5162.1116027341.2819.help-gnu-emacs@gnu.org>
2005-05-16 15:49 ` Stefan Monnier
2005-05-18 13:56 ` Ehud Karni
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='01c55854$Blat.v2.4$9ba97b80@zahav.net.il' \
--to=eliz@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.
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).