After lengthy consideration, I have come to the conclusion xkb has
nothing to do with character mapping.

It only maps keyboard events to keysyms, which are not characters i.e.
it creates the (integer-valued, I assume) names of the key
combinations, and 2) it allows you to "group" the keysyms into
language-specific quasi-keyboards.

I have these two keymaps i.e. "groups" on my system:

/etc/X11/xkb/symbols/el -- The one I'm using

/etc/X11/xkb/symbols/gr -- The dirty bastard

Here is an excerpt from the latter:

partial alphanumeric_keys alternate_group
xkb_symbols "polytonic" {

   include "el(extended)"

   key.type = "THREE_LEVEL";

   key <AD11> { [], [  dead_tilde,     dead_diaeresis, dead_macron     ] };
   key <AD12> { [], [  dead_iota,      VoidSymbol,     dead_breve      ] };

   key <AC10> { [], [  dead_acute,             dead_horn       ] };
   key <AC11> { [], [  dead_grave,             dead_ogonek     ] };

};

I assume the list of keysyms captures the shifted state of the key i.e.

<dead_acute> is on the semi-colon key and <dead_horn> is on the same
key, shifted, the colon key.

<dead_grave> is on the single-quote key and <dead_ogonek> is on the
double-quote key.

That's a pretty good layout. I like it.

Why not name these keysyms <dead_psili> and <dead_dasia>?

Anyway, I activate the gr keymap like this:

setxkbmap "us,gr(polytonic)" -option "grp:alt_shift_toggle"

The command syntax is troublesome. There seem to be other ways of
doing it. Maybe I'm wrong, but it seems to work.

Yes, the keymap is there, I can see it on the task bar. To switch to
another group, I can use the alt_shift combination (another meta
symbol? Where are all these symbols defined?).

Yes, I can enter greek characters. The <dead_acute> seems to work, but
I am not sure if it is outputting a tonos or a acute. It's probably a
tonos.

None of the other dead keys seem to work.

Any ideas?

Joe
http://modern-greek-verbs.tripod.com/sarris/

PS

The character mapping seems to take place in the per-locale Compose
file (ergo non potest delendum esse). That would make sense, because
you'd need a separate character mapping for each character set. One
group corresponds to many Compose files. The one I seem to be using
is:

/usr/X11R6/lib/X11/locale/el_GR.UTF-8/Compose

Here are some character mappings:

<Multi_key> <greater> <Greek_alpha>                     : "αΌ€"  U1f00
<dead_horn> <Greek_alpha>                               : "αΌ€"  U1f00
<Multi_key> <less> <Greek_alpha>                        : "ἁ"  U1f01
<dead_ogonek> <Greek_alpha>                             : "ἁ"  U1f01
<Multi_key> <greater> <grave> <Greek_alpha>             : "αΌ‚"  U1f02
<Multi_key> <grave> <greater> <Greek_alpha>             : "αΌ‚"  U1f02
<dead_horn> <dead_grave> <Greek_alpha>                  : "αΌ‚"  U1f02
<dead_grave> <dead_horn> <Greek_alpha>                  : "αΌ‚"  U1f02
<Multi_key> <less> <grave> <Greek_alpha>                : "αΌƒ"  U1f03
<Multi_key> <grave> <less> <Greek_alpha>                : "αΌƒ"  U1f03
<dead_ogonek> <dead_grave> <Greek_alpha>                : "αΌƒ"  U1f03
<dead_grave> <dead_ogonek> <Greek_alpha>                : "αΌƒ"  U1f03
<Multi_key> <greater> <apostrophe> <Greek_alpha>        : "αΌ„"  U1f04
<Multi_key> <apostrophe> <greater> <Greek_alpha>        : "αΌ„"  U1f04
<dead_horn> <dead_acute> <Greek_alpha>                  : "αΌ„"  U1f04
<dead_acute> <dead_horn> <Greek_alpha>                  : "αΌ„"  U1f04
<Multi_key> <less> <apostrophe> <Greek_alpha>           : "αΌ…"  U1f05
<Multi_key> <apostrophe> <less> <Greek_alpha>           : "αΌ…"  U1f05

<Multi_key> is a diversionary tactic. I guess it would let me use the
polytonic characters while in monotonic mode. I wouldn't have to
change groups. (I tried it, but it didn't work. However, I could use
all the French characters while in USA mode)

I can see that the <dead_horn> is intended to function as psili and
the <dead_ogonek> as the dasia.

Are the names of the keysyms important?

