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

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

Re: emacs-snapshot keybinding problem


From: Peter Dyballa
Subject: Re: emacs-snapshot keybinding problem
Date: Sun, 1 Jan 2006 19:57:45 +0100


Am 01.01.2006 um 19:04 schrieb Angelina Carlton:

You have to make a difference between GNU Emacs running inside a
terminal (emulation), or as an X client in its own window. The keys
you set with xmodmap do not exist in nowindows mode. XTerm and other
terminal emulations have kind of 'text bindings' to keys, particularly
to function keys.

This seems odd to me, but I will take your advice. "xterm" for example is a terminal emulator for X windows, as is my terminal, "urxvt" so I would have thought xmodmap would be sufficient here. or do you mean that Emacs
makes a distinction if called with -nw? I always thought the program
(urxvt in my case) is a client of the X server and would inherit
xmodmaps settings for that session.


The terminal emulation is of course an X11 client. But Emacs inside it not. It's just a shell command. In terminals GNU Emacs uses ncurses or similiar means to 'draw' its window(s). GNU Emacs too uses different interfaces to receive the 'key events.' Only the windowing system's clients see these events, shell commands receive some ANSI codes, as sent by the terminal emulation. In X11 this one translates from X11 key events to ANSI terminal codes.

You can see the difference when pressing C-q and then a function key. In a terminal emulation this has some sense, in an X11 client it's non-sense, maybe a ^@ or ASCII-Nul worth (less than 2ยข). You too can check with C-h k whether GNU Emacs 'sees' in a terminal any modifiers (it can't, because the X11 interface is not activated).

--
Greetings

  Pete

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





reply via email to

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