[Sugar-devel] behaviour of F-keys on XO HS

Raul Gutierrez Segales rgs at rieder.net.py
Tue Jul 20 01:04:06 EDT 2010


On Mon, 2010-07-19 at 21:33 -0400, Walter Bender wrote:
> On Mon, Jul 19, 2010 at 9:27 PM, Gonzalo Odiard <godiard at gmail.com> wrote:
> > Yeah
> > How we detect what keyboard is present?
> 
> You can possible to detect the XO 1, which guarantees a membrane
> keyboard. And a non-OLPC machine, which guarantees a non-membrane
> keyboard. It is the XO 1.5 that is at issue. I'll look into it.

http://wiki.laptop.org/go/OLPC_Firmware_q3a44 mentions: 

1889: OLPC keyboard driver, avoid confusing EC with enable scan command

I wonder if somehow the type of detected keyboard is discoverable
via /ofw. 

Cheers, 
Raúl 

> 
> -walter
> 
> def _get_hardware():
>     """ Determine whether we are using XO 1.0, 1.5, or "unknown" hardware """
>     bus = dbus.SystemBus()
> 
>     comp_obj = bus.get_object('org.freedesktop.Hal',
>                               '/org/freedesktop/Hal/devices/computer')
>     dev = dbus.Interface(comp_obj, 'org.freedesktop.Hal.Device')
>     if dev.PropertyExists('system.hardware.vendor') and \
>             dev.PropertyExists('system.hardware.version'):
>         if dev.GetProperty('system.hardware.vendor') == 'OLPC':
>             if dev.GetProperty('system.hardware.version') == '1.5':
>                 return XO15
>             else:
>                 return XO1
>         else:
>             return UNKNOWN
>     elif path.exists('/etc/olpc-release') or \
>          path.exists('/sys/power/olpc-pm'):
>         return XO1
>     else:
>         return UNKNOWN
> 
> > Gonzalo
> >
> > On Mon, Jul 19, 2010 at 9:26 PM, Walter Bender <walter.bender at gmail.com>
> > wrote:
> >>
> >> On Mon, Jul 19, 2010 at 5:20 PM, Paul Fox <pgf at laptop.org> wrote:
> >> > i'd like to bring this discussion to a conclusion.
> >> >
> >> > i'm starting to be a fan of this proposal of bert's -- it's very
> >> > simple, keeps the keys the same in sugar and in gnome, and on
> >> > membrane and non-membrane keyboards, it's backwards compatible
> >> > with existing use on XO-1, and the volume/ brightness keys remain
> >> > easily discoverable.  it does require that sugar respond to F5
> >> > and F6 for "journal" and "frame" -- i still don't have a feeling
> >> > for whether that's an issue or not, and if so, how big.
> >>
> >> The only activity I am aware of that uses F5 and F6 on the XO is the
> >> most recent version of Paint that Gonzolo is working on. Presumably
> >> these keymaps could be grabbed by Paint when running on an OLPC XO 1.0
> >> or when we detect the membrane keyboard. Otherwise, we could keep the
> >> mapping as Bert suggests.
> >>
> >> > any yeas or nays?
> >>
> >> Yeah.
> >> >
> >> > paul
> >> >
> >> >
> >> > bert wrote:
> >> >  >
> >> >  > On 17.07.2010, at 09:31, Bernie Innocenti wrote:
> >> >  >
> >> >  > > El Thu, 15-07-2010 a las 23:08 -0400, Paul Fox escribió:
> >> >  > >> i think everyone (except
> >> >  > >> apple, i'm learning tonight) agrees this is the correct setup
> >> >  > >> when not in sugar.
> >> >  > >
> >> >  > > Lenovo also seems to be switching to the Apple layout:
> >> >  > >
> >> >  > >
> >> > http://www.blogcdn.com/www.engadget.com/media/2010/01/thinkpadedgepost16.jpg
> >> >  > >
> >> >  >
> >> > http://www.thinkpads.com/wp-content/gallery/lenovo-thinkpad-edge-13-review/lenov
> >> >  > o-thinkpad-edge-13-keyboard.jpg
> >> >  > >
> >> >  > > Almost all the historic F-key mappings have an alternative CTRL+key
> >> > or
> >> >  > > ALT+key mapping in modern HIGs. Keys to control laptop volume and
> >> >  > > brightness are accessed much more frequently, so it's foreseeable
> >> > that
> >> >  > > over time they will supplant the F-keys in PC keyboards.
> >> >  >
> >> >  > +1
> >> >  >
> >> >  > IMHO pressing "fn" to get "f1" to "f10" makes sense. In my daily
> >> > routine I much
> >> >  > more often change volume or brightness than use the numbered F keys.
> >> >  >
> >> >  > Looking at this again
> >> >  >
> >> >  >      http://wiki.laptop.org/go/OLPC_Spanish_Non-membrane_Keyboard
> >> >  >
> >> >  > I propose:
> >> >  >
> >> >  >      f1-f8 produce F key codes both with and without the fn key
> >> >  >      f9-f12 produce F codes only with fn, and volume/brightness
> >> > events
> >> >  > without fn.
> >> >  >
> >> >  > So holding down fn always gets you the F key codes, you can change
> >> >  > volume/brightness without modifier, and as a bonus you can use the
> >> > first eight
> >> >  > F keys even without the fn key.
> >> >  >
> >> >  > This mapping should work both in Sugar and outside.
> >> >  >
> >> >  > - Bert -
> >> >  >
> >> >  >
> >> >  > _______________________________________________
> >> >  > Devel mailing list
> >> >  > Devel at lists.laptop.org
> >> >  > http://lists.laptop.org/listinfo/devel
> >> >
> >> > =---------------------
> >> >  paul fox, pgf at laptop.org
> >> >
> >> > _______________________________________________
> >> > Sugar-devel mailing list
> >> > Sugar-devel at lists.sugarlabs.org
> >> > http://lists.sugarlabs.org/listinfo/sugar-devel
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Walter Bender
> >> Sugar Labs
> >> http://www.sugarlabs.org
> >> _______________________________________________
> >> Sugar-devel mailing list
> >> Sugar-devel at lists.sugarlabs.org
> >> http://lists.sugarlabs.org/listinfo/sugar-devel
> >
> >
> >
> > --
> > Gonzalo Odiard
> > Responsable de Desarrollo
> > Sistemas Australes
> >
> >
> 
> 
> 




More information about the Sugar-devel mailing list