If not, why not call them <dead_psili> and <dead_dasia>?

Question: The greek-locale Compose file contains character mappings
for all the composed characters.

Where are the mappings for the simple, non-composed greek characters?

It would be nice to see the entire character map in the same place.
====================================

On 4/14/06, Joe Schaffner <[EMAIL PROTECTED]> wrote:
Thanks Jan,

Your message gave me some encouragement. I'll try starting the
gr(polytonic) map again tomorrow, and experiment with the dead keys,
but I don't have much time to lose. It took me 2 or 3 hours to do the
perl script, and I have lost days experimenting with system software.

The problem I have with system software is that it usually makes a
fool out of me, and I don't find the xkb intuitive at all. By
intuitive, I mean it reads my mind and does what I want.

I found the mono Greek map quite intuitive, but I believe I saw a
program somewhere which had a Gui keyboard with all the keys marked. I
was wondering, is there anyway to see the poly greek keyboard on my
system?

> Ceterum censeo /usr/lib/X11/locale/el_GR.UTF-8/Compose esse delendam.

I was happy to find it, because it listed all the poly greek
characters, but I was a bit surprised to find it in a 'locale'
directory, well, in an X11/locale directory. I'd eventually like to
sort out the locale and the keymap stuff, because at first glance, I
don't know what one has to do with the other.

Joe
http://modern-greek-verbs.tripod.com/

PS

I found a key conflict with my program. Sometimes I need to enclose
greek text inside parentheses, like this:

(εἶμεν)

[damn, these windows fonts suck]

In this case I don't want dasia epsilon and I don't want a space
between the LP and the epsilon, so I encoded the text like this

(<m>e)~ιμεν)

The <m> is an undefined tag which the browser conveniently throws
away, respecting the spacing, like a <b> or an <i>.

I realize my program only works on text files. It won't help entering
poly Greek into OO, but I do all my work in gedit.

=======================

