Is it possible to hack the "rotate" key?
ajay at activitycentral.com
Mon Feb 18 09:10:57 EST 2013
Thanks Gary and Paul.
I tested "Moon" on build 28 on XO-4; and the rotation caused the canvas to
be redrawn appropriately.
I have two queries ::
In "Moon"'s code (as already told by Gary), the "size-changed" signal is
used to call the callback that redraws the canvas.
So, in this case, is the "size-changed" signal a result of the
rotate-key-event (KEY_SWITCHVIDEOMODE), or "size-changed" signal is
generated via some another mechanism?
Is the behaviour of olpc-kbdshim the same for a XO-1.75 and a XO-4 (as far
as "that code is written to either run a command
attached to the event (currently /usr/bin/olpc-rotate), or pass the event
through, but not both" is concerned)?
On Mon, Feb 18, 2013 at 7:18 PM, Paul Fox <pgf at laptop.org> wrote:
> ajay 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
> as gary points out, the rotate key event (KEY_SWITCHVIDEOMODE) is
> caught by olpc-kbdshim. that code is written to either run a command
> attached to the event (currently /usr/bin/olpc-rotate), or pass the
> event through, but not both.
> if there were consensus that running the command _and_ passing the
> event was safe and reasonable, maybe we could do that, though it
> doesn't feel right to me.
> but i also think gary's on the right track by suggesting you look at
> other window events to learn of the rotation changes -- after all,
> rotation doesn't require a button press. it can be caused by manual
> xrandr invocation, or simply by someone typing "olpc-rotate left".
> > I will be thankful for any pointers.
> > Regards,
> > Ajay Garg
> > Dextrose Developer
> > Activity Central: http://activitycentral.com
> > part 2 text/plain 129
> > _______________________________________________
> > Devel mailing list
> > Devel at lists.laptop.org
> > http://lists.laptop.org/listinfo/devel
> paul fox, pgf at laptop.org
> Devel mailing list
> Devel at lists.laptop.org
Activity Central: http://activitycentral.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Devel