Re: [ROOT] TRint command line editing

From: Jiri Masik (masik@pc203b.fzu.cz)
Date: Mon Jul 31 2000 - 00:06:12 MEST


Fons Rademakers <Fons.Rademakers@cern.ch> writes:

> Hi Jiri,
> 
>   what is the problem with gnome-terminal (which I am using myself)
> in this respect?
> 
> Cheers, Fons.
> 

Hi Fons,

The algorithm in Getline.c expects that pressing the modifier key sets
the high bit for the next character entered. This is the way how xterm
behaves by default. Rxvt or Eterm process Meta+key separately, one
gets 27 and 98 instead of 226 (Meta_b). There's an option Rxvt.meta8:
True for rxvt and -8, --meta8 for Eterm to mimic xterm. Similarly
gnome-terminal processes Meta+key separately, I don't have its docs
handy to look up details, it might have a compatibility mode too.

        Jiri


> 
> On Fri, Jul 28, 2000 at 03:19:02PM +0200, Jiri Masik wrote:
> > Martin Weber <Martin.Weber@cern.ch> writes:
> > 
> > > Dear ROOT developers,
> > > 
> > > since I don't have that fancy "Meta" key on my keyboard, I cannot
> > > use the 
> > > 
> > > M-F/M-B : Move cursor forward/backward one word.
> > > M-D     : Delete the word under the cursor.
> > > 
> > > as it is described in C_Getline.c
> > > 
> > > I'd really like to use this facility, so could you add support for going
> > > forward/backward one word without the "Meta" key? I know that e.g. tcsh
> > > does it by
> > > 
> > >             EMACS Multi-character and 8 bit bindings
> > >             "^[F"  or "M-F"          ->  forward-word
> > >             "^[B"  or "M-B"          ->  backward-word
> > > 
> > > This means that pressing "ESC" before F imitates the "Meta" key. Could
> > > this be a possibility?
> > > 
> > 
> > Hi Martin,
> > 
> > I assume you are working in X windows system. Maybe you don't need a
> > real Meta key on the keyboard, have you tried Alt or another
> > modifiers? That's what works for me, the key which xev reports as
> > Alt_L has the above mentioned functionality.
> > 
> > Also be careful which terminal emulator you use. Not all fit the
> > assumption taken in C_Getline.c. xterm works fine, rxvt and
> > gnome-terminal don't.
> > 
> >         Jiri
> 
> -- 
> Org:    CERN, European Laboratory for Particle Physics.
> Mail:   1211 Geneve 23, Switzerland
> E-Mail: Fons.Rademakers@cern.ch              Phone: +41 22 7679248
> WWW:    http://root.cern.ch/~rdm/            Fax:   +41 22 7677910



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:30 MET