unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Strange keypad bindings
@ 2007-10-27 22:30 David Sagan
  2007-10-28  9:26 ` Peter Dyballa
       [not found] ` <mailman.2659.1193563576.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: David Sagan @ 2007-10-27 22:30 UTC (permalink / raw)
  To: help-gnu-emacs

I get different keypad bindings depending upon how I invoke emacs and
I am wondering if anyone can help. I am sitting at a mac using ssh
with the Terminal program to connect to a remote Linux computer. If I
invoke a detached emacs job on the Linux computer using:
  emacs tao.cpp &
I get different keypad bindings than if I do not run detached on the
Linux computer with:
  emacs -nw tao.cpp
For example, in the detached process, the "5" key on the keypad is
bound to <kp-5> but in the non-detached process the "5" key is bound
to <kp-9> !! Anyone have any ideas as to how to make these the same
independent of how I invoke emacs?

Thanks, David

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Strange keypad bindings
  2007-10-27 22:30 Strange keypad bindings David Sagan
@ 2007-10-28  9:26 ` Peter Dyballa
       [not found] ` <mailman.2659.1193563576.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2007-10-28  9:26 UTC (permalink / raw)
  To: David Sagan; +Cc: help-gnu-emacs


Am 28.10.2007 um 00:30 schrieb David Sagan:

> Anyone have any ideas as to how to make these the same
> independent of how I invoke emacs?

Before launching GNU Emacs set a reasonable value for TERM  
environment variable. Terminal.app allows some adjustments in its  
preferences.

--
Greetings

   Pete

"One person with a belief is a social power equal to ninety-nine who  
have only interests."
                                                  - John Stuart Mill

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Strange keypad bindings
       [not found] ` <mailman.2659.1193563576.18990.help-gnu-emacs@gnu.org>
@ 2007-10-28 16:30   ` David Sagan
  2007-10-28 21:45     ` Peter Dyballa
       [not found]     ` <mailman.2688.1193607953.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: David Sagan @ 2007-10-28 16:30 UTC (permalink / raw)
  To: help-gnu-emacs

> Before launching GNU Emacs set a reasonable value for TERM
> environment variable. Terminal.app allows some adjustments in its
> preferences.
>
> --
> Greetings
>
>    Pete

I was using xterm. I tried, for example, vt102 and that fixed the "5"
key but that  made some keys inoperable like the "=" key on the keypad
so I'm no better off than before.

-- David

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Strange keypad bindings
  2007-10-28 16:30   ` David Sagan
@ 2007-10-28 21:45     ` Peter Dyballa
       [not found]     ` <mailman.2688.1193607953.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2007-10-28 21:45 UTC (permalink / raw)
  To: David Sagan; +Cc: help-gnu-emacs


Am 28.10.2007 um 17:30 schrieb David Sagan:

>> Before launching GNU Emacs set a reasonable value for TERM
>> environment variable. Terminal.app allows some adjustments in its
>> preferences.
>>
>
> I was using xterm. I tried, for example, vt102 and that fixed the "5"
> key but that  made some keys inoperable like the "=" key on the keypad
> so I'm no better off than before.

When you press in Terminal a function or cursor or numerical keypad  
key, then these keys produce ANSI Esc sequences (you can record them,  
for example in *scratch* buffer, with: C-q <key press>). These codes  
are quite characteristic for each terminal (or its emulation). So it  
should help when Terminal and the remote shell have the same TERM  
value set and since Terminal is quite inflexible make the remote site  
follow Terminal (I am using xterm-color).

Did you make a test with this set-up? It might also help to launch  
GNU Emacs with -Q that no customisation disturbs. Does it make a  
difference with and without -Q?

--
Greetings

   Pete

"I wouldn't recommend sex, drugs or insanity for everyone, but  
they've always worked for me."
                                           -- Hunter S. Thompson

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Strange keypad bindings
       [not found]     ` <mailman.2688.1193607953.18990.help-gnu-emacs@gnu.org>
