permanently changing keyboard layout for forth

Mitch Bradley wmb at laptop.org
Sat Mar 15 09:42:35 EDT 2008


Ties Stuij wrote:
> ---------- Forwarded message ----------
> From: Ties Stuij <cjstuij at gmail.com>
> Date: Fri, Mar 14, 2008 at 4:12 PM
> Subject: Re: permanently changing keyboard layout for forth
> To: Mitch Bradley <wmb at laptop.org>
>
>
>
> On Fri, Mar 14, 2008 at 2:50 PM, Mitch Bradley <wmb at laptop.org> wrote:
>  > If you are really, truly sure that you never want the Spanish layout,
>  >  you can delete the KA tag entirely and OFW will default to US layout.
>  >
>  >  ok  " KA" $delete-tag
>  >
>  >  That is "doublequote space K A doublequote space "  i.e. one space
>  >  between the first doublequote and the 'K', no space between 'A' and the
>  >  second doubleqoute, one or more spaces between the second doublequote
>  >  and the dollar
>  >
>  >  As the author of the firmware, I am certain that is the correct
>  >  solution.  The likelihood of bricking your machine with this procedure
>  >  is vanishingly small.  However, as a dislaimer, if you should happen to
>  >  brick it, I won't have time to help you recover it, because I am
>  >  horribly overworked at the moment.
>
>  Thanks for the help. Not sure I want to risk never to be able to get
>  back to Spanish though. Might also not be practical for testing
>  purposes.
>
>  It seems like I found the address of something that resembles the us
>  keymap. Unsurprisingly under 'keymap'. But it doesn't really match the
>  description in Manufacturing_data on the wiki.
>   

That is because the keymap that is inside the pckbd driver is not in the 
same format as the "KA" tag in the manufacturing data.  The KA tag, and 
in fact all of the manufacturing data, is specific to and tuned for OLPC 
hardware, whereas the keymap inside the pckbd driver is for generic PCs, 
predating OLPC by many years.
>  If you've got the time, do you happen to know where i can find the
>  proper address of the us layout as expected by KA, or a document/the
>  files which enumerate(s) the correct byte-sequence for different
>  kb-layouts? Together with a decompiled change-tag, that should be
>  enough info to change KA.
>   

You can make a KA tag for any OLPC keyboard with one of these Python 
scripts from the OFW source code tree at svn://openbios.org/openfirmware :

   cpu/x86/pc/olpc/
       parsekbd.py
       parsekbd0.py
       parsexkb.py

The command is, for example:

      python parsekbd.py OLPC_Keyboard_layouts

The argument (e.g. OLPC_Keyboard_layouts) is the name of an OLPC wiki 
page that contains a keyboard mapping table.  The US international 
layout happens to be shown on that "main" keyboard page.  See 
http://wiki.laptop.org/go/OLPC_Keyboard_layouts

The specific script to use depends on which table format is on the 
individual keyboard's wiki page.

   parsekbd.py is for the table format where the first two columns are 
"XKB KEY" and "HID".
   parsekb0.py is for the table format where the columns are not 
labeled, for example OLPC_Thailand_Keyboard
   parsexkb.py is for the wiki pages that don't have a table, only an 
XKB file inclusion, e.g. Pashto_Keyboard

Yes, I know, this is a mess.  The (loosely agreed-to) plan is to use the 
XKB format for everything going forward.

There is also a Forth script that I used to test the KA mechanism.  It 
includes KA tag files for a few of the first keyboards to have been 
defined.  http://dev.laptop.org/~wmb/setka.zip .  Unpack it into the 
root directory of a USB key and type:

  ok  fload u:\setka.fth

It lets you change the KA tag value to one of several choices
>  Thanks,
>  Ties
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel
>   




More information about the Devel mailing list