On 4/14/06, Jan Willem Stumpel <[EMAIL PROTECTED]> wrote:
> Joe Schaffner wrote:
>
> > Hello Thomas,
> >
> > It looks like we're all looking for non-standard ways to
> > capture polytonic Greek in Linux. This must mean no keymap
> > exists. Given one hundred years I'll figure out xkb and write
> > one.
>
> xkb is not so difficult to figure out. At the moment you can
> already enter polytonic Greek with it, and if you set the
> Greek/Latin switch to a single key (I use left-windows), entering
> mixed text consisting of Greek and Latin is not difficult.
>
> The problem is: what is, from a user point of view, the desired
> behaviour of the keyboard? At the moment xkb gr(polytonic) has:
>
> key          US  GR  keysym          with   gives
> <AD11>       [   [   dead_tilde       α       ᾶ  (perispomeni)
> shift<AD11>  {   {   dead_diaeresis   υ (=y)  ϋ  (dialytika)
> altgr<AD12>      «   dead_macron      α       ᾱ  (macron)
>
> <AD12>       ]   ]   dead_iota        α       ᾳ  (iota subscript)
> shift<AD12>  }   }   VoidSymbol       α       α  (does nothing)
> altgr<AD12>      »   dead_breve       α       ᾰ  (breve)
>
> <AC10>       ;   ´   dead_acute       α       ά  (tonos/oxia)
> shift<AC10>  :   ¨   dead_horn        α       ἀ  (psili)
> altgr<AC10>      ΅   [not defined]    α       α  (does nothing)
>
> <AC11>       '   '   dead_grave       α       ὰ  (varia)
> shift<AC11>  "   "   dead_ogonek      α       ἁ  (dasia)
> altgr<AC11>          [not defined]    α       α  (does nothing)
>
> AC and AD indicate the third and fourth keyboard row from below,
> respectively. The number indicates the position of the key
> counting from the left, but not counting shift, capslock, tab.
>
> The column "US" shows which symbols are engraved on the physical
> keys of a standard US PC 104 keyboard. The column "GR" shows what
> is engraved on the physical keys of a Greek keyboard, according to
> Wikipedia (http://en.wikipedia.org/wiki/Keyboard_layout#Greek). I
> do not know how standard this is (in Greece).
>
> The keysyms dead_ogonek and dead_horn are only interpreted as
> dasia and psili if the locale is el_GR.UTF-8. To use gr(polytonic)
> with 'international' UTF-locales, these keysyms should be replaced
> by 0x1000314 and 0x1000313 respectively (edit the file
> /etc/X11/xkb/symbols/pc/gr).
>
> Combinations, like ᾄ, are also possible; you have to use a fixed
> order:
>
> -- iota subscript first
> -- accent second
> -- breathing third
>
> So for ᾧ you woud enter the keystroke sequence (keys as marked on
> a US keyboard) ]["v. [The order, I admit, seems unnatural. The
> order that you propose looks better. This can be changed in the
> Compose file, and maybe it should be filed as a bug -- but where?
> Where does the Compose file come from?]
>
> This works in openoffice, mozilla, and any text-mode editor you like.
>
> The question is, is this a workable system in practice? I am sure
> any desired keyboard behaviour could easily be made to work with
> the tools we have (editing the files in /etc/X11/xkb and the
> Compose file).
>
> For instance, earlier on the list, Simos Xenitellis called
> attention to a proposal for polytonic handling in Linux:
> http://planet.hellug.gr/misc/polytonic/
>
> This document has some keyboard combination tables of which a
> small part is given below:
>
> tonos/oxia ΄        Dead key (;) + vowel
> dialytika ¨         Dead key (:) + vowel (only υ, ι)
> perispomeni ῀       Dead key ([) + vowel
> iota subscript ͺ    Dead key ({) + vowel
> psili ᾿             Dead key (') + vowel/ρ
> dasia ῾             Dead key (") + vowel/ρ
> varia `             Dead key (/) + vowel
> macron ¯            Dead key (]) + vowel
> breve ˘             Dead key (}) + vowel
>
> Only a few of those are the same as what xkb now provides, but it
> is easy to change /etc/X11/xkb/symbols/pc/gr to give it this
> behaviour:
>
> xkb_symbols "polytonic" {
>
>    include "pc/el(extended)"
>
>    name[Group1] = "Greece - Polytonic";
>
>    key <AD11> { [   dead_tilde,   dead_iota       ] };
>    key <AD12> { [   dead_macron,  dead_breve      ] };
>    key <AC10> { [   dead_acute,   dead_diaeresis  ] };
>    key <AC11> { [   0x1000313,    0x1000314       ] };
>    key <AB10> { [   dead_grave,   question        ] };
> };
>
> This of course makes the / key "dead". The AltGr key is no longer
> used. The Compose file does not have to be changed, but if the
> other characters mentioned in the 'proposal' would have to be
> entered (koppa, digamma, etc.) a few lines should be added to it.
>
> Would this be easier to use than the present xkb system? I don't
> know.
>
> Thomas Wolff suggests using 'unused' keys like F6 for oxia, etc.
> Again, I think that usability is the most important criterion for
> the choice. To type Greek you would have to switch your keyboard
> from Latin to Greek anyway. In the 'Greek' state all keys can get
> a different function. Ideally the 'Greek' keys would do similar
> things to 'Latin' keys (i.e. dead tilde would become dead
> perispomeni, dead acute would become dead tonos, perhaps alt-i
> could become dead_iota, etc.). But there does not seem to be a
> special need to look for 'unused' keys, because in 'Greek' mode,
> keys can be re-used.
>
> Finally, would the system which is available on Windows XP
> (http://www.microsoft.com/globaldev/perspectives/polytonic.mspx)
> be better for people who type a lot of polytonic? This may require
> fewer keystrokes. However, there are a lot of altgr and
> shift-altgr combinations, and it looks like it would take quite
> some effort to learn them. To make this method work on Linux it
> seems we would have to invent keysyms for 'combined accents'
> (treating, for instance, dasia+oxia+dead_iota as 'one thing'). Or
> perhaps existing keysyms could be (ab)used, like the ogonek in the
> original xkb gr file. It certainly can be done (although it would
> be a bit of work). Well, unless μ$ has patented this.
>
> > [..] The encoding always begins with the breathing (if it
> > exists)followed by the accents (if they exist) followed by the
> > iota subscript (if it exists). [My locale Config file at home
> > has listed all the combinations in any order, but I find that
> > tedious.]
>
> > [..] The perl script works. Here it is: [..]
>
> It certainly works, but it is an 'off-line' method, similar to the
> beta code to utf-8 converter by Dimitri Marinakis
> (http://tlgu.carmen.gr). Such utilities are useful, but wouldn't
> it be better to type polytonic utf-8 directly?
>
> Ceterum censeo /usr/lib/X11/locale/el_GR.UTF-8/Compose esse delendam.
>
> Regards, Jan
> http://www.jw-stumpel.nl/stestu
>
>
>

Reply via email to