@ 2007-10-30  3:37       ` David Sagan
  2007-10-30  9:57         ` Peter Dyballa
  0 siblings, 1 reply; 6+ messages in thread
From: David Sagan @ 2007-10-30  3:37 UTC (permalink / raw)
  To: help-gnu-emacs

On Oct 28, 5:45 pm, Peter Dyballa <Peter_Dyba...@Web.DE> wrote:
> Am 28.10.2007 um 17:30 schrieb David Sagan:
>
> When you press in Terminal a function or cursor or numerical keypad
> key, then these keys produce ANSI Esc sequences (you can record them,
> for example in *scratch* buffer, with: C-q <key press>). These codes
> are quite characteristic for each terminal (or its emulation). So it
> should help when Terminal and the remote shell have the same TERM
> value set and since Terminal is quite inflexible make the remote site
> follow Terminal (I am using xterm-color).
>
> Did you make a test with this set-up? It might also help to launch
> GNU Emacs with -Q that no customisation disturbs. Does it make a
> difference with and without -Q?
>
> --
> Greetings
>
>    Pete
>
> "I wouldn't recommend sex, drugs or insanity for everyone, but
> they've always worked for me."
>                                            -- Hunter S. Thompson

The problem with the "=" key being inoperable with TERM = vt102 turns
out to be specific to the Terminal program since I do not get this
behavior with the X11 program. I looked and Terminal does not have
anything obvious to change this behavior. In any case -q does not
change the situation. Also when I use ssh the TERM variable on the
remote host is set to what it is on my local Mac so that is not the
source of the problem. So the problem remains but thanks for your
suggestions.

-- David

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Strange keypad bindings
  2007-10-30  3:37       ` David Sagan
@ 2007-10-30  9:57         ` Peter Dyballa
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Dyballa @ 2007-10-30  9:57 UTC (permalink / raw)
  To: David Sagan; +Cc: help-gnu-emacs


Am 30.10.2007 um 04:37 schrieb David Sagan:

> In any case -q does not change the situation.

There is a difference between -q and -Q! Check with 'emacs --help'!

You are not restricted to an old vt102 emulation in Terminal. It  
should not take longer than half an hour to test the six or seven  
other variants (xterm/xterm-color and dtterm [from CDE] look most  
promising, ansi might be restricted 'though exact). There is always  
the chance that a terminal's capabilities description is faulty,  
local or remote. Or both.

Anyway, I'd prefer the X client GNU Emacs, which has no problems. To  
find out whether the remote GNU Emacs without windows makes problems  
you can check what the remote login shell sees. Does it see different  
keys than Emacs? Are there any ~/.inputrc files on the remote site  
that can alter the default key bindings of that login shell? With the  
tee programme you can save a copy of your local input to a file while  
GNU Emacs is running. When that file is a FIFO you can see in another  
Terminal with another ssh session with tail what this FIFO just  
received from tee, i.e. you. So you'll see in parallel what Emacs  
sees and what the login shell sees.

The situation can be made more complicated by watching too the  
network connection and dumping what is actually sent to the remote site.


Or for short: I haven't found yet such a misbehaviour. Because I was  
always using xterm/xterm-color and never the numeric keypad?

--
Greetings

   Pete

A morning without coffee is like something without something else.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-10-30  9:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-27 22:30 Strange keypad bindings David Sagan
2007-10-28  9:26 ` Peter Dyballa
     [not found] ` <mailman.2659.1193563576.18990.help-gnu-emacs@gnu.org>
2007-10-28 16:30   ` David Sagan
2007-10-28 21:45     ` Peter Dyballa
     [not found]     ` <mailman.2688.1193607953.18990.help-gnu-emacs@gnu.org>
2007-10-30  3:37       ` David Sagan
2007-10-30  9:57         ` Peter Dyballa

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).