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

Re: Backspace in xterm (again)



Branden Robinson wrote:
> 
> On Thu, Sep 10, 1998 at 10:06:49AM +0100, Gilbert Laycock wrote:
> > Pete> I wonder what the difference between your setup and mine could be...
> >
> > Odd isn't it.
> >
> > I finally compared my /etc/X11/Xresources with the one from the
> > distribution. I had
> >
> > *VT100.Translations: #override <Key>Delete: string("\033[3~")\n\
> >                                <Key>Home: string("\033OH")\n\
> >                                <Key>End: string("\033OF")
> >
> > While the distribution has
> >
> > *VT100.Translations: #override <Key>BackSpace: string("\177")\n\
> >                                <Key>Delete: string("\033[3~")\n\
> >                                <Key>Home: string("\033OH")\n\
> >                                <Key>End: string("\033OF")
> >
> > I added the override for BackSpace, and then I get the same
> > misbehaviour as you describe. There is a comment saying:
> >
> > ! Include override for BackSpace because older xterms do not understand the
> > ! backarrowKey resource.
> >
> > I think I just never use any "older xterms"; I've not noticed any
> > problems with my setup.
> >
> > I think I will have to go and read the Debian keyboard policy again.
> 
> After some experimentation, I found that the following works if you add it
> to /etc/X11/Xresources:
> 
> *VT100.Translations: #override <Key>BackSpace: string("\177")\n\
>                                Meta<Key>BackSpace: string("\033\177")\n\
>                                <Key>Delete: string("\033[3~")\n\
>                                <Key>Home: string("\033OH")\n\
>                                <Key>End: string("\033OF")
> 
> bash-2.01$ bind -p | grep back
> "\C-b": backward-char
> "\eOD": backward-char
> "\e[D": backward-char
> "\C-h": backward-delete-char
> "\C-?": backward-delete-char
> "\C-x\C-?": backward-kill-line
> "\e\C-h": backward-kill-word
> "\e\C-?": backward-kill-word
> 
> And that's why.  Bash is expecting a literal ESCAPE, and doesn't really
> care what key you use to get it.
> 
> I don't know whose problem this is.  It seems to me that one should be able
> to keep the <ESC> and <META> keys separate in X.


	Uhmm, ignore me if I'm being stupid, but isn't the *definition* of a
'META' keystroke a key sequence that begins with 'ESC'?  Hasn't *nix
always used the 'ESC' key value in this way?


-- 
Ed C.


Reply to: