First signs of life of my Apple Remote .. in OpenOffice.org
After searching a bit how to implement Martin Kahr's code, to make Apple Remote work with OpenOffice.org, looks like I got something :Menu button is seen as the value "8"
|<< is seen as "64"
>>| is seen as value "32"
- is seen as value "4"
+ as value "2"
|> || (play pause) as value "16"
Originaly, Martin did a complete reverse engineering of the thing, because the API was undocumented ( who is surprised ? ). We all expect to see apple publy something a day. Would be nice to replace some "magics" with something more academic ;-)
What is nice, is the 8 value (giving the FrontRow effect) is seen when you start the FrontRow and when you return in normal screen mode. Other point is all keys you hit when in front row mode are seen.
Seems crazy, but why not imagine we could use the FrontRow effect with OpenOffice.org ? I need to ask Martin Kahr, who gracefully accepted the integration (say adaptation, because there is some work yet) of his code into OpenOffice.org.
The trace (using gdb) :
2008-06-20 20:46:06.528 soffice.bin[11541] Button 8 pressed down 1
2008-06-20 20:46:06.539 soffice.bin[11541] Button 8 pressed down 0
2008-06-20 20:46:09.302 soffice.bin[11541] Button 8 pressed down 1
2008-06-20 20:46:09.312 soffice.bin[11541] Button 8 pressed down 0
2008-06-20 20:46:28.077 soffice.bin[11541] Button 64 pressed down 1
2008-06-20 20:46:28.087 soffice.bin[11541] Button 64 pressed down 0
2008-06-20 20:46:32.229 soffice.bin[11541] Button 32 pressed down 1
2008-06-20 20:46:32.239 soffice.bin[11541] Button 32 pressed down 0
2008-06-20 20:46:33.975 soffice.bin[11541] Button 4 pressed down 1
2008-06-20 20:46:34.142 soffice.bin[11541] Button 4 pressed down 0
2008-06-20 20:46:35.670 soffice.bin[11541] Button 2 pressed down 1
2008-06-20 20:46:35.760 soffice.bin[11541] Button 2 pressed down 0
2008-06-20 20:46:37.495 soffice.bin[11541] Button 16 pressed down 1
2008-06-20 20:46:37.505 soffice.bin[11541] Button 16 pressed down 0
As you can see, this is only the beginning, but this is very encouraging. Thanks a lot to Martin Kahr for his work.
Next steps will be associate the events with vcl events, simulate the keyboard access, read slideshow code .. and so on.
To be continued :-)
Important Links :
Martin Kahr website for Apple Remote
OpenOffice.org wiki page for Apple Remote implementation
Libellés : aqua, development, fun
<< Accueil