Index: [thread] [date] [subject] [author]
  From: Andrew Apted <ajapted@netspace.net.au>
  To  : ggi-develop@eskimo.com
  Date: Thu, 13 Aug 1998 11:14:08 +1000

Re: ggi_key_event confusion

Marcus writes:

>  Currently ggi_key_event has these three entries:
>          uint32  sym;            /* meaning of key (action)      */
>          uint32  code;           /* keyboard's code for key      */
>          uint32  label;          /* label on key                 */
>  
>  The only obvious entry is "code", and that is not properly implemented
>  (or implemented at all) on most targets.                       

Actually "code" is the only one whose values are ill-defined (it is
keyboard/architechture dependant).  It is only kept to keep a certain
application happy (a windowing system, single letter name, you might
have heard of it... :-).

>  What we need is one entry describing what physical key was pressed

That is "label".

>  and one entry describing the meaning of that key, with regard taken
>  to modifiers and such. 

That is "sym".

>  And we need _every_ supported value for both
>  these entries to have a corresponding GGI_* define.

The GGI_KEY_* handle both labels and syms.  For example, pressing ALT+F1
gives a label of GGI_KEY_F1, and a sym of GGI_KEY(KT_CONS, 0).

For ordinary keys (letters, digits and such), the label and sym values
are just Unicode.  Thus values <= 0xff are just ISO-8859-1 (hence the
GGI_KT_LATIN1 keytype).  For example, pressing SHIFT+A gives a label of
0x61 ('a') and a sym of 0x41 ('A').

[With a few exceptions, label is just the sym value you get with no
modifiers pressed].

I noticed you added a set of keys for latin1 chars (GGI_KV_*), but IMHO
this is rather silly, since the values are defined by the Unicode /
ISO-8859-1 standards and will never change.  Should we add the other
30000 unicode values too ? *hehehe*

Cheers,
_____________________________________________  ____
                                               \  /
  Andrew Apted   <andrew@ggi-project.org>       \/
  

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