The Mac OS X 10.4 Keyboard & Mouse preference pane provides a way to remap certain keys. However, the interface doesn't expose the full functionality -- a common problem with Apple software. Note that this guide assumes you'using the bash shell.
Read on to learn...
What keys can be remapped without the use of any third–party software? (The following list shows the key name on the left, and that key's value on the right.)
How do I remap those keys?
Unfortunately, this will require the use of a third–party program. I used a free trial version of Keyboard Maestro by Stairways Software. First, remap the Caps Lock key to the Help key, following the instructions above. Then, in Keyboard Maestro:
Read on to learn...
- What keys can be remapped without the use of any third–party software?
- How do I remap those keys?
- How do I remap the Caps Lock key to the Escape key?
What keys can be remapped without the use of any third–party software? (The following list shows the key name on the left, and that key's value on the right.)
- None — –1
- Caps Lock — 0
- Shift (Left) — 1
- Control (Left) — 2
- Option (Left) — 3
- Command (Left) — 4
- Keypad 0 — 5
- Help — 6
- Shift (Right) — 9
- Control (Right) — 10
- Option (Right) — 11
- Command (Right) — 12
- Kernel Panic — 16
How do I remap those keys?
- Remap one of the keys available in the Keyboard & Mouse preference pane in order to make the following steps easier.
- Locate the hidden property list file used to store the settings. It's in your user's Library/Preferences/ByHost folder, and is named.GlobalPreferences.000d*. I assume there'll be only one such file; you'll need to verify that. From here on, that file and path are referred to as$FILE.
- Duplicate the file and convert it to the XML property list format:
$ cp $FILE ~/keys-binary.plist $ plutil -convert xml1 -o ~/keys-xml.plist ~/keys-binary.plist
- Open the resulting XML file and locate thecom.apple.keyboard.modifiermapping key. Its value is an array containing several entries, each in turn containingHIDKeyboardModifierMappingSrc and HIDKeyboardModifierMappingDstkeys. The values of those keys are described in the table above. Make the changes you wish to make, and save your work.
- Convert the file back to the binary property list format, and put it back in the correct location:
$ plutil -convert binary1 -o ~/keys-binary.plist ~/keys-xml.plist $ cp ~/keys-binary.plist $FILE
- Log out and back in to apply changes.
Unfortunately, this will require the use of a third–party program. I used a free trial version of Keyboard Maestro by Stairways Software. First, remap the Caps Lock key to the Help key, following the instructions above. Then, in Keyboard Maestro:
- Create a new macro.
- Add a Simulate Keypress action, with an User Keystroke — the Escape key.
- Add a Hot Key trigger, set to the Help key.
- In the Preferences section, enable the Launch Engine at Login option. While you're at it, you might also want to disable all other unnecessary features.
No comments:
Post a Comment