I was able to get command/backquote (aka tilde) swap for 82 Key Deck working by making a slight mod to Takayama Fumihiko's
KeyRemap4Macbook. I'm assuming that this software will work on any mac, but I only have a macbook on which to test.
Moving to KeyRemap4Macbook was necessary since the modified version of DoubleCommand found elsewhere on this forum, which previously worked under Tiger, is now broken under Leopard. Keyremap4macbook looked much easier to modify than DoubleCommand though unlike DoubleCommand it currently has no GUI PrefPane.
The modified KeyRemap4Mackbook package is here:
TAKEN DOWN. SEE BELOW FOR OFFICIAL PKG.
Useage
In a terminal window type the following to activate backquote and command swap:
Code:
sudo sysctl -w keyremap4macbook.remap.backquote2command=1
To deactivate backquote and command swap:
Code:
sudo sysctl -w keyremap4macbook.remap.backquote2command=0
To permanently save your new setting as default:
Code:
sudo /Applications/KeyRemap4MacBook/scripts/autosave.sh
Since I'm on a laptop which only needs the keys swapped when docked and the deck keyboard is present, I like to use the settings above in combination with the excellent
SleepWatcher deamon. With sleepwatcher installed and running, create a file in your home directory named .wakeup, with the following contents:
Code:
#!/bin/bash
if `/usr/sbin/ioreg |grep -q "Deck.*registered, matched, active"`
then
/usr/bin/sudo /usr/sbin/sysctl -w keyremap4macbook.remap.backquote2command=1
else
/usr/bin/sudo /usr/sbin/sysctl -w keyremap4macbook.remap.backquote2command=0
fi
Change the mode on .wakeup to make it executable:
Code:
chmod 755 .wakeup
Your system will now check for the presence of a Deck keyboard on wakeup and do the backquote2command swap only if the Deck keyboard is present.
Cheers-