
               AE Keyboard Mapper for Windows Mobile
                           Version 0.9.4
                             Freeware
 
               Copyright (C) 2004 by Alexander Eltsyn
                        email: ae@ae.inc.ru
                       web: http://ae.inc.ru


    AE Keyboard Mapper is designed for remapping keys of almost any 
external or built-in hardware keyboard connected to Windows Mobile 
device. You may use it for "localizing" keyboard (if OEM keyboard 
driver not support your layout) or just for remapping some keys 
(e.g. to convert AZERTY to QUERTY). 
    The main features of this key remapper are:
- flexible enough and highly customizable through easy-to-understand 
  text configs
- supports up to 4 keyboard layouts
- may be used as "resident" application changing layouts with 
  specified hot key or as unloadable application associated with 
  hot key using Windows Mobile button binding
- supports alternative character set for sending to "permanent beta" 
  ICQ client for Pocket PC (useful for non-English speakers)

    While AE Keyboard Mapper is not "driver-level" software it should 
work with any hardware keyboard supported by system. 


                 Making your own keyboard layout file

    If you found no layout for your keyboard in AEKMap distribution 
package and http://ae.inc.ru/aekmap.html you may create it by yourself.

    First use "\Program Files\AEKMap\AEKmapScan.exe" (installed as a 
part of Keyboard Mapper) to identify all the keys that need remapping.
Please exit from AEKMapScan after writing down all scan codes you need
(File -> Exit menu) because it deadly hooks all available keys from the 
system.

    Then look up the correct unicode characters for the desired 
keymapping with "Character Map" application located in Start -> Programs -> 
Accessories -> System Tools on desktop PC.

    Make copy of one of the default layout files from 
"\Program Files\AEKMap\*.AEK" and modify "Key" records to implement 
keyboard substitution table.

    Put new layout file back to "\Program Files\AEKMap\"

    Run Start -> Settings -> AEKMap Settings application on your PDA 
and select new layout.

    After layout will be tested please do not forget to email it to
ae@ae.inc.ru: I will include it into next version or publish on site :)


                    Keyboard layout file format.

    Layout file is a plain text file with .AEK extension and may be 
created/modified with any plain text editor like Notepad desktop 
application. All string parameters are supposed to be in ANSI 
character set.
    All comments in layout file should be prefixed with semicolon
(";"). No strings should be enclosed in quotes. Below is a sample
layout replacing "A" key with "Z" character...

********** Begin of SimpleSample.AEK

; Keyboard layout name (displayed in AEKMapSettings)
Layout Sample Simple Layout

; Hint for the layout to be shown in lower right corner of the screen
Hint "A->Z" layout

; 0 - Use Shift key state returned by keyboard (default)
; 1 - Handle Shift key internally
; Please experiment to find which value will work better for you
HookShift 0

; 0 - Use CapsLock state returned by keyboard 
; 1 - Handle CapsLock internally (default)
; Experiment to find which value will work better for you
HookCapsLock 1

; Up to 200 Key records describing keyboard remapping scheme
; Each of the Key should meet following format:
; Key <ScanCode> <Shifted> <Normal> <ICQShifted> <ICQNormal> 
;
; where 
;
; <ScanCode> is a key "pseudoscan" code in hex. This code may 
; be defined with AEKMapScan program. Low order byte contains 
; key scan code while high order byte is a key modifier and
; may have one of the 3 values:
;   00 - normal and shifted keypres should be detected
;   02 - Shifted keypressing should be mapped only
;   01 - only special windows button or keys pressed with "Windows" 
;        key
;
; <Shifted> <Normal> is a new key or unicode char codes 
; <ICQScan> <ICUNormal> the same if ICQ window is active
; 
; Key/char codes are assumed to be in HEX numbers. and 
; should be prefixed with "k" or "c":
;   k - non-alphanumeric keydown/keyup events should be 
;       generated
;   c - send keystroke as unicode character

Key 0041 c005A c007A c005A c007A ; A -> Z 

********** end of SimpleSample.AEK

                          Some Notes

1. About Shift / CapsLock keys

    Currently I don't know how to request they states from 
keyboard drivers. No one of the standard interfaces returns 
this information. The only way for me is to check shift flag 
returned with a keypressing. But unfortunately, keyboard driver 
not send this flag with Tab, Del, dot, comma and arrow keys... 
So if you need no these key to remap - everything works fine. 
    To resolve shift/capslock problem AEKMap may hook and 
handle them by itself. This option may be turned on with 
HookShift and HookCapsLock parameters in layout file. But 
another problem arises: AEKMap Shift/Caps state will probably 
differ from keyboard driver's state. To avoid troubles with this 
you will need to remap ALL character keys even they already 
generates char codes you need... 
    Probably I will find more correct solution for this later,
but currently I cant

2. Arrow keys and joystick on HTC BlueAngel platform

    If you re-define keyboard arrows - you will meet with
another problem: built in keyboard driver sends absolutely
no difference between arrow keys and joystick. This means
that you will print characters with joystick instead of
scrolling. And I'm afraid this problem has no solution
until keyboard driver will change his behavior

3. "Unloading" AEKMap

    There are two ways to use AEKMap: 
- make it "resident" by using setting 2 or more layouts 
  (one of them may be <default>) while lefting other layouts 
  "unassigned". This will allow you to switch between layouts 
  using hot key. 
- make it "loadable on demand" by assigning AEKMap to (E) 
  button with Settings -> Buttons applet and choose "<Unload 
  Keyboard Mapper>" as last active layout. 



                       To Do List

The most important question for me is how to define current 
state of shift/caps lock keys directly from keyboard.


                     Version History

04.12.2004(v0.9.4): 4 new layouts.
12.11.2004(v0.9.3): New layout added.
11.11.2004(v0.9.2): Small cosmetic changes and 3 new layouts.
07.11.2004(v0.9.1): Shift keys handling algorithm improved.
06.11.2004(v0.9): First AEKMap implementation

