[Sugar-devel] testers wanted: grab keys, and touchpad rotation

Paul Fox pgf at foxharp.boston.ma.us
Wed Mar 4 16:25:37 EST 2009


last week i announced a daemon that would activate the grab keys
on the XO keyboard.

a day or two later there was a thread about how it would be nice
if the action of the touchpad rotated with the screen (in much the
same way that the dpad keys do).

since my daemon was already looking at every input event, it seemed
a natural place to implement the rotation feature.

and after doing that, the name seemed like it should change.

so, announcing "olpc-kbdshim".

source:
    http://dev.laptop.org/git?p=users/pgf/olpc-kbdshim

rpm:
    http://dev.laptop.org/~pgf/rpms/olpc-kbdshim-1-1.i386.rpm

after installing the rpm you need to fully reboot your laptop to
get the plumbing set up properly.

the rpm includes a new command "olpc-rotate" which takes care of
all the mechanics of screen and touchpad rotation.  since sugar
(currently) handles this key binding, the rpm postinstall script
patches /usr/share/sugar/shell/view/keyhandler.py so that it
invokes os.system("olpc-rotate") _instead_ of its current builtin
behavior.  separating it out like this makes olpc-kbdshim and
olpc-rotate more useful for non-sugar UIs.  i wrote the sugar
patch so that it won't break if you uninstall the olpc-kbdshim
rpm -- sugar will take over the rotate function again.  also,
though i haven't tried it on today's brand-new sugar 0.84 (good
work everyone!), a look at the current keyhandler.py says the patch
should still apply correctly.

the topic of ebook-mode touchpad usage came up the other day too. 
while i didn't create any visible UI support for it, the daemon
will put the touchpad in and out of ebook-mode (which means,
reflecting it on both x and y axes) using "olpc-rotate -e/-n"

please let me know what you think...

paul

p.s.  btw, the daemon isn't really very olpc-specific.  i've been 
running it on my thinkpad all week.  it turns out the blue Fn
key in the corner can be used as a modifier, so that plus my
trackstick gives 2D scrolling -- it came in very handy for looking
at the bootchart images this morning.

=---------------------
 paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 35.2 degrees)


More information about the Sugar-devel mailing list