Is it possible to hack the "rotate" key?
garycmartin at googlemail.com
Mon Feb 18 08:16:27 EST 2013
On 18 Feb 2013, at 11:12, Ajay Garg <ajay at activitycentral.com> wrote:
> Hi all.
> Is it possible to hack the "rotate" key in XO?
> I wish to have the following working ::
> * Press the "rotate" key. This will rotate the window.
> * Just after that, have a callback function being called in "sugar" (this of course being possible only if the "rotate" key could be hacked).
> I will be thankful for any pointers.
This is a little out of my league, but I think you'll need to take a look at olpc-kbdshim  so see how things are currently triggered, in particular the olpc-rotate script. If you want to pickup aspect ration changes on the Sugar side, perhaps hook a gtk.gdk.screen_get_default().connect('size-changed', <do something interesting>) callback intp the sugar toolkit. I've implemented something simple like this in the Moon activity, so that it uses different layouts for landscape and portrait screen orientations .
> Ajay Garg
> Dextrose Developer
> Activity Central: http://activitycentral.com _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
More information about the Devel