Index: [thread] [date] [subject] [author]
  From: Marcus Sundberg <mackan@stacken.kth.se>
  To  : ggi-develop@eskimo.com
  Date: Sun, 07 Mar 1999 13:19:36 +0000

Re: Dead keys

Andrew Apted wrote:
> 
> Marcus writes:
> 
> >  How do we want to support dead keys?
> >
> >  "sym" is fairly obvious, GIIK_VOID when a dead key is pressed and
> >  then the symbol when the next key is pressed. What about "label"?
> >  People might have both normal and dead versions of the same key,
> >  so we need labels for them.
> 
> No, labels aren't affected.  There is only one label per key (so you can't
> have "normal and dead versions").

Sure you can, it's just a matter of keymapping. (And labels are
dependent
of that, on my keyboard (which is a UK I believe) the key to the right
of
'L' has a ';' label, but nevertheless LibGGI will return
GIIUC_Odiaeresis
because I use a Swedish keymap.)

> >  It would make most sense to add a GII_KT_DEAD, as it makes it easy
> >  to construct dead keys and doesn't limit us to a few keys.
> 
> Hehehe, it's funny you say that, we used to have it (from linux: KT_DEAD).

I know, but then it wasn't defined what purpose it had in the GII API,
and the code badly needed a cleanup as you know.

> There isn't really a big need for it IMHO, either you know the dead key
> (e.g. DIERESIS) and handle it in a switch() statement, or you don't know
> it and you ignore it.  Hmmm... do _applications_ really want to know ?
> I don't think so.

As mentioned above they'll want to know the label in case there
is another (undead? ;) key with the same label.

> Now, should we add code to e.g. linux-kbd to do dead key processing ?

Yes, that's the last piece missing before LibGII has the best keyboard
handling system in the known universe. ;-)

> It's possible, there is the KDGKBDIACR ioctl for reading the
> accent_table...  I'd say yeah, give it a go if you want to.
> 
> The event sequence would look like this:
> 
>    user action     ev.type     sym         label
> 
>    press dieresis  KeyPress    GIIK_VOID   '.' (for example)
>    release it      KeyRelease  GIIK_VOID   '.'
> 
>    press 'a'       KeyPress    a-umlaut    'a'
>    release it      KeyRelease  a-umlaut    'a'

Yep, this is exactly what I meant, just with the addition that we
need to support dead keys in the label field for some cases.

<nitpick>
Don't forget that label is always uppercase, we don't want to confuse
our developers. ;-)
</nitpick>

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan/
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: mackan@stacken.kth.se

Index: [thread] [date] [subject] [author]