LayCoder utility

Written by Igor Nesterov (C) 2002-03

Download latest release from: http://www.palmoid.com/laycoder/laycoder.zip

Download YAHM hack manager for deadhack support (optional for PalmOS v3.x-4.x and required for PalmOS v5.x) from: http://yahm.palmoid.com/yahm.zip

News

2.0 (October 8, 2003)

Index

1. About LayCoder
2. System Requirements
3. Distribution
4. Installing LayCoder
5. How to use desktop-like 'dead char' support
6. Used file formats
7. Usage
8. How to make layout
9. Ultra-Thin keyboard support.
10. Files in distribution
11. Disclaimer
12. Useful links
13. Keyboard layouts
14. Version History
15. Author information
16. My other Palm software

1. About LayCoder

LayCoder is a Win32 utility for creation custom keyboard layouts for Palm Portable Keyboard (also known as Stowaway keyboard).

ThinkOutside Inc, keyboard manufacturers offer Stowaway Development Kit for PalmOS. Basing on KdbLayout sample from SDK you can create your own layouts with help of Metrowerks CodeWarrior development system. This approach requires expensive tools and hard manual work for finding and mapping keys in "Key Code Matrix".

With help of LayCoder layout development can be simplified. Each key table represented as keyboard in text file:

Layout table example

[Plain]
|1    |2    |3    |4    |5    |6    |7    |8    |9    |0    |-    |=    |BS   |
|NxtFl|q    |w    |e    |r    |t    |y    |u    |i    |o    |p    |[    |]    |\    |
|Caps |a    |s    |d    |f    |g    |h    |j    |k    |l    |;    |'    |Enter|
|LShft|z    |x    |c    |v    |b    |n    |m    |,    |.    |/    |RShft|Up   |
|Ctrl |Fn   |Alt  |Cmd  |Space|Space|`    |Done |Del  |Left |Down |Right|
|Date |Phone|Todo |Memo |

Utility help you convert simple text description like above to 'map_' resource. You can use build-prc utility to compile map into .pdb file.

2. System Requirements

LayCoder requires Keyboard driver v 1.6 (take it from http://www.thinkoutside.com) or later. Utility works under Win32 system, but can be easily ported to any platform (contact me at support@palmoid.com about porting).

3. Distribution

LayCoder is freeware. The 'laycoder.zip' archive may be freely distributed, provided its contents are not changed in any way.

4. Installing LayCoder

Download file from http://www.palmoid.com/laycoder/laycoder.zip and unzip LayCoder.exe.

5. How to use desktop-like 'dead char' support

With help of LayCoder package you can type accented characters in desktop style, with accent first. For example to type A. you should enter ^ character and A character. Diaeresis, circumflex, degree, grave, acute and cedilla accents are processed now. If you need another accent characters, mail to support@palmoid.com.

Package includes sample map map_fra1.map and ready to use French layout kbdfrenchtm.pdb. Dead key ( ^ character really) mapped to next button after P. Dead key with shift is mapped to diaeresis accent.

To use this extension you should install deadhack.prc to the palm. Unzip hack from archive and install it with Installer Tool. Enable it in your favorite HackManager for PalmOS 3.x-4.x (Use my freeware YAHM if you have no any HackManager).

For PalmOS5 you should use YAHM hack manager with ARM support.( Take new version 2.0 from http://yahm.palmoid.com/yahm.zip ). Using hack with TealMaster OS5 cause significant system slowdown. YAHM can handle special hacks, writtten in pure ARM.

Thanks to Christian Pennaforte for the brilliant idea of dead char support.

6. Used file formats

LayCoder use two file formats: You can learn about layout file from examination samples in distribution. Start your work from english layout, use it as skeleton.

Part of layout file

Version: 1
Name: English (US)
Language: 0
Keyboard layout: 1033
Copyright: Copyright (c) 2000-2001, Think Outside, Inc.
Creator: Think Outside, Inc.
[Plain]
|1    |2    |3    |4    |5    |6    |7    |8    |9    |0    |-    |=    |BS   |
|NxtFl|q    |w    |e    |r    |t    |y    |u    |i    |o    |p    |[    |]    |\    |
|Caps |a    |s    |d    |f    |g    |h    |j    |k    |l    |;    |'    |Enter|
|LShft|z    |x    |c    |v    |b    |n    |m    |,    |.    |/    |RShft|Up   |
|Ctrl |Fn   |Alt  |Cmd  |Space|Space|`    |Done |Del  |Left |Down |Right|
|Date |Phone|Todo |Memo |

