keyboard handling (was Re: OLPC where to go development advice.)

S Page info at
Mon Feb 2 18:30:46 EST 2009

Summary: I updated
and several other pages, but mysteries remain.

pgf at usefully responded:

>> I have zero clue where to find the keymapping 
>> file or configuration utility.
> i just booted ubuntu to see how they do it -- turns out it's easy.
> they use a program called "xbindkeys" to bind all of the "special" XO
> keys.  the configuration for that is in /home/olpc/.xbindkeysrc -- you'll
> see an entry in there that invokes /usr/bin/

I added this to 
Folks, this is the page where distros note their tweaks for the benefit 
of humanity.

I think Sugar doesn't use that technique.  The same page points to 
, but what hooks this code to keyboard events?

BTW, also lists some nifty undocumented equivalents for 
some of the XO's buttons and keys:
   # the following are intended for emulator users
     '<alt><shift>f'  : 'frame',
     '<alt><shift>q'  : 'quit_emulator',
     '<alt><shift>o'  : 'open_search',
     '<alt><shift>r'  : 'rotate',
     '<alt><shift>s'  : 'say_text'
and indeed, <alt><shift>f/o/r work on my XO in 8.2.0.  I couldn't find 
any documentation for these, so I added them to the table in and mentioned them in

Tomeu wrote
> It's sugar who listens for the keycode 0xEB and asks xrandr to rotate
> the screen.

According to , the 
keycode for rotate are make=0x69, break=0xE9.  How do these become 0xEB?

I tried all the xkb* command-line programs to find the keymap, it seems that
   xmodmap -pk
shows it.  But it doesn't show anything relevant to the special buttons 
around the screen, I guess because they aren't part of the keyboard itself.

The olpc keyboard mappings in /usr/share/X11/xkb/*/olpc do map several 
XO keys to keysyms, e.g.
   key <I147> { [ XF86TaskPane ] }; // frame key (the top-right key)

but I think Sugar doesn't use the keysym, it looks directly for the key 
or its keystroke equivalent.  It seems the olpc X11 keyboard mappings 
are to make the XO-1's keys mean something when running other desktop 
environments than Sugar.

Keyboard handling is spread across lots of subsystems and pages, I'll 
improve them with any information I receive.


More information about the Devel mailing list