help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: global-set-key


From: Glenn Morris
Subject: Re: global-set-key
Date: Mon, 28 Apr 2003 19:15:59 +0100
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/directory/emacs.html)

"Harter, Douglas" wrote:

> I would like to reset the meta f10 key using global-set-key.
>
> I have referred to the manual and none of their examples seems to work. 

The manual makes sense to me. "Rebinding Function Keys" node:

    A key sequence which contains function key symbols (or anything but
    ASCII characters) must be a vector rather than a string.  The vector
    syntax uses spaces between the elements, and square brackets around the
    whole vector.  Thus, to bind function key `f1' to the command `rmail',
    write the following:

    (global-set-key [f1] 'rmail)

    [...]

    You can use the modifier keys <CTRL>, <META>, <HYPER>, <SUPER>,
    <ALT> and <SHIFT> with function keys.  To represent these modifiers,
    add the strings `C-', `M-', `H-', `s-', `A-' and `S-' at the front of
    the symbol name.  Thus, here is how to make `Hyper-Meta-<RIGHT>' move
    forward a word:

    (global-set-key [H-M-right] 'forward-word)


Thus, I deduce

(global-set-key [M-f10] 'forward-word)

and, lo and behold, it works.

As an aside, if you want to be XEmacs compatible, you can use

(global-set-key [(meta f10)] 'forward-word)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]