Index: [thread] [date] [subject] [author]
  From: Andreas Beck <becka@rz.uni-duesseldorf.de>
  To  : ggi-develop@eskimo.com
  Date: Mon, 24 May 1999 23:30:10 +0200

Re: Keys & leds & bell & input driver stuffs

> I'm progressing pretty well on the lk201/lk401 keyboard driver, but I have
> some questions on the basics of gii. 

> First, what is the best way to encode the labels with the modifiers to
> form the sym field of the key event?  A presume that the best approach
> would be to use a table?  Perhaps one table for each label with the shift
> modifier down, one for caps, and one for control?

Yes, basically. I usually use a combination of a direct lookup table
sym[keycode] plus a list of {code,sym} pairs for sparse mappings, where 
only a few keys are mapped.
And a fallback system that takes the normal mappings, if some modifier
combination is unsupported.

> Next, my keyboard has some neato features, such as keyclick, bell, leds,
> etc, all of which X supports.  Does XGGI implement these? 

No, don't think so. But we have the source :-)

> Can these be done via an input driver on libgii?  

Yes. Sure.

> I guess that some sort of event must
> be sent to the input driver?  A command event perhaps?

Yes, that's how I'd do it.

> One thing that I am unclear about is the GIIsendevent callback function of
> the gii_input structure.  (I just cut and pasted this one. Thank you,
> original author :)  By the name, I presume that this is used for sending
> events.  However, it looks to me like it is for processing events that are
> send by the application or another device? 

Yes - except for the "another". It's for "this" device ...

The names are given from the application point-of-view.

> Can someone please clarify
> this to me?  (It looks to me like this is what I am interested in for the
> keyclick, bell, etc)

Yes. Right. IIRC the xwin driver has a few callbacks ... yes ... use it for
guidance.

> Anyways, if anybody would like a copy of what I have done so far, please
> say so!  I don't know how many people would actually be interested in such
> an exotic (from pc user point of view) keyboard though. 

Well - it might be interesting for multihead. Though USb devices should be
available some day :-).

When you feel like it's ready, I can drop it into CVS. In case some testers
yell "here", I can do so earlier as well.

CU, ANdy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

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