[Sugar-devel] Hacking onto the "appearing" and "hiding" of OSK

Gonzalo Odiard gonzalo at laptop.org
Thu Jan 24 12:02:00 EST 2013


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.langhoff at gmail.com
> wrote:

> On Thu, Jan 24, 2013 at 10:13 AM, Paul Fox <pgf at 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.langhoff at gmail.com
>  martin at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/devel/attachments/20130124/2ca27fd6/attachment.html>


More information about the Devel mailing list