[Cuis-dev] [IMPROV] Unicode Input in Editor
Gerald Klix
cuis.01 at klix.ch
Sat Jul 29 01:50:01 PDT 2023
On 7/29/23 9:30 AM, Boris Shingarov via Cuis-dev wrote:
> Hi Gerald,
>
>> in text editors. For reasons I do not understand
>> the usual Ctrl-u-based X11 hack does not work with Cuis.
>
> Perhaps I am just being too naïve and completely missing the problem
> being discussed here, but why do we need to program this ourselves in
> Cuis instead of using what the OS already does? For sure this code
> handling \latex<space> makes sense if this were SqueakNOS, but you did
> just say X11. And on X11, what I use is XCompose. No need for extra
> complexity, and the added benefit of perfect homogeneity across Cuis /
> bash / vim / browsers / email / etc.
Please correct me if I am wrong:
With XCompose alone it is not possible to enter arbitrary characters.
In nearly every other X11 program than the OpenSmalltalkVM, I can
type Shift-Ctrl-u type the code and press the space key.
It does not work with the recent Cuis versions, it doesn't work with Pharo 8
and it does not work with Squeak.
Probably the problem is buried somewhere in this function:
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/vm-display-X11/sqUnixX11.c#L1478
May knowledge of X11 is not sufficient to debug this and admittedly I don't
feel any urge to learn the details.
Personal Reason:
Concerning Compose-keys, I admit, that I really hate dead-keys.
For that reason I am not using a German keyboard, although
I write more German texts than English texts.
Side note: The standard German keyboard layout defines $^ as a dead key,
Smalltalk programming is sooooo nice with that feature :~}.
For me, this setup works perfectly (disregarding the Shift-Ctrl-u issue
in OpenSmalltalkVM):
setxkbmap -layout us -variant altgr-intl
setxkbmap -device $(xinput list --id-only 'HID 0430:0005') -layout de
-model sun -geometry sun -variant nodeadkeys
xmodmap -e 'keycode 18 = 9 parenleft 9 parenleft doublelowquotemark
singlelowquotemark leftsinglequotemark dead_breve'
xmodmap -e 'keycode 19 = 0 parenright 0 parenright leftdoublequotemark
leftsinglequotemark rightsinglequotemark dead_abovering'
The second line configures an optional German Sun Keyboard
(https://imgur.com/b6eqG1q).
The last two lines add German quotes without dead keys.
Another (maybe personal) Reason:
I gave up with Squeak and Pharo, occasionally I use Windows, sometimes
a Hackintosh using qemu. Each has it's own method for entering
arbitrary characters
(https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_input).
I want the same experience for my Squeak/Haver desktop across operating
systems.
(Haver: http://haver.klix.ch/)
>
> In case anyone might be interested in my actual XCompose config, I just
> uploaded it to GitHub: https://github.com/shingarov/my-xcompose-config
Thanks for sharing.
>
> (And of course that bash script there, it should be easy to write one
> to generate a Karabiner equivalent for OSX from the same tables, so the
> experience would be identical on the Mac; I am just too lazy to do it
> myself because I don't use my Mac for "real" work).
>
> So again: am I missing the reason to have all this extra code in the
> base image?
Do you refer to the "\name" syntax or to the "\+Unicode" input-syntax?
Indeed there may be some reasons, to move these extensions into a package,
e.g. for a pure server application you don't need them at all.
>
> Best,
> Boris
>
HTH and Best Regards,
Gerald
More information about the Cuis-dev
mailing list