Kaixo!

On Sat, Jun 12, 2004 at 09:56:52AM -0700, Elvis Presley wrote:

> I might like to vary the dead-key sequence from
> {accent, letter} to {letter, accent}. 

On console I'm afraid you can't easily do that,
as the compose sequences definition are quite poor.

On X11 I would use unicode combining accents instead
of dead keys for what you want; then on the Compose file
define sequences like:

<letter> <U03xx> : "precomposed letter with accent"

eg:

<a> <U0301> : "Ã"

on console you can define combining accent keys also;
but you will most likely be stuck with un-canonical
text files (eg, encoded as "<a><U0301>" isntead as of "<aacute>")
wheter it is a problem for you or not I don't know.

> I'm particularily interested in polytonic Greek.
> 
> Once I've selected the keyboard (alt-h), I could type
> a small_omega_dasia_perispomeni_ypogegrammeni, like
> this: 
> 
> ascii '`', ascii '~', ascii 'w', ascii 'i' 

on console you can't define such long compose sequences (unless
the kernel handling had been completly rewriten recently)
on X11 it is possible; and indeed a lot of polytonic greek
combinations have been defined, to use with dead keys or
with compose key (called "Multi_key" on X11).

note also that while on X11 there is a lot of dead keys defined,
allowing you to type all the greek accents; on console the
number of available dead keys is much smaller; I'm not sure
it would be enough for all needed accents.

> This is about as complicated as it gets in polytonic
> Greek, three dead keys, two pre-position, one
> post-position, 'w' representing omega, and an 'i' for
> iota subscript. 

No, dead keys cannot be post-position; they must always be typed
*before* the key they modify; that is in fact the very definition
of a dead_key: they modify the behavioiur of what is typed after them.
If it is typed after it is not a dead key, but just a regular key.

The ways already defined in el_GR.UTF-8 X11 Compose file for U1fa2
(á, omega with psili varia and ypogrammeni) are:

<Multi_key> <bar> <greater> <grave> <Greek_omega>       : "á"  U1fa2
<Multi_key> <bar> <grave> <greater> <Greek_omega>       : "á"  U1fa2
<Multi_key> <greater> <bar> <grave> <Greek_omega>       : "á"  U1fa2
<Multi_key> <greater> <grave> <bar> <Greek_omega>       : "á"  U1fa2
<Multi_key> <grave> <bar> <greater> <Greek_omega>       : "á"  U1fa2
<Multi_key> <grave> <greater> <bar> <Greek_omega>       : "á"  U1fa2
<dead_iota> <dead_horn> <dead_grave> <Greek_omega>      : "á"  U1fa2
<dead_iota> <dead_grave> <dead_horn> <Greek_omega>      : "á"  U1fa2
<dead_horn> <dead_iota> <dead_grave> <Greek_omega>      : "á"  U1fa2
<dead_horn> <dead_grave> <dead_iota> <Greek_omega>      : "á"  U1fa2
<dead_grave> <dead_iota> <dead_horn> <Greek_omega>      : "á"  U1fa2
<dead_grave> <dead_horn> <dead_iota> <Greek_omega>      : "á"  U1fa2

6 ways to type it with dead keys (corresponding to the six
possible combinations of the three dead keys; but dead keys
always after the letter)
and 6 ways to type it with Multi_key (you press "Multi_key", then
the following keys in the given order).

What you would like would be in fact:

<dead_horn> <dead_grave> <Greek_omega> <U0345> : "á"  U1fa2
<dead_grave> <dead_horn> <Greek_omega> <U0345> : "á"  U1fa2

(that is, two dead keys, followed by two normal keys; a key sending
Greek_omega and a key sending U0345 (COMBINING GREEK YPOGEGRAMMENI)

I haven't tested it but if it works, it could indeed be added for
all the cases and a layout with <U0345> instead of <dead_iota>, if
that is more intuitive to type.

> The keyboard map is therefore more than a map, it is a
> fsm, a stateful-map.

That is not supported at all.
If you need that, you need to develop an input method actually
(like japanese or vietnamese use), that is, a program that interpretes
what you type and produces a different input.

Yes there is something of that in console (but very limited) and
in X11 (more powerfull), but it is always linear.

(also, I m' not sure if it is possible to have, for example,
"<dead_horn> <dead_grave> <Greek_omega> <U0345>" and
"dead_horn> <dead_grave> <Greek_omega>" sequences (that is, sequences
that one is subset of another))

> If I change keyboards in
> midstream (using alt-a, for example), the fsm would
> output the components of an unaccepted character
> individually. How far will keymaps go?

You can't.
pressing Alt-A means (or any other key) means you broke the sequence.
in such case you simply lost what you typed in the incomplete sequence.

> The alt key is used like the shift key. What ascii
> character does it send? 

None.
Just as Shift doesn't send any character either.

Alt, Shift, Ctrl, etc. are interpreted by the keyboard driver;
then the keyboard driver decides what to do;
on console those keys decide which one of the many values attached to
a given key is to be sent.
Those keys doesn't send any character by themselves; it is the
combination of them and and one "normal" key that determines what is
sent.


-- 
Ki Ãa vos vÃye bÃn,
Pablo Saratxaga

http://chanae.walon.org/pablo/          PGP Key available, key ID: 0xD9B85466
[you can write me in Walloon, Spanish, French, English, Catalan or Esperanto]
[min povas skribi en valona, esperanta, angla aux latinidaj lingvoj]

Attachment: pgpSnBLxMWBKV.pgp
Description: PGP signature

Reply via email to