Text file consist of two parts: Empty strings and string beginning with # char are skipped.

5.1. Header

Header consist of layout common properties. You should write them at the begin of layout file in fixed order. Each header string consists of keyword, semicolon, space and keyword value.
Keyword Meaning
Version Version keyword must be equal to 1.
Name Name keyword describe textual description of keyboard layout. This name shows in layout manager.
Language Language keyword define numeric language ID. There are 7 defined IDs:
English 0
French 1
German 2
Italian 3
Spanish 4
Japanese 6
Dutch 7
Keyboard layout Keyboard layout numeric codes are based on MS language identifiers. You can find them in languages.h file form SDK (included into distribution).
Copyright Text string with copyright (64 chars max).
Creator Text string with layout author (32 chars max).

5.2 Layout

Text file defines 11 different keyboard tables, for each modifier keys combination:

  1. Plain
  2. Shift
  3. CapsLock
  4. CapsLock-Shift
  5. Alt
  6. Alt-Shift
  7. Fn (also used as Shift-Fn2 layout)
  8. Fn-Shift (also used as Fn2 layout)
  9. Cmd
  10. Ctrl
  11. Ctrl-Cmd

All tables must come in above strict order. Each table begin with modifier name in square brackets. Six keyboard rows follows it. Last row consist of four application buttons. Each row consist of button definitions. Buttons are separated by | character. Each button resides on 5 character positions. There are four types of button encoding:

  1. Character button. This button send single ASCII character (with modifiers, probably) and encodes as character and four space bars. For example:
    |q    |w    |e    |r    |t    |y    |
  2. Control button. This button type has mnemonic description:
    This buttons defines control codes, launch codes, modifier codes, onscreen button codes and umlaut modifiers codes. For example:
    |Date |Phone|Todo |Memo |
  3. Hex button. Writes as #XXXX where X - hexidecimal digit. Used to encode unusual keyboard codes, such as #020E for m100 device's page-up clock button. Look in chars.h from PalmOS SDK for hex codes. For example:
    |#0121|#010F|#0112|
  4. Empty button. Writes as five spaces and defines no action at all. Don't code 'Space bar' as empty button, use 'Space' keyword. For example:
    |     |     |

Layout sample

[Plain]
|1    |2    |3    |4    |5    |6    |7    |8    |9    |0    |-    |=    |BS   |
|NxtFl|q    |w    |e    |r    |t    |y    |u    |i    |o    |p    |[    |]    |\    |
|Caps |a    |s    |d    |f    |g    |h    |j    |k    |l    |;    |'    |Enter|
|LShft|z    |x    |c    |v    |b    |n    |m    |,    |.    |/    |RShft|Up   |
|Ctrl |Fn   |Alt  |Cmd  |Space|Space|`    |Done |Del  |Left |Down |Right|
|Date |Phone|Todo |Memo |

7. Usage

7.1 Layout dump

Syntax:
LayCoder l "binary_layout_file_name" > "text_layout_file_name"
This command convert binary format to text layout file.

7.2 Layout creation

Syntax :
LayCoder c "binary_layout__or_pdb_file_name" "text_layout_file_name"
This command conver text layout file to binary file or PDB database. Output file format determined by used extension: if output file have ".prc" or ".pdb" extension, than output will be database. Otherwise it will be binary layout.

8. How to make layout

To add more layouts into one database, you should: You can download build-prc utility from PRC-TOOLS site at http://prc-tools.sourceforge.net/ , or build-prc utility only from

9. Ultra-Thin keyboard support.

New Ultra-Thin keyboard have some differences from classic PPK keyboard. Current keyboard driver use old keyboard layout with some hacks. New version support this hacks.

Four new pseudo-buttons were added to last row. Don't touch them! Leave this buttons as is.

10. Files in distribution

11. Disclaimer

LayCoder provided as is, and not guaranteed to be free of bugs. The author assumes no liability for any problems resulting from the use of this product. If you find a bug, please report about it to support@palmoid.com, along with the following info:

12. Useful links

http://www.thinkoutside.com - keyboard manufacturer.

13. Keyboard layouts

14. Version History

15. Author information

Web page: http://www.palmoid.com/laycoder
Email: support@palmoid.com

16. My other Palm software