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

Re: END Key in Emacs (only in Xterm)



On Wed, 5 Apr 2000, Branden Robinson wrote:

> On Tue, Apr 04, 2000 at 02:56:58PM +0200, Michel LESPINASSE wrote:
> > We have to do this because the terminal definition in
> > /usr/lib/xemacs-21.1.8/lisp/term/xterm.elc is apparently wrong - it
> > defines [find] instead of [home] and [select] instead of [end].

> That's not utterly wrong, really.

> DEC VT 220 and later terminals, which xterm was designed to emulate, had
> "Find" and "Select" instead of the "Home" and "End" keys found on PC
> keyboards.

OK

> Trouble is, I don't know exactly what emacs is doing with this information.

> Are "find" and "select" bound to actual emacs functions are are these just
> names for key engravings?  If the former, I'll have to leave it up to emacs
> people to duke out what should be done about this.  If the latter, it
> probably won't kill anyone to change those to [home] and [end].

My understanding of this, mostly acquired over the weekend by reading the
info files, is that the files in /usr/lib/*emacs*/lisp/term should convert
the character sequences generated by the terminal into an intermediate
universal mapping that they name a keysym. For example if I press insert
all the term/* files would generate the same keysym in emacs. The other
emacs config files then bind commands on these keysyms. Also it would be
inconvenient to decide arbitrary names for the emacs keysyms, so the emacs
maintainers decided to use X as a naming convention. To get back to the
insert example, the corresponding emacs keysym will be named "insert" as a
convention, just because the X keysym is named XK_Insert.

Also, the emacs "find" keysym is bound to the search-forward function,
and the emacs "select" keysym seems to just generate a beep and an error
message (function-key-error) on my installation.

With this in mind, i *think* that it would be correct to change the
lisp/term/xterm.elc file. I guess it is not 100% correct because someone
running xterm on something else than a PC could have "find" and "select"
keys on his keyboard that generate the VT220 find and select sequences ?
It is the "most correct" fix that I can see though : I think we can not
modify the other emacs config files, like binding the home and end
functions to the "find" and "select" emacs keysyms, because it would break
other terminals...

--
Michel "Walken" LESPINASSE - Development Engineer at Wind River Systems
"We've all heard that a million monkeys banging on a million typewriters
 will eventually reproduce the entire works of Shakespeare.
 Now, thanks to the Internet, we know this is not true."


Reply to: