Hacker News new | ask | show | jobs
by tgflynn 1035 days ago
Yeah, I was hoping to find some general information on how the Compose key is (or was) supposed to work. It's easy to find info on how to assign the Compose key to a particular key but I haven't found anything on how to actually use it to input more or less complex character codes.

Part of the problem may also be the difference between precomposed and non precomposed glyphs in Unicode, which I don't really understand, but it seems that if a keyboard layout is designed to use precomposed glyphs it may not allow you to further compose those with other code points.

For example there is a character that is a lowercase alpha with both an acute accent and a macron on top. With the right font it displays correctly (it probably wouldn't if I tried to copy-paste it here) but I don't know how to enter it on the keyboard. I suspect that's because there's no precomposed Unicode codepoint for it and my keyboard layout only seems to work with those.

The correct encoding for it is "GREEK SMALL LETTER ALPHA WITH MACRON" (Unicode name) composed with "'".

1 comments

Well, here's a story about how to configure and use one that I wrote last year:

https://www.theregister.com/2022/01/07/foss_fest_foreign_let...

It's dead easy.

You type compose, then 2 (or very occasionally 3) characters which, put together, make the letter you want.

Compose, a, ` gives à. Compose, A, ` gives À.

And so on. Y,=, ¥. c,/,¢

You can usually guess the combination you need.

Yeah, that might work with a default keyboard layout but it doesn't work with a polytonic Greek layout. How would you type a lowercase alpha with an acute accent and a macron that way ?
I don't speak or write Greek, so I don't really have any insight at all into this. (I can just about, very poorly, read the alphabet, that's all.)

So I can only guess:

Let's assume we have a Greek layout. And that that has keys from alpha to omega, and a RightAlt or something, and keys that have some useful resemblance to acute, grave, circumflex, rough, smooth, etc.

Compose, type an alpha, type an apostrophe?

As an example, I sometimes type in Czech.

č is comp, c, < š is comp, s, <

Others...

î is comp, i, ^ ï is comp, i, "

ç is comp, c, comma

All that's needed is a vague visual resemblance to the desired diacritic.