To use this you need to have R&D mode enabled on the device or modified
/sbin/gainroot script to not to check for R&D mode. becomeroot package does
this for IT2006. You also need osso-xterm or ssh server installed on the device,
there is currently no GUI for instalation phase.

HOWTO

1. Copy/download kbdd.tar.gz to the device and extract it somewhere.
If downloading, select device icon (not Card or My Documents) to use line below
unchanged. Otherwise change path to kbdd archive appropriatelly.

Nokia770-45:~$ tar zxvf MyDocs/kbdd.tar.gz

2. Edit btkbd.conf file inside created kbdd directory with proper keyboard
bluetooth address and keyboard type. '#' character is comment so remove it to
make line effective.

You can use vi editor directly from command line (quite unfriendly) or install
leafpad from Maemo contrib repository. Do not use Notes application.

vi editor route:
Nokia-N770-48:~$ cd kbdd
Nokia-N770-48:~/kbdd$ vi btkbd.conf
Now use cursor keys, 'x' key deletes one character under cursor, 'i' switches
to insert mode, 'Escape' key exits it, 'ZZ' (2 shifted z) saves file and exits,
':q' or ':q!' exits without saving. 

You can find keyboard address by making keyboard discoverable (press 
button in top right corner, keyboard LED should start blinking) and 
executing 'hcitool scan' as root or './btkbd scan' as user in the xterm.

KBTYPE is kbdd keyboard type. Execute kbdd --help to see the types.

PORTNUM is bluetooth rfcomm port number on n770 side. Port 0 may be used 
for you mobile phone so use something bigger than 0 in case of problems.

3. Make keyboard discoverable and execute btkbd script.

Nokia770-45:~/kbdd$ ./btkbd

Make sure the keyboard accepts connection. Be ready to pair the keyboard 
for the first time - it should pop up dialog on the N770 display after 
btkbd is executed. Pin is 0000 for ipaq bluetooth foldable keyboard.

4. Execute btkbd script again to disconnect the keyboard.

5. If it works you can add menu shortcut. Just run the
install_shortcut.sh script in kbdd directory.

PROBLEMS

root is required for inserting the module and binding rfcomm port. This 
means you need to have R&D mode enabled for 'sudo gainroot' mechanism to 
work because the script calls itself as root via 'sudo gainroot'.

Bluetooth connection sometime lags. As a result you may experience unwanted
repeated (double, triple, ...) characters. This is caused by 'key up' event
being received too late so that automatic system autorepeat starts. In this
case you can enlarge KEYREPEAT_DELAY value in btkbd.conf (miliseconds before
first key repeat starts)

TODO

1. make installation package.

2. Create GUI.

CHANGELOG

December 28, 2005 
- intial version

January 3, 2006
- display keepalive and unblanking implemented

January 4, 2006
- fixed bug with superfluous error message on each keypress (but sent to /dev/null anyway)

April 30, 2006
- added menu shortcut, can be executed as user if R&D mode is enabled

May 9, 2006
- Freedom keyboard added to kbdd by David Lapetina <ntic@lapetina.org>

May 27, 2006
- Freedom keyboard was broken (by me, not David), fixed

Jun 1, 2006
- Bluetooth Snap'n'type added by lvaro J. Iradier <airadier@gmail.com>
- unblanking hack removed, no longer needed in IT2006
- IM method switch added since it is no longer done automatically in IT2006,
unfortunately this crashes some aplications when text entry is activated,
you may comment maemo-gtk-im-switch lines in btkbd to deactivate

Nov 4, 2006
- updated for newer 2.2006.39-14 system
- uinput module has now kernel version suffix so multiple IT2006 versions
  can be supported in same package

Jan 22, 2007
- support for N800

Jun 3, 2007
- added infoprints
- more robust error recovery in btkbd
- configurable key repeat rate in btkbd.conf (can help with unwanted autorepeat)
- release all pressed keys on kbdd exit (fixes runaway keys)
- kbdd now starts only if device is found (and paired successfully)
- Freedom keyboard has now US layout by default (use IT2007 'Hardware keyboard'
  applet to load other layouts)

Nov 28, 2008
- support for Elektex fabric keyboard added by Jeffrey Mark Siskind
  http://www.ece.purdue.edu/~qobi

CONTACT

Frantisek Dufka <dufkaf@seznam.cz>

