[maemo-developers] Decoding virtual keyboard layout definition files (.vkb)

From: Marius Gedminas marius at pov.lt
Date: Sun Aug 26 21:34:58 EEST 2007
On Tue, Aug 21, 2007 at 06:23:54PM +0300, Kimmo Jukarainen wrote:
> I wanted to make a couple of small changes to the Finnish virtual 
> keyboard layout (for example, replace å and Å with / and |), but 
> couldn't find enough documentation about the virtual keyboard to 
> do that.
> There are only few incomplete documents available about .vkb format, 
> gen_vkb utility and it's XML input format, and I couldn't find even 
> a single working example of the XML inputfile for gen_vkb. Let alone 
> the sources for the current layout files available in the device.
> So, I spend couple of hours reverse engineering the .vkb files and 
> created a decode_vkb perl-script that decodes the binary .vkb files 
> to XML files that can be edited and then converted back to binary 
> with gen_vkb.

> The script can currently decode all but one of the .vkbs in n800 to 
> XML files that gen_vkb encodes back to original ones. It's available 
> from my website along with some documentation:
>    http://idoru.metadreams.net/~kimju/src/maemo/decode_vkb/

Been there, done that.  I've a Python script that can decode all the
.vkb files found on my 770, and those can be converted back with gen_vkb
to produce identical binaries.

I never published or announced my script because someone on IRC drew my
attention to the draconic EULA on the 770/N800 firmware image download
page that seems to prohibit reverse engineering, among other things.

> Of the missing features, I really would like to add support for 
> modifier keys (mostly ctrl), but as the documentation is incomplete 
> and no official .vkb uses this feature I'm not sure how it is 
> even supposed to work. Any help would be appreciated and good and 
> complete documentation for both the XML and binary vkb formats even 
> more so.

I also found some ancient C include file in Google that had macro
definitions for various bits in what looked like an earlier version of
the .vkb file format.  I think I figured out how to describe all the
documented (and undocumented) features in the .xml files so that gen_vkb
accepts them, and then experiments showed that many of the things
that can be defined in the .vkb are not supported at all by the actual
closed-source virtual keyboard implementation.

Marius Gedminas
Is it not true that nobody finds it impossible to believe that a
double negative isn't bad grammatical form?
		-- Mike on alt.pizza.delivery.drivers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20070826/84276958/attachment.pgp 
More information about the maemo-developers mailing list