Difference between revisions of "Virtual Keyboard Configuration"

From WebOS Internals
Jump to navigation Jump to search
(New page: =Options and Themes= The keyboard has several user configurable options. As of 28 August 2009 there is no keyboard configuration app. However, '''you do not have to have root access''' ...)
(No difference)

Latest revision as of 18:29, 4 February 2010

Options and Themes

The keyboard has several user configurable options. As of 28 August 2009 there is no keyboard configuration app. However, you do not have to have root access to configure the keyboard. Simply attach your Pre to your computer in USB Drive Mode. Then, navigate to the Pre's USB drive. On your desktop, there will be a directory (folder) called virtual-keyboard. (From within the Pre this is /media/internal/virtual-keyboard which is the same place.)

Inside that folder, you will find a file named virtual-keyboard/kb_config.json. Use your editor of choice (such as Wordpad - do not use MS Word) to edit that file. You may change any of the following options:

  • haptic : <number> - How long to vibrate upon touch (0 - 100 ms) (50 seems good. 100 makes the keyboard lag a little.
  • clickFile : <string> - Sound file if any to play upon button click (e.g. click1.wav)
  • installed_themes : [{label:<string>,value:<string>},...] - Installed themes, label is the display name and value is the themes folder name
  • theme : <string> - Name of keyboard theme to use. Three themes ship with the keyboard:
    • remix_classic
    • remix_glossy
    • remix_ice
    You may choose any of the three or add your own theme in an appropriate folder and name it as you please. See below on creating theme files.
Remix Classic RemixClassic.pngRemix Glossy RemixGlossy.pngRemix Ice RemixIce.png

Additional Available Themes - Not working

Eazys Theme
28731d1251393689-screen-keyboard-bugs-functionality-enhancements-messaging 2009-27-08 121219.jpg
Download [1]
Eazys Theme 2
Download [2]
Eazys Theme Gloss
Download [3]
Eazys Trans
Download [4]
dianehelen Glossy Blue
Download [5]
2sslow Blue
Messaging 2009-27-08 213107.jpg
Download [6]
pychozoundz sleek light
and dark
Un-Designer LucasPapaya
dianehelen Autumn
Download [9]
dianehelen Denali
Download [10]

dianehelen RBW(RedBlackWhite)
Download [11]

Creating Keyboard Themes

The virtual keyboard layout is a "list" of rows containing 10 "elements" each. The design allows for the keys to span multiple elements.

The virtual keyboard will look for themes located at /media/internal/virtual-keyboard/themes/ In this directory there shall exist theme-named directories with the following structure and options:

theme_config.json is the file that will control what images in this directory should be used and how.

The first layer of the JSON for each key element will have 3 parts: index:<Integer>,portrait:{},landscape:{}

index - index of key portrait - orientation JSON describing theme layout for portrait mode landscape - orientation JSON describing theme layout for landscape mode

Inside of the orientation JSON's we have another 3 parts: normal:{},function:{},shift:{}

normal - key description JSON when in normal keyboard function - key description JSON when function (orange) key is active shift - key description JSON when shift key is active

The key description JSON has the following 4 parts: keyCode:<Integer>,display:{},output:<String>,span:<Integer>

keyCode - currently only used for special action keys (shift, function, etc..) display - key display JSON output - output string when key is pressed span - number of element-widths to span (1 element-width=10%)

The key display JSON has 2 parts: html:<String>,img:<String>

html - HTML to display as element if no img supplied img - Image (including relative path in this theme's directory) to display as element