Is it possible to hack the "rotate" key?
Paul Fox
pgf at laptop.org
Mon Feb 18 08:48:41 EST 2013
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 hacked).
>
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".
paul
>
>
> 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
More information about the Devel
mailing list