| Easy Dvorak iPAQ Typing with a Stowaway | |
|---|---|
| Description: Provides tips on getting the stowaway keyboard working and using xmodmap to install a yummy Dvorak layout. | |
|
|
| Setting Up a Stowaway with Dvorak | |
Having acquired a Targus Stowaway foldable keyboard for my iPAQ device (an h3765, basically a souped-up 3600), I wanted a simple way to activate the peripheral and also to use it with the Dvorak keyboard layout that saved my tired fingers from repetitive stress injury. Presented here are a few tips on getting the keyboard working, specifically with Dvorak.
In theory, loading the keyboard on the iPAQ should be as simple as entering kdbb -t stowawayHowever, I was having issues getting this working correctly. A workaround I've had success with is the following short shell script. In addition to loading the keyboard module and maintaining the device open, the script also loads my custom dvorak keyboard mapping, using xmodmap. The script itself is:
#!/bin/sh MYXMODMAPDIR=/usr/local/xmodmap echo -n "Loading stowaway module..." modprobe h3600_stowaway > /dev/null 2>&1 echo " done. Running -- please leave window open..." xmodmap $MYXMODMAPDIR/xmodmap.dvorak cat /dev/stowaway xmodmap $MYXMODMAPDIR/xmodmap.default rmmod h3600_stowaway echo "Done." You'll need to ensure you have h3600_stowaway module (in /lib/modules/X.Y.Z/kernel/drivers/char/h3600_stowaway.o) or the equivalent for your device. The shell script must be run as root in order to load the kernel module. As you can see, it relies on the presence of the xmodmap.dvorak file (remove the xmodmap lines if you aren't interested in this function). Since the stowaway is a compact, fold-able keyboard, certain keys that I find rather essential are missing, such as the ESC key. In addition, a number of the keys have multiple functions, such as the Up arrow/Fn+PgUp key. These don't quite map to regular keyboard scancodes, so a bit of research and general putzing around were required to isolate the exact mapping. I had to improvise, such as placing the ESC key in place of the keyboard's "Today" key, but you can use my xmodmap file as a good starting point.
Save the current mapping somewhere on your handheld, using: xmodmap -pke > /usr/local/xmodmap/xmodmap.default If you are going to use a Dvorak mapping, you can download my stowaway-dvorak xmodmap file here. Save it to some permanent location, on the iPAQ and change the keyboard loading script above to match that location. One the keyboard launcher script and xmodmaps are in place, you ready to go. Plug the iPAQ into the keyboard, run the script as root and type away. The /dev/stowaway device needs to be left open for the duration of your frenzied keyboard action, so the script must be run continuously in a terminal. When you are done, you can simply Ctrl-C the script (and manually xmodmap the default layout back) or create another script to tear down the keyboard and allow the default to be replaced by the command following the `cat`. Something like:
#!/bin/sh
PIDTOKILL=`ps waux | grep 'cat /dev/stow' | grep -v grep | awk '{print $1}'`
if [ "$PIDTOKILL" != "" ]
then
echo "Bringing keyboard driver down..."
kill $PIDTOKILL
sleep 2
echo "Done."
else
echo "No keyboard driver hold prog found. Aborting"
sleep 2
fi
exit 0
also run as root should do the trick.
Enjoy your keyboard and if you improve on the Dvorak xmodmap, let me know how. |
|
| Level: | Article |
| Additional Article Data | |
| Level: | Tutorial |
| Comments |
|---|
|
|
|
The comments are owned by the poster. We aren't responsible for their content.
|
| Jump to section |
|---|


