Re: Experiments with classical Greek keyboard input

2006-05-09 Thread Vasilis Vasaitis
  Since I'm still cc'ed here...

On Tue, May 09, 2006 at 09:04:52PM +0300, Joe Schaffner wrote:

..[snip]..

>  is on the semi-colon key and  is on the same
> key, shifted, the colon key.
> 
>  is on the single-quote key and  is on the
> double-quote key.
> 
> That's a pretty good layout. I like it.
> 
> Why not name these keysyms  and ?

  Because the list of keysyms is fixed, as defined in
/usr/include/X11/keysymdef.h. At the time, using arbitrary existing
keysyms made more sense than petitioning for "correctly-named" new
ones. It works, after all. But OK, now maybe it's time to ask for a
few new names if people are annoyed by the current state of affairs.

> 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.

  The canonical invocation would be:

setxkbmap -layout us,gr -variant ,polytonic \
-option grp:alt_shift_toggle

> 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?).

  In /etc/X11/xkb, rules/xorg transforms grp:alt_shift_toggle to
group(alt_shift_toggle). So you can look at the relevant section in
symbols/group to see how this implements the layout switching. It all
boils down to the generation of the ISO_Next_Group and ISO_Prev_Group
keysyms.

> Yes, I can enter greek characters. The  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?

  For the others to work, you need to have at least
LC_CTYPE=el_GR.UTF-8. In my system, with LANG=el_GR.UTF-8, everything
is working as it should. Keep in mind that for GTK+ applications you
also need GTK_IM_MODULE=xim defined (or else you have to right-click
on each textbox, and select Input Methods -> X Input Method).


-- 
Vasilis Vasaitis
"A man is well or woe as he thinks himself so."



--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Experiments with classical Greek keyboard input

2006-05-09 Thread Joe Schaffner

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  { [], [  dead_tilde, dead_diaeresis, dead_macron ] };
   key  { [], [  dead_iota,  VoidSymbol, dead_breve  ] };

   key  { [], [  dead_acute, dead_horn   ] };
   key  { [], [  dead_grave, dead_ogonek ] };

};

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

 is on the semi-colon key and  is on the same
key, shifted, the colon key.

 is on the single-quote key and  is on the
double-quote key.

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

Why not name these keysyms  and ?

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  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:

   : "αΌ€"  U1f00
: "αΌ€"  U1f00
  : "ἁ"  U1f01
  : "ἁ"  U1f01
: "αΌ‚"  U1f02
: "αΌ‚"  U1f02
: "αΌ‚"  U1f02
: "αΌ‚"  U1f02
   : "αΌƒ"  U1f03
   : "αΌƒ"  U1f03
  : "αΌƒ"  U1f03
  : "αΌƒ"  U1f03
   : "αΌ„"  U1f04
   : "αΌ„"  U1f04
: "αΌ„"  U1f04
: "αΌ„"  U1f04
  : "αΌ…"  U1f05
  : "αΌ…"  U1f05

 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  is intended to function as psili and
the  as the dasia.

Are the names of the keysyms important?

If not, why not call them  and ?

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

(e)~ιμεν)

The  is an undefined tag which the