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 -- Linux-UTF8: i18n of Linux on all levels Archive: http://mail.nl.linux.org/linux-utf8/