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

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



Quoting Thomas Schmitt (scdbackup@gmx.net):

> My sunday afternoon endeavor:
> 
> xev shows Alt+Space as four separate events:
> Alt down, Space down, Space up, Alt up.
> So it's not X which introduces the unwanted spaceoid.
> od -x shows it as "a0c2". So here the translation has happened
> already. I.e. it is not a matter of readline or bash.
> 
> This indicates it is a feature of xterm. Some googling for
> "xterm keyboard mapping" brought me to resource "VT100.Translations"
> in file /etc/X11/app-defaults/XTerm.
> The following line keeps Alt+Space from producing non-whitespace:
> 
>   *VT100.Translations: #override Alt<Key>space: string(" ")
> 
> Well, i would next have to kill all my xterms and replace them
> by new ones ... or find out how to make them reload their
> resources and re-init. Ctrl <Btn2Down>, "Do Full reset" does
> not help.
> 
> And i still did not find out where the mapping of Alt+Space
> is defined on the first hand. I.e. the default for app-defaults.
> Currently i am lost in the Xt documentation jungle.
> (I see dinosaurs and giant dragonflies ... )

Poking around in /usr/share/X1/xkb/ I can see that rules/base has lines like:

    nbsp:level4 = +nbsp(level4)

symbols/nbsp seems to be very revealing, having the comments:

// level3 & level3ns provide no-breaking spaces starting from level3
// This is good for typographers but experience shows many users accidently
// type no-breaking spaces on the CLI (resulting in errors)
// Used by fr(latin9) and lt(std)
[...]
[definitions like]
    symbols[Group1]= [ space, space, nobreakspace ]
[...]
// for this reason pushing no-breaking spaces to level4 is the safe default nowadays
[...]
    symbols[Group1]= [ space, space, space, nobreakspace ]

I assume your ?German keyboard pulls in symbols/de which has similar
definitions (because AFAICT it doesn't pull in symbols/nbsp).

(Methodology: recursive grep of /usr/share/X1/xkb/ looking for 'ksp'; that
turned up lines with 'nbsp'. Don't go thinking I have any familiarity with
these files. Their terminology is hopelessly confusing.)

PS I was mistaken earlier in thinking xfce4-terminal was like xterm.

Cheers,
David.


Reply to: