Keyboard Layouter

for the Psion Series 5 / 5mx

by Bodo Maass
bodo.maass@privat.post.de
www.pagerealm.com/bodo

Current Version: Beta 0.91   (April 9, 2000)

Download Keyboard Layouter Beta 0.91 here

Description

This program allows to redefine the keyboard layout of the Psion. I wrote this because I'm an avid user of the Dvorak keyboard layout, which allows me to touch type on the Psion (or any other system) at amazing speeds. On the small Psion keyboard, however, the Dvorak layout is especially helpful since it minimizes finger movement and thus reduces the chance of accidentally hitting wrong keys.

Originally I used Remapper, a similar program written in OPL by Richard Reeve. You can find his homepage here. Remapper has quite a lot of functionality, but was never really intended to redefine the whole keyboard. While touch typing on Remapper, I found that sometimes there was a noticeable delay before the corresponding characters would appear on the screen. That's why I started to write this program here, as it is written entirely in C++ and especially optimized to redefine the whole keyboard. I find that it allows touch typing on a redefined keyboard much more fluently.
The approach is the same that Remapper uses: Single keystrokes are captured with the CaptureKey function of the operating system. All keystrokes that have been captured are sent to the Keyboard Layouter, regardless of which application is currently on top. Keyboard Layouter looks up the substitute of the redefined key and sends it to the foreground application. That's basically it.

Interestingly enough, someone has written a completely different solution for the same problem. Alexander Zavorine has somehow managed to replace the whole keyboard driver. I don't quite know how his program works, and if it really replaces the keyboard driver, but I'll find out soon. Read more at his website.

If you are not interested in redefining the whole keyboard, you can also use Keyboard Layouter to create shortcuts for special characters (for example, the Euro symbol on the S5 classic). There is no performance penalty for using it, since it will only deal with the keys that it has captured. For example, if you only have captured Fn + e for the Euro symbol, then Keyboard Layouter will only be activated when this key is pressed.

Installation

The latest version of the Keyboard Layouter can be found at www.pagerealm.com/bodo.

Simply copy keybLayout.exe into the folder of your choice. This is not an EIKON application, and it will not appear in the Extras bar. Keyboard Layouter saves the redefined layout in the file keyboard.dat. The included file contains a Dvorak layout on top of a US Series5 keyboard. If your Psion has a different locale, you will need to make a few changes, since key capturing works by character and not by scancode. This means that if a certain key produces a different character on your Psion than the corresponding key would produce on a US-Psion keyboard, the redefined layout will be incorrect. In that case, you should either delete keyboard.dat and start all over, or delete the wrongly captured keys and replace them with the right ones.

Of course, if you are not interested in Dvorak and need this program for other reasons, you should also delete keyboard.dat and start over.

Usage

To start the program, simply run keybLayout.exe. This needs to be running at all times to provide keyboard redefinition. When the program starts, it will try to load the file keyboard.dat in the same folder. If you want to start with a clean layout, you should delete or rename keyboard.dat before running the program.

Redefining keys

To redefine a key, press R (for Remap). Now press the key to be redefined. Keyboard Layouter will accept any normal key together with any combination of the modifier keys Shift, Ctrl, and Fn.

After you have pressed the key to be redefined, Keyboard Layouter will ask for the substitute key. Now you can press the substitute directly, or you can enter a special character with Ctrl + number, where number is a three-digit character code. To see all available codes, go to Word and select "Insert / Special character" in the menu. Alternatively, you could use the program Charmap from www.pelicansoft.com.

To delete a key redefinition, simple press ESC when it asks for the substitute key. This will remove any capture for this key.

Press B for Browse to see a list of all keys that are currently redefined.

Strange effects with Ctrl

You will notice that pressing the Ctrl key as a modifier produces some strange results. This is because EPOC doesn't capture keys by scancode, but by the character that this key produces. And the Ctrl key produces non-printable characters in conjunction with most keys. For example, Ctrl + a is captured as "Ctrl + 1". There may be some workarounds for this eventually.

Loading and saving the keyboard layout

Press L for Load to revert to the last saved layout. This will delete all the changes that were made since the last save, so be careful.

Press S for Save to save the current layout into the file keyboard.dat. If you want to have several different layouts, you need to rename keyboard.dat or copy it to a different folder.

Switching between the normal and the redefined layout

Press M for Macro and then any key combination to trigger this macro. Currently, the only available macro toggles key capturing to switch between the normal keyboard and the redefined layout. I'll probably implement a few more macros, including the capability to record complex sequences of keypresses, but that's not finished yet.

I use Ctrl + Menu to switch between layouts. Whenever this is pressed, an InfoPrint will appear in the upper right corner of the screen to show if keyboard redefinition is currently on or off.