[BRLTTY] Almost done with my brltty driver...

Dave Mielke dave at mielke.cc
Mon Mar 12 23:30:15 EDT 2012


[quoted lines by timothyhobbs at seznam.cz on 2012/03/13 at 03:58 +0100]

>      default:printf("Keypress%d \n",key);
>              enqueueKeyEvent(VO_SET_NavigationKeys, key, 0);

This'd just enqueue a key release event. For now, you probably want something 
like this:

   enqueueCommand(BRL_BLK_ROUTE + key);

Routing keys are zero-origin, so this example assumes that key==0 means bring 
the cursor to the character associated with the leftmost cell on the display. I 
don't know how your key values are assigned, but I believe your display would 
only have a length of 1 anyway.

>I should say, that I would happilly use the keytables as done in the voyager 
>driver, and as you sugested a month back, but I really don't understand how 
>they work.  I've never even seen such a data structure in C, is it done with a 
>macro?  

Yes, there are macros which make the writing of key tables fairly easy.

>Where do the strings "Dot1", "JoystickEnter",ect come from?  What do they 
>represent?  

For example:

   KEY_NAME_ENTRY(value, "name")

associates a physical key value (meaningful to the driver, perhaps 
hardware-genetated) with a logical key name (meaningful to the key table 
writer).

>Is there a reason for me to use the key tables?  

Key tables let you assign meanings to the keys in a text-editable file outside 
of the code itself.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | 2011 May 21 is the End of Salvation.
EMail: dave at mielke.cc | Canada  K2A 1H7   | http://Mielke.cc/now.html
http://FamilyRadio.com/                   | http://Mielke.cc/bible/


More information about the BRLTTY mailing list