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

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

Re: How to translate M-kp-multiply to M-* before key is mapped to functi


From: Kevin Rodgers
Subject: Re: How to translate M-kp-multiply to M-* before key is mapped to function?
Date: Fri, 02 Jul 2004 10:32:49 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

paul wrote:
> I've nearly pulled out my hair for the following problem;
> I want to translate M-kp-multiply to M-* *BEFORE* the key
> gets bound to its default function (in my case pop-tag-mark).

You must be running emacs without a window system (or under a window
system, but with the -nw command line option).  In an xterm on my
platform (i386-pc-solaris2.7, X toolkit), `C-h k M-kp-multiply' shows

| ESC * runs the command pop-tag-mark

and then `C-h l' shows

| C-h k ESC * C-h l

The odd thing is that function-key-map contains this entry

(kp-multiply . [42])

but no escape sequence that maps to [kp-multiply] in the way that `ESC [
1 1 ~' is bound to [f1] or `ESC O p' is bound to [kp-1].

> I do *not* want to use global-set-key but am looking for
> a general way to remap non-ascii input events.

What non-ASCII input event do you think your terminal is sending to
Emacs?

> Using (define-key function-key-map ...) or (define-key key-translation-map 
...)
> is too late; I can remap the key, but the function pop-tag-mark is not
> called.

Since setting function-key-map and key-translation-map do not change the
results reported by `C-h k' and `C-h l', I don't think they have
anything to do with it: I think it means that the xterm is actually
sending `*' to Emacs, not an escape sequence.

> Trying an approach with keyboard-translate drives me nuts because
> it does not seem to support non-ascii events.

What do you want to do?  It seems like you want to bind M-kp-multiply to
a different command, but for some reason you don't want to use
global-set-key like this:

(global-set-key "\M-*" 'whatever)

--
Kevin Rodgers
paul wrote:
> I've nearly pulled out my hair for the following problem;
> I want to translate M-kp-multiply to M-* *BEFORE* the key
> gets bound to its default function (in my case pop-tag-mark).

You must be running emacs without a window system (or under a window
system, but with the -nw command line option).  In an xterm on my
platform (i386-pc-solaris2.7, X toolkit), `C-h k M-kp-multiply' shows

| ESC * runs the command pop-tag-mark

and then `C-h l' shows

| C-h k ESC * C-h l

The odd thing is that function-key-map contains this entry

(kp-multiply . [42])

but no escape sequence that maps to [kp-multiply] in the way that `ESC [
1 1 ~' is bound to [f1] or `ESC O p' is bound to [kp-1].

> I do *not* want to use global-set-key but am looking for
> a general way to remap non-ascii input events.

What non-ASCII input event do you think your terminal is sending to
Emacs?

> Using (define-key function-key-map ...) or (define-key key-translation-map 
...)
> is too late; I can remap the key, but the function pop-tag-mark is not
> called.

Since setting function-key-map and key-translation-map do not change the
results reported by `C-h k' and `C-h l', I don't think they have
anything to do with it: I think it means that the xterm is actually
sending `*' to Emacs, not an escape sequence.

> Trying an approach with keyboard-translate drives me nuts because
> it does not seem to support non-ascii events.

What do you want to do?  It seems like you want to bind M-kp-multiply to
a different command, but for some reason you don't want to use
global-set-key like this:

(global-set-key "\M-*" 'whatever)

--
Kevin Rodgers



reply via email to

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