all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
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	[thread overview]
Message-ID: <40E58E31.60508@yahoo.com> (raw)
In-Reply-To: bb3e39cd.0407020710.70f53423@posting.google.com

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

  parent reply	other threads:[~2004-07-02 16:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-02 15:10 How to translate M-kp-multiply to M-* before key is mapped to function? paul
2004-07-02 15:28 ` Kai Grossjohann
2004-07-02 16:32 ` Kevin Rodgers [this message]
2004-07-04 21:51   ` paul
2004-07-05  8:01     ` paul
2004-07-05 18:05     ` Stefan Monnier
2004-07-06  9:23       ` paul
2004-07-07 17:13         ` Stefan Monnier

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=40E58E31.60508@yahoo.com \
    --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.
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.