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

Re: How come i wrote a NO-BREAK SPACE in xterm+bash ?



Hi,

On 2015-08-10 16:52:04 +0200, Thomas Schmitt wrote:
> > Well, it seems that there's some confusion. By "Alt", I meant the
> > ISO_Level3_Shift key, which is bound to the physical Alt and AltGr
> > keys in my keyboard configuration.
> 
> Mine is a US QWERTY. Two "Alt" keys, no "AltGr".
>   https://en.wikipedia.org/wiki/Template:Keyboard

It seems that this is exactly the same thing:

  https://en.wikipedia.org/wiki/QWERTY#United_States

It is written "Alt" on US keyboards, and "Alt Gr" on US-International
and non-US keyboards.

> > Now, there's the Meta key (mod1, bound to the physical Windows key in
> > my keyboard configuration), often called Alt in other applications,
> > which gives the Escape character because I've set eightBitInput to
> > false.
> 
> I added it to /etc/X11/app-defaults/XTerm :
> 
>   *eightBitInput: false
> 
> and disabled my workaround VT100.Translations.
> 
> With this setting, Alt+Spacebar does nothing visible. It emits
> the two bytes ESC and SPACE now. Many other Alt+keys cause beeps.

All of them should send ESC + the character (e.g. ESC a for Alt+a).
The effect depends on the context. With

  cat > /dev/null

you can see what is emitted. In the shell, this allows one to do
various things depending on the key bindings of the shell. Ditto
for applications running in the terminal. This is very useful.

> Having the choice between totally invisible, but not empty
> Alt+Spacebar plus beeping Alt+keys on the one hand,
> and visible Alt+keys "±²³´µ¶·¸¹°­½ñ÷åòôùõéïðÛÝÜáóäæçèêë컧úøãöâîí¬®¯"
> plus a real blank as Alt+Spacebar, on the other hand, i choose
> the latter.

The best choice is to configure ESC input sequences as you wish.
With zsh, there's the bindkey command. For readline-based software
(like bash), configuration is done in the ~/.inputrc file. You
can bind Alt+Space to a single space character if you want, and
do other things for the other Alt+key combinations (which are
equivalent to Esc+key).

> > IMHO, eightBitInput = true (the default) does not make much sense.
> 
> It's not too bad if only NO-BREAK SPACE had a visible glyph.
> Something like four dots at the corners of its rectangle.

In Emacs (either running in its own window or in a terminal),
it is visible. You can fill a feature request for xterm to have
NO-BREAK SPACE displayed in some given color (a bit like what
Emacs does in a terminal) or in some alternative way.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Reply to: