Write does not know what is the ebook switch state, that logic is in the osk.
Looking in the wiki and sugar code, I could not find information about how read the switch, but in ticket http://dev.laptop.org/ticket/12326 found this: If you do: evtest --query /dev/input/event4 EV_SW SW_TABLET_MODE; echo $? If the xo is in ebook mode returns 10, if not, returns 0. There are any official doc about the switches I am missing? There are a way to catch a event when the switch is activated, using dbus or something similar? Gonzalo On Thu, Jan 24, 2013 at 12:16 PM, Martin Langhoff <martin.langh...@gmail.com > wrote: > On Thu, Jan 24, 2013 at 10:13 AM, Paul Fox <p...@laptop.org> wrote: > > i believe sugar already has code to detect the two modes, since > > that's how it knows whether to present the OSK or not. > > Yep. Ajay, I think Write shows you the way :-) > > > > > m > -- > martin.langh...@gmail.com > mar...@laptop.org -- Software Architect - OLPC > - ask interesting questions > - don't get distracted with shiny stuff - working code first > - http://wiki.laptop.org/go/User:Martinlanghoff >
_______________________________________________ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel