Jim Gettys | 1 May 01:38
Favicon
Gravatar

Recalibrating the touchpad.

 As a capacitive sensor, when the environment changes, the capacitive
touchpad will need recalibration. The B2 and before touchpads do not
auto-calibrate.
 1) if you have your finger on the touchpad during power-on, you can
cause problems.
 2) the calibration may shift when you go to/from battery power, or
after resuming from suspend (not yet deployed).

To force a recalibration of the touchpad, you perform what we call the
"four finger salute".  To recalibrate, press all four keys at the
corners of the keyboard at the same time, pressing the "alt" key last,
while keeping your fingers off the touchpad.

BTest-3 and beyond will automatically recalibrate.  We received samples
of the BTest-3 touchpads late last week, and have installed several, and
are happy so far with their behavior.

Remember: please leave the (slightly off color) plastic sheet on the
touchpad; it does make the touchpads work much better.
                                      - Jim

--

-- 
Jim Gettys
One Laptop Per Child
Jim Gettys | 1 May 13:11
Favicon
Gravatar

Re: Recalibrating the touchpad.

Oops, I meant the Fn key.  Let's try this again.

 As a capacitive sensor, when the environment changes, the capacitive
touchpad will need recalibration. The B2 and before touchpads do not
auto-calibrate.
 1) if you have your finger on the touchpad during power-on, you can
cause problems.
 2) the calibration may shift when you go to/from battery power, or
after resuming from suspend (not yet deployed).

To force a recalibration of the touchpad, you perform what we call the
"four finger salute".  To recalibrate, press all four keys at the
corners of the keyboard at the same time, pressing the "fn" key last,
while keeping your fingers off the touchpad.

BTest-3 and beyond will automatically recalibrate.  We received samples
of the BTest-3 touchpads late last week, and have installed several, and
are happy so far with their behavior.

Remember: please leave the (slightly off color) plastic sheet on the
touchpad; it does make the touchpads work much better.

On Mon, 2007-04-30 at 19:38 -0400, Jim Gettys wrote:
> As a capacitive sensor, when the environment changes, the capacitive
> touchpad will need recalibration. The B2 and before touchpads do not
> auto-calibrate.
>  1) if you have your finger on the touchpad during power-on, you can
> cause problems.
>  2) the calibration may shift when you go to/from battery power, or
> after resuming from suspend (not yet deployed).
(Continue reading)

Gonzalo Odiard | 3 May 06:18
Picon

Error building atk

checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.5.7...
*** 'pkg-config --modversion glib-2.0' returned 2.12.9, but GLIB (2.12.11)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.0.0...
*** 'pkg-config --modversion glib-2.0' returned 2.12.9, but GLIB (2.12.11)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error:
*** GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/ . If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
*** error during stage configure of atk: ########## Error running ./configure --prefix /home/gonzalo/sugar/sugar-jhbuild/build   *** [10/58]

_______________________________________________
Sugar mailing list
Sugar <at> laptop.org
http://mailman.laptop.org/mailman/listinfo/sugar
Shankar Pokharel | 3 May 11:15
Picon

Fwd: OLPC Nepal looking for Volunteers for this Summer

---------- Forwarded message ----------
From: Bryan Berry <bryan.berry <at> gmail.com>
Date: May 3, 2007 6:54 AM
Subject: OLPC Nepal looking for Volunteers for this Summer
To: devel <at> laptop.org, games <at> laptop.org, olpc-open <at> laptop.org

from: http://olpcnepal.blogspot.com/2007/05/were-looking-for-volunteers-for-this.html

As you may read in the previous Post " An Amazing Educator," a
fantastic educator has joined our group. We are looking to work with
her very intensely this summer to implement many of her existing
learning activities and add as many cool activities as we can. In the
fall we plan to visit many, many schools to figure out how kids and
teachers react to these materials.

Right now we have three full-time volunteer developers, all of them
Nepali. We would love four (4) foreign volunteers to come work with us
this summer in Kathmandu. We will pair each foreign volunteer with a
Nepali intern. That should bring our content strike force to 11
people. That would really help us to advance OLPC in Nepal.

Requirements:
We are looking for experienced programmers. Your age and # of
university degrees are less important to us than your passion for
software development. We seek individuals with significant software
development experience on Linux, ideally in Python, PyGames, C, etc.
You should have already run the OLPC image in an emulator.

You should expect to stay in Nepal for a minimum of 6 weeks. You can
stay a maximum of 5 months due to Nepal's complex visa rules. If your
application is selected, you can start as soon as you can get here.

Compensation:
We are prepared to offer a generous salary package of $0 per month,
reimburse you for a full 0% of your airplane ticket cost, and offer no
health plan. We don't have any $ :) Our office, bandwidth, and
computers have all been donated. We can offer comfortable lodging for
a total of four volunteers. We can accept additional volunteers if
they are willing to find and pay for their own accommodation.

We can offer you an opportunity to work w/ a very passionate team of
engineers on one of the most exciting projects in the world. If you
are interested please send an e-mail with your C.V. and a brief
description of what you have done w/ OLPC so far to bryan at olpcnepal
dot org

Unfortunately, summer is monsoon season so Nepal aweseome trekking
isn't a good idea. Still, it's been a weird year weather-wise. We'll
try to get you out for a trek near the end of the summer.

We'll take you running/hiking in the hills surrounding Kathmandu if
you are so inclined and subject you to Ankur's bad jokes (and they are
very bad).

The Work:
You will work closely with our lead developers Shankar, Ankur, and
Himali Kiran and our lead educator Christine Stone. You will help
implement a series of activities based on PyGame and/or GCompris. That
means writing a lot of Python, possibly some C, working with sound
libraries, and more. If you have some exciting ideas for power
management or mesh networking, we may find some time to work on them
w/ you. However, you should expect to spend most of your time building
Sugar activities, getting feedback from Christine, revising, showing
to kids and teachers, repeat.

We will expect you to train the Nepali intern assigned to you. The
intern will most likely be an undergraduate computer science student.

The development team will frequently interact with kids and teachers
over the course of the summer.

We intend to recruit education volunteers at a later date. I'll save
that for a future blog entry.

--

-- 
Bryan W. Berry
Volunteer
One Laptop Per Child Nepal
www.olpcnepal.org
_______________________________________________
Devel mailing list
Devel <at> laptop.org
http://mailman.laptop.org/mailman/listinfo/devel
Gonzalo Odiard | 3 May 16:47
Picon

Re: Error building atk

Sorry, removing all and building again, solves  the problem.
Gonzalo

On 5/3/07, Gonzalo Odiard <godiard <at> gmail.com > wrote:
checking for pkg-config... /usr/bin/pkg-config
checking for GLIB - version >= 2.5.7...
*** 'pkg-config --modversion glib-2.0' returned 2.12.9, but GLIB (2.12.11)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
checking for pkg-config... (cached) /usr/bin/pkg-config
checking for GLIB - version >= 2.0.0...
*** 'pkg-config --modversion glib-2.0' returned 2.12.9, but GLIB (2.12.11)
*** was found! If pkg-config was correct, then it is best
*** to remove the old version of GLib. You may also be able to fix the error
*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing
*** /etc/ld.so.conf. Make sure you have run ldconfig if that is
*** required on your system.
*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH
*** to point to the correct configuration files
no
configure: error:
*** GLIB 2.0.0 or better is required. The latest version of
*** GLIB is always available from ftp://ftp.gtk.org/ . If GLIB is installed
*** but not in the same location as pkg-config add the location of the file
*** glib-2.0.pc to the environment variable PKG_CONFIG_PATH.
*** error during stage configure of atk: ########## Error running ./configure --prefix /home/gonzalo/sugar/sugar-jhbuild/build   *** [10/58]


_______________________________________________
Sugar mailing list
Sugar <at> laptop.org
http://mailman.laptop.org/mailman/listinfo/sugar
Simon McVittie | 4 May 20:16
Picon

[patch][connect-activity] Update to high-level API in latest dbus-python

The attached patches update the Connect game activity to use the new
high-level API in the latest git dbus-python, rather than the existing
low-level and non-public interfaces that Daf was previously using.

There's still a lot of room for improvement - my plan is to move some of
the code into telepathy-python - but it's considerably cleaner than
before, and uses the familiar dbus-python proxy and service objects
on the Tubes connection.

Also available from:
git+ssh://people.freedesktop.org/home/smcv/public_html/connect-activity.git
http://people.freedesktop.org/~smcv/connect-activity.git

Daf, could you review these? If you're happy with them, pull from one of the
above repos.

--

-- 
Simon McVittie, Collabora Ltd.: http://www.collabora.co.uk/
_______________________________________________
Sugar mailing list
Sugar <at> laptop.org
http://mailman.laptop.org/mailman/listinfo/sugar
Simon McVittie | 4 May 20:24
Picon

Re: [patch][connect-activity] Update to high-level API in latest dbus-python


On Fri, 04 May 2007 at 19:16:22 +0100, Simon McVittie wrote:
> The attached patches update the Connect game activity to use the new
> high-level API in the latest git dbus-python, rather than the existing
> low-level and non-public interfaces that Daf was previously using.

I should have mentioned: this requires the latest git dbus-python (the
patches J5 recently approved, plus a trivial fix I checked in today).
I'll probably make a dbus-python release on Monday if you want to stick
to tarballs (which may be wise).

	Simon
Don Hopkins | 5 May 08:08

eBook Reader user interface

Goal for improving the eBook reader user interface:

  I've been doing some exploratory programming with GTK and Sugar,
  trying to improve the user interface of the eBook reader, and make
  it useable in book mode with the gamepad.

  + Support the game keypads in eBook mode. 

    + Low level game keypad support

      Need to remap low level keyboard scan codes to Linux keyboard codes. 

      The setolpckeys.c program remaps the keys and gamepad buttons.

        Currently it maps both gamepads to the numeric keypad keys (KEY_KP8, etc),
	which the X server and GDK translates to directional keys (GDK_Up, etc).

	I tried to map them to buttons (BTN_A, etc), but the X server seems 
	to ignore keycodes in that range. 

	The xorg.conf file has a keycode mask that looked like it might help, 
	but I couldn't get it to work. 

	Need to have unique keycodes reported for each of the two gamepads, 
	which are not the same as any keyboard keys, without any predefined meanings
	like arrow keys have. 

	Need to define special purpose keycodes just for the OLPC gamepad,
	instead of trying to reuse existing but not appropriate keycodes. 

	What is the process for defining new keycodes in <linux/input.h>?

	Here's my strawman proposal for some new keycodes. 

	  Use keys ("KEY_*") instead of buttons ("BTN_*"), since they
	  seem to work better.

	  The 0x1b* range seems to be unused in <linux/input.h>, 
	  and it's between other groups of keycodes, so I'll
	  propose using that range for the OLPC. 

	  The UP/DOWN/LEFT/RIGHT keys correspond to the directional
	  keypad.

	  #define KEY_XO_GAMEPAD_UP      0x1b0
	  #define KEY_XO_GAMEPAD_DOWN    0x1b1
	  #define KEY_XO_GAMEPAD_LEFT    0x1b2
	  #define KEY_XO_GAMEPAD_RIGHT   0x1b3

	  The NORTH/SOUTH/EAST/WEST keys correspond to the other
	  buttons. Those names are agnostic to the button labels,
	  which may change from the current Playstation buttons
	  (X/O/Triangle/Square). Can anyone suggest better names for
	  the four buttons on the right?

	  #define KEY_XO_GAMEPAD_NORTH   0x1b4
	  #define KEY_XO_GAMEPAD_SOUTH   0x1b5
	  #define KEY_XO_GAMEPAD_EAST    0x1b6
	  #define KEY_XO_GAMEPAD_WEST    0x1b7

	  While we're at it, we could define keycodes for the other
	  OLPC buttons and switches on the screen. I think there are
	  some other sensor switches that could generate keycodes,
	  like opening the screen, rotating it around, and putting it
	  into book mode, so I will make some guesses at names for
	  them, just to get the discussion rolling. 

	  #define KEY_XO_SCREEN_ROTATE   0x1b8
	  #define KEY_XO_SCREEN_POWER    0x1b9
	  #define KEY_XO_SCREEN_OPEN     0x1ba
	  #define KEY_XO_SCREEN_CLOSE    0x1bb
	  #define KEY_XO_SCREEN_IN       0x1bc
	  #define KEY_XO_SCREEN_OUT      0x1bd

	  Is there an exhaustive list of all buttons and switches and
	  events on the OLPC? Are any more planned? Which ones should
	  be assigned keycodes?

      Rewrote setolpckeys.c code in Python (just uses ioctl, but needs to know keycodes).
        Writing utilities like that in Python instead of C makes it easier to 
	reconfigure the keys on the OLPC without a C compiler. 

    + High level action support.

      GTK uses "Actions" to define the actions available in an
      application, independent of the user interface used to invoke
      them. Actions can be bound to user interface widgets and
      keyboard accelerators, and they can hide, show, enable and
      disable the corresponding parts of the interface. You can
      subclass Action to define custom toolbar buttons and menu items.

      We need to define a generic way of navigating and executing the
      application's actions from the gamepad.

      We can make Sugar specific actions that create the appropriately
      styled and customized Sugar user interface widgets.

      Actions can be used to support navigation and operation of the
      toolbar components from the gamepad:

      Actions have a list of their "proxy" components (toolbar
      buttons, menu items, etc).

      Actions know how to execute a callback function, so the user
      interface components tell the action to activate, instead of
      calling the function themselves.

      The actions also know their labels, icons and tooltips.

      Actions can be shown and hidden, and all their proxies show and
      hide.

      Actions can be made sensitive or not (disabled), and all their
      proxies enable or disable.

      Actions have methods to construct toolbar buttons and menu
      items, which subclasses can override to customize the user
      interface. The higher level GTK UIManager calls these methods in
      actions to create the user interface, although you can still use
      Actions without the UIManager, by creating the components
      yourself.

      There are three standard kinds of actions: Action, which creates
      a normal button or menu item, ToggleAction, which creates a
      toggle button (checkbox), and RadioAction, which creates a radio
      button (multiple choice). 

      The GTK toolbars and menus support keyboard navigation of
      sensitive buttons, as well as showing tooltips on sensitive
      buttons, but it won't show a tooltip on unsensitive (disabled)
      buttons, tabbing skips over disabled buttons, and it kicks you
      out of buttons that get disabled while you're using them, by
      moving the focus into the next button (whatever that happens to
      be).

      All inactive items should show tooltips telling WHY they are
      inactive, and WHAT you have to do before using them. 

      Unfortunately you can't get a tooltip on an inactive item. 
      This needs to be fixed, so we can display helpful tooltips and
      documentation on any item whether active or not. 

      Unfortunlatey you can't navigate to an inactive item.  This
      needs to be fixed, so the user can use the gamepad to navigate
      to an inactive item, to find out what it is and why it's
      inactive. (Also, so you can navigate the interface predicably
      with muscle memory, because the number of presses required to
      navigate doesn't change depending on the state of the
      application.)

      A problem with the current GTK keyboard navigation behavior of
      not allowing inactive items to have the input focus, is that it
      violates the principle of least astonishment, makes the
      interface less predictable, and interferes with type-ahead:

        If you're focused on the "back page" button, and select it
        until you get to the first page, then it will become inactive
        (because you can't go back from the first page), which
        results in the input focus being kicked out of the "back
        page" button and throwing you into the "next page" button.

	Imagine how hard this "astonishing" behavior would be to use
	if you were visually impared. It would not be very obvious
	that you had "bounced off" the first page and suddenly were
	moving forward. Other toolbars might arbitrarily relocate the
	input focus to an even more confusing button, when the one
	you're using gets disabled.

        It would be much less astonishing if the input focus simply
        remained in the "back page" button when you hit the first
        page, and a tooltop popped up saying "You can't go to the
        previous page, because you are at the first page."

	I've made a simple API for changing the sensitivity of a
	component, that takes a "reason" string (translated text) to
	show to the user in the tooltip of a disabled control (after
	the normal text). I've changed the code in the eBook reader
	that disables actions to figure out the most important reason
	(there might be several reasons to disable a control, but
	usually one is most important). It passes that reason to the
	API that disables the action, which currently just stores it
	away in a dictionary. Now it needs to be hooked up so it
	actually shows the tooltip with the reason when disabled.

      GTK has an "AcceleratorList" class that keeps a list of keyboard
      accelerators which invoke actions. The UIManager helps manage
      the accelerators for you automatically. 

	I think we should use accelerators for normal keyboard
	acceleration of application actions, but implement the gamepad
	navigation stuff as a higher level framework that uses a more
	semantically meaningful model. (Not just low level tab/backtab
	focus navigation, or simple global keyboard accelerators, but
	an actual framework specifically designed to support browsing
	and executing arbitrary Actions via the game controller, and
	providing feedback about the reasons controls are disabled.)

	The pygtk library has some methods on action_group to add
	actions "action_group.add_actions(action_list)", toggle
	actions "action_group.add_toggle_actions(action_list)", and
	radio actions "action_group.add_radio_actions(action_list,
	cur_value, callback, *args)". These all take an action_list
	that's a list of action specification tuples. That interface
	is more brittle and less extensible than it should be, because
	it takes tuples instead of dictionaries, and it only makes
	stock GTK actions. 

	We need a more flexible API than add_actions and its ilk, which
	supports custom Sugar actions, and uses dictionaries instead
	of tuples, so we can easily pass in additional optional
	parameters without changing the API.

	I have taken a first cut at rewriting pygtk's ActionGroup's
	add_actions, add_toggle_actions and add_radio_actions
	functions in Python, and changing them to use custom
	SugarAction, SugarToggleAction and SugarRadioAction classes.

	But I still don't think the add_actions_esque interface is
	flexible enough. It needs an easy way to add other custom
	widgets (like the search text input field), and it should make
	it easy to customize the user interface classes and configure
	the objects by passing in additional optional parameters and
	configuration dictionaries. (For example, the action
	specification should be a dictionary that has an optional key
	to specify the toolbar button and menu item classes, and it
	should be possible to plug in different kinds of user
	interface controls than toolbars and menus, like pie menus and
	gamepad specific interfaces). 

      GTK has an "atk" module that interfaces to the accessibility toolkit. 

        I'm not clear on just what this does and how it can help us,
        and I would love to hear from somebody who's familiar with it.

        I think we can do what we need to support the gamepad without
        using the atk, but maybe it could be helpful. But my
        impression is that it's more geared towards screen readers, is
        tied closely to the user interface layout (declaring that this
        label is associated with that control, etc), and it looks like
	it takes a lot of lines of code to use (unless you use some
	kind of framework that supports it automatically).

      GTK has a "UIManager" that knows how to build menu bars, menus,
      toolbars and buttons from XML files, and tie together actions,
      accelerators, menus and toolbars. The XML describes the
      structure and layout of the user interface, but refers to the
      actions by name to configure the buttons and menu items with
      labels, icons, tooltips, accelerators, callbacks, and custom
      component classes. There is nothing in the XML about what label,
      icon, tooltip or widget class to use -- just an Action
      name. It's up to the Action to figure out the visual appearance
      and behavior of the gui. That's why it should be easier to use
      custom Action classes.

        I think we need to write our own UIManager and accessibility
        framework that addresses our specific needs (like the
        focus/tooltip/disable reason issues discussed above, custom
        sugar controls, gamepad support, etc), because I don't think
        the UIManager (plus the pygtk utilities that go along with it)
        are flexible enough to support our needs. I think it would be
        easy to implement it in Python, in a way that would be a lot
        more flexible and easier to extend that the current C
        implementation of GTK's GuiManager.

  + Add support for more advanced evince features. 

    Added support for the various properties and functions that evince supports. 

    Need access to the table of contents of the pdf file. 

  + Integrate Poppler renderer for efficiently rendering PDF documents. 

    Make a higher level library independent interface to evince and poppler. 

    Factor out evince and poppler dependencies so you only need to import 
    the library that you need to render the document. 

    The enumerated types that evince uses should be passed as strings instead, 
    so the interface is independent of evince, and you don't have to define all
    the GObject enumerated type classes just to use the interface. 
Zephaniah E. Hull | 5 May 09:25

Re: eBook Reader user interface

A few notations, due to the issues involved with xf86-input-evdev (and
xorg/linux input in general).

On Fri, May 04, 2007 at 11:08:55PM -0700, Don Hopkins wrote:
...
>       The setolpckeys.c program remaps the keys and gamepad buttons.
> 
>         Currently it maps both gamepads to the numeric keypad keys (KEY_KP8, etc),
> 	which the X server and GDK translates to directional keys (GDK_Up, etc).
> 
> 	I tried to map them to buttons (BTN_A, etc), but the X server seems 
> 	to ignore keycodes in that range. 

Correct, we just don't handle those well at the moment, and would show
up as mouse buttons if we did.

(This may actually be preferable if done right, but.)

...

> 	  Use keys ("KEY_*") instead of buttons ("BTN_*"), since they
> 	  seem to work better.

See above, ask if you'd like more details on the use of non-core-pointer
button devices and how we might use those here.

> 	  The 0x1b* range seems to be unused in <linux/input.h>, 
> 	  and it's between other groups of keycodes, so I'll
> 	  propose using that range for the OLPC. 

NAK.  Until we move to the input-hotplug xserver, and the
xf86-input-evdev for that (for former has not been released, the latter
doesn't have much of this done yet) there is simply not support for keys
above 247 or 248 (I forget which, but 0x100 - 8 or - 9).

This is due to X11 protocol restrictions which simply don't allow keys
above 255, and the fact that the first 8 keys are not valid.

In the input-hotplug xserver we have some ways we can hack around that,
but nothing that can be easily back ported.

There is simply not room below 255 that we are going to get allocated to
XO specific keys either, so in the short to medium term we're going to
have to find another solution.

>       Rewrote setolpckeys.c code in Python (just uses ioctl, but needs to know keycodes).
>         Writing utilities like that in Python instead of C makes it easier to 
> 	reconfigure the keys on the OLPC without a C compiler. 

Alternatively, a simple tool that takes arguments, or a config file with
comments, would also be a good choice.  But I have nothing to say
against Python for this usage if it's clean enough.

That's all that I have to say as far as input stuff goes, I may comment
on the ebook specific side of things in another email or forum though.

Zephaniah E. Hull.

--

-- 
	  1024D/E65A7801 Zephaniah E. Hull <warp <at> aehallh.com>
	   92ED 94E4 B1E6 3624 226D  5727 4453 008B E65A 7801
	    CCs of replies from mailing lists are requested.

I've always taken the position that if you can't find anything bad to
say about a language or an operating system then you don't understand
it. I also agree with you about the advocacy. AHS. ASS.
  -- Shmuel (Seymour J.) Metz in the Scary Devil Monastery.
_______________________________________________
Devel mailing list
Devel <at> laptop.org
http://mailman.laptop.org/mailman/listinfo/devel
Picon
Favicon

Re: eBook Reader user interface

On Fri, 2007-05-04 at 23:08 -0700, Don Hopkins wrote:
> Goal for improving the eBook reader user interface:
> 
>   I've been doing some exploratory programming with GTK and Sugar,
>   trying to improve the user interface of the eBook reader, and make
>   it useable in book mode with the gamepad.
> 
>   + Support the game keypads in eBook mode. 
> 
>     + Low level game keypad support
> 
>       Need to remap low level keyboard scan codes to Linux keyboard codes. 
> 
>       The setolpckeys.c program remaps the keys and gamepad buttons.
> 
>         Currently it maps both gamepads to the numeric keypad keys (KEY_KP8, etc),
> 	which the X server and GDK translates to directional keys (GDK_Up, etc).
> 
> 	I tried to map them to buttons (BTN_A, etc), but the X server seems 
> 	to ignore keycodes in that range. 
> 
> 	The xorg.conf file has a keycode mask that looked like it might help, 
> 	but I couldn't get it to work. 
> 
> 	Need to have unique keycodes reported for each of the two gamepads, 
> 	which are not the same as any keyboard keys, without any predefined meanings
> 	like arrow keys have. 
> 
> 	Need to define special purpose keycodes just for the OLPC gamepad,
> 	instead of trying to reuse existing but not appropriate keycodes. 
> 
> 	What is the process for defining new keycodes in <linux/input.h>?
> 
> 	Here's my strawman proposal for some new keycodes. 
> 
> 	  Use keys ("KEY_*") instead of buttons ("BTN_*"), since they
> 	  seem to work better.
> 
> 	  The 0x1b* range seems to be unused in <linux/input.h>, 
> 	  and it's between other groups of keycodes, so I'll
> 	  propose using that range for the OLPC. 
> 
> 	  The UP/DOWN/LEFT/RIGHT keys correspond to the directional
> 	  keypad.
> 
> 	  #define KEY_XO_GAMEPAD_UP      0x1b0
> 	  #define KEY_XO_GAMEPAD_DOWN    0x1b1
> 	  #define KEY_XO_GAMEPAD_LEFT    0x1b2
> 	  #define KEY_XO_GAMEPAD_RIGHT   0x1b3
> 
> 	  The NORTH/SOUTH/EAST/WEST keys correspond to the other
> 	  buttons. Those names are agnostic to the button labels,
> 	  which may change from the current Playstation buttons
> 	  (X/O/Triangle/Square). Can anyone suggest better names for
> 	  the four buttons on the right?
> 
> 	  #define KEY_XO_GAMEPAD_NORTH   0x1b4
> 	  #define KEY_XO_GAMEPAD_SOUTH   0x1b5
> 	  #define KEY_XO_GAMEPAD_EAST    0x1b6
> 	  #define KEY_XO_GAMEPAD_WEST    0x1b7
> 
> 	  While we're at it, we could define keycodes for the other
> 	  OLPC buttons and switches on the screen. I think there are
> 	  some other sensor switches that could generate keycodes,
> 	  like opening the screen, rotating it around, and putting it
> 	  into book mode, so I will make some guesses at names for
> 	  them, just to get the discussion rolling. 
> 
> 	  #define KEY_XO_SCREEN_ROTATE   0x1b8
> 	  #define KEY_XO_SCREEN_POWER    0x1b9
> 	  #define KEY_XO_SCREEN_OPEN     0x1ba
> 	  #define KEY_XO_SCREEN_CLOSE    0x1bb
> 	  #define KEY_XO_SCREEN_IN       0x1bc
> 	  #define KEY_XO_SCREEN_OUT      0x1bd
> 
> 	  Is there an exhaustive list of all buttons and switches and
> 	  events on the OLPC? Are any more planned? Which ones should
> 	  be assigned keycodes?
> 
>       Rewrote setolpckeys.c code in Python (just uses ioctl, but needs to know keycodes).
>         Writing utilities like that in Python instead of C makes it easier to 
> 	reconfigure the keys on the OLPC without a C compiler. 
> 
>     + High level action support.
> 
>       GTK uses "Actions" to define the actions available in an
>       application, independent of the user interface used to invoke
>       them. Actions can be bound to user interface widgets and
>       keyboard accelerators, and they can hide, show, enable and
>       disable the corresponding parts of the interface. You can
>       subclass Action to define custom toolbar buttons and menu items.
> 
>       We need to define a generic way of navigating and executing the
>       application's actions from the gamepad.
> 
>       We can make Sugar specific actions that create the appropriately
>       styled and customized Sugar user interface widgets.
> 
>       Actions can be used to support navigation and operation of the
>       toolbar components from the gamepad:
> 
>       Actions have a list of their "proxy" components (toolbar
>       buttons, menu items, etc).
> 
>       Actions know how to execute a callback function, so the user
>       interface components tell the action to activate, instead of
>       calling the function themselves.
> 
>       The actions also know their labels, icons and tooltips.
> 
>       Actions can be shown and hidden, and all their proxies show and
>       hide.
> 
>       Actions can be made sensitive or not (disabled), and all their
>       proxies enable or disable.
> 
>       Actions have methods to construct toolbar buttons and menu
>       items, which subclasses can override to customize the user
>       interface. The higher level GTK UIManager calls these methods in
>       actions to create the user interface, although you can still use
>       Actions without the UIManager, by creating the components
>       yourself.
> 
>       There are three standard kinds of actions: Action, which creates
>       a normal button or menu item, ToggleAction, which creates a
>       toggle button (checkbox), and RadioAction, which creates a radio
>       button (multiple choice). 
> 
>       The GTK toolbars and menus support keyboard navigation of
>       sensitive buttons, as well as showing tooltips on sensitive
>       buttons, but it won't show a tooltip on unsensitive (disabled)
>       buttons, tabbing skips over disabled buttons, and it kicks you
>       out of buttons that get disabled while you're using them, by
>       moving the focus into the next button (whatever that happens to
>       be).
> 
>       All inactive items should show tooltips telling WHY they are
>       inactive, and WHAT you have to do before using them. 
> 
>       Unfortunately you can't get a tooltip on an inactive item. 
>       This needs to be fixed, so we can display helpful tooltips and
>       documentation on any item whether active or not. 
>  
>       Unfortunlatey you can't navigate to an inactive item.  This
>       needs to be fixed, so the user can use the gamepad to navigate
>       to an inactive item, to find out what it is and why it's
>       inactive. (Also, so you can navigate the interface predicably
>       with muscle memory, because the number of presses required to
>       navigate doesn't change depending on the state of the
>       application.)
> 
>       A problem with the current GTK keyboard navigation behavior of
>       not allowing inactive items to have the input focus, is that it
>       violates the principle of least astonishment, makes the
>       interface less predictable, and interferes with type-ahead:
> 
>         If you're focused on the "back page" button, and select it
>         until you get to the first page, then it will become inactive
>         (because you can't go back from the first page), which
>         results in the input focus being kicked out of the "back
>         page" button and throwing you into the "next page" button.
> 
> 	Imagine how hard this "astonishing" behavior would be to use
> 	if you were visually impared. It would not be very obvious
> 	that you had "bounced off" the first page and suddenly were
> 	moving forward. Other toolbars might arbitrarily relocate the
> 	input focus to an even more confusing button, when the one
> 	you're using gets disabled.
> 
>         It would be much less astonishing if the input focus simply
>         remained in the "back page" button when you hit the first
>         page, and a tooltop popped up saying "You can't go to the
>         previous page, because you are at the first page."
> 
> 	I've made a simple API for changing the sensitivity of a
> 	component, that takes a "reason" string (translated text) to
> 	show to the user in the tooltip of a disabled control (after
> 	the normal text). I've changed the code in the eBook reader
> 	that disables actions to figure out the most important reason
> 	(there might be several reasons to disable a control, but
> 	usually one is most important). It passes that reason to the
> 	API that disables the action, which currently just stores it
> 	away in a dictionary. Now it needs to be hooked up so it
> 	actually shows the tooltip with the reason when disabled.
> 
>       GTK has an "AcceleratorList" class that keeps a list of keyboard
>       accelerators which invoke actions. The UIManager helps manage
>       the accelerators for you automatically. 
> 
> 	I think we should use accelerators for normal keyboard
> 	acceleration of application actions, but implement the gamepad
> 	navigation stuff as a higher level framework that uses a more
> 	semantically meaningful model. (Not just low level tab/backtab
> 	focus navigation, or simple global keyboard accelerators, but
> 	an actual framework specifically designed to support browsing
> 	and executing arbitrary Actions via the game controller, and
> 	providing feedback about the reasons controls are disabled.)
> 
> 	The pygtk library has some methods on action_group to add
> 	actions "action_group.add_actions(action_list)", toggle
> 	actions "action_group.add_toggle_actions(action_list)", and
> 	radio actions "action_group.add_radio_actions(action_list,
> 	cur_value, callback, *args)". These all take an action_list
> 	that's a list of action specification tuples. That interface
> 	is more brittle and less extensible than it should be, because
> 	it takes tuples instead of dictionaries, and it only makes
> 	stock GTK actions. 
> 
> 	We need a more flexible API than add_actions and its ilk, which
> 	supports custom Sugar actions, and uses dictionaries instead
> 	of tuples, so we can easily pass in additional optional
> 	parameters without changing the API.
> 
> 	I have taken a first cut at rewriting pygtk's ActionGroup's
> 	add_actions, add_toggle_actions and add_radio_actions
> 	functions in Python, and changing them to use custom
> 	SugarAction, SugarToggleAction and SugarRadioAction classes.
> 
> 	But I still don't think the add_actions_esque interface is
> 	flexible enough. It needs an easy way to add other custom
> 	widgets (like the search text input field), and it should make
> 	it easy to customize the user interface classes and configure
> 	the objects by passing in additional optional parameters and
> 	configuration dictionaries. (For example, the action
> 	specification should be a dictionary that has an optional key
> 	to specify the toolbar button and menu item classes, and it
> 	should be possible to plug in different kinds of user
> 	interface controls than toolbars and menus, like pie menus and
> 	gamepad specific interfaces). 
> 
>       GTK has an "atk" module that interfaces to the accessibility toolkit. 
> 
>         I'm not clear on just what this does and how it can help us,
>         and I would love to hear from somebody who's familiar with it.
> 
>         I think we can do what we need to support the gamepad without
>         using the atk, but maybe it could be helpful. But my
>         impression is that it's more geared towards screen readers, is
>         tied closely to the user interface layout (declaring that this
>         label is associated with that control, etc), and it looks like
> 	it takes a lot of lines of code to use (unless you use some
> 	kind of framework that supports it automatically).
> 
>       GTK has a "UIManager" that knows how to build menu bars, menus,
>       toolbars and buttons from XML files, and tie together actions,
>       accelerators, menus and toolbars. The XML describes the
>       structure and layout of the user interface, but refers to the
>       actions by name to configure the buttons and menu items with
>       labels, icons, tooltips, accelerators, callbacks, and custom
>       component classes. There is nothing in the XML about what label,
>       icon, tooltip or widget class to use -- just an Action
>       name. It's up to the Action to figure out the visual appearance
>       and behavior of the gui. That's why it should be easier to use
>       custom Action classes.
> 
>         I think we need to write our own UIManager and accessibility
>         framework that addresses our specific needs (like the
>         focus/tooltip/disable reason issues discussed above, custom
>         sugar controls, gamepad support, etc), because I don't think
>         the UIManager (plus the pygtk utilities that go along with it)
>         are flexible enough to support our needs. I think it would be
>         easy to implement it in Python, in a way that would be a lot
>         more flexible and easier to extend that the current C
>         implementation of GTK's GuiManager.

GTK UIManager also does not support tabbed toolbars and palettes (which
will display the accellerators).

Marco

Gmane