Swapping Modifier Keys Seperately on a Notebook and External Keyboard in Mac OSX Tiger (Update)
Previously, I used the method described on Heiko Hellweg’s site to modify the internal keyboard driver of the PowerBook, then use the Keyboard & Mouse Preference Pane to swap the modifier keys again. This resulted in consistent modifier key behaviour on both the built-in keyboard, and on the external keyboard.
Well, OrderedBytes has released a new version (v.4) of ControllerMate, which simultaneously disabled the previous method and opened up a new method. ControllerMate v4 includes it’s own ADBKeyboard driver which overrides the built-in one. I discovered this when I upgraded to v4 and immediately my modifier keys were back to normal. I wrote OrderedBytes, and Ken wrote back to say:
“CMv4 contains a custom ADB (and USB) keyboard and mouse driver to implement the “Controller Configurations”. This should allow you to redefine keyboard keys (such as swapping the command/option keys, or the control/caps-lock keys). These controller configurations work on a per-keyboard basis so any changes made to the internal keyboard do not affect any external keyboards that you have attached.
If you want to use your own version of Apple’s ADB keyboard driver (and it sounds like you do), there are a few ways that you can do it. The easiest is probably just to delete the CMADBKeyboard.kext driver from inside the ControllerMate.kext. This will have no ill effects on anything else in ControllerMate.”
However, instead of disabling the driver, I decided to use the new features of ControllerMate to re-enable my modifier keys configuration. Using ControllerMate to manage the PowerBook’s built-in keyboard means that now the built-in/external consistent modifier key behavior is available to new USB-keyboard-based PowerBooks as well as older ADB-keyboard-based PowerBooks. As of this writing, ControllerMate is not yet Intel-compatible, but Ken has said that is the next priority, at which point it should work for MacBooks as well.
– If you previously modified your AppleADBKeyboard.kext as described in the original posting, you can return it back to it’s original condition if you wish.
– Install ControllerMate v4.
– After rebooting, and launching ControllerMate, (and registering it), make sure the “Palette” window is visible and that the drop-down is set to “Controllers”
– Drag your built-in keyboard (labeled “Keyboard Apple”) from the Palette to the main ControllerMate Editor window. Drop it on the left half of the window below the Buttons labeled “Programming, Controller Types, Virtual Controllers”
– Select the Keyboard controller configuration you just added to the Editor
– Select “Keypad LeftAlt” in the table on the right
– Select Keypad Left GUI” from the “Behavior” drop-down list
– do the same for “Keypad Left Gui” (Select “Keypad LeftAlt” as the Behavior)
– do the same again for “Keypad Right Gui” (Select “Keypad RightAlt” as the Behavior)
– do the same for “Keypad RightAlt” (Select “Keypad Right Gui” as the Behavior)
– Save the configuration
– Under ControllerMate’s Preferences, make sure that “Enable ControllerMate Helper” is checked
– If you haven’t already, open the “Keyboard & Mouse” System Preference and under the “Keyboard” tab, click the “Modifier Keys…” button and then swap the Command and Option keys.
This method should work on new and old PowerBooks alike, and once a Universal version of ControllerMate is released, it will work for MacBooks as well.