KeyRemap4MacBook
Download
■ Version 6.4.0
■ Version 5.1.0
■ Repository
You can access repository from
- (Snow Leopard version) http://hg.pqrs.org/KeyRemap4MacBook/
- (Leopard / Tiger version) http://hg.pqrs.org/KeyRemap4MacBook-32bit/
You can also checkout using Mercurial
hg clone http://hg.pqrs.org/KeyRemap4MacBook/
Document
■ Note
This is a documentation for Snow Leopard version.
The documentation for the older versions (Leopard / Tiger) is here.
■ How to build from source code.
- Install Xcode
- Extract Source Code
- Type the following command in Terminal.app. Then, the package file (.pkg) is created.
Ignore the following warnings during creating package.% make clean all
Warning: Mode lrwxr-xr-x does not match drwxr-xr-x of root volume for "/Library/org.pqrs/KeyRemap4MacBook/app/KeyRemap4MacBook.app/Contents/Frameworks/Sparkle.framework/Headers". Make sure to have disk permissions repaired with Disk Utility. Warning: Mode lrwxr-xr-x does not match drwxr-xr-x of root volume for "/Library/org.pqrs/KeyRemap4MacBook/app/KeyRemap4MacBook.app/Contents/Frameworks/Sparkle.framework/Resources". Make sure to have disk permissions repaired with Disk Utility. Warning: Mode lrwxr-xr-x does not match -rwxr-xr-x of root volume for "/Library/org.pqrs/KeyRemap4MacBook/app/KeyRemap4MacBook.app/Contents/Frameworks/Sparkle.framework/Sparkle". Make sure to have disk permissions repaired with Disk Utility. Warning: Mode lrwxr-xr-x does not match drwxr-xr-x of root volume for "/Library/org.pqrs/KeyRemap4MacBook/app/KeyRemap4MacBook.app/Contents/Frameworks/Sparkle.framework/Versions/Current". Make sure to have disk permissions repaired with Disk Utility.
■ How to edit source code.
Sample Diff: add remap.fn2forwarddelete
(1) Extract a Source code.
(2) Edit the checkbox.xml file.
- files/prefpane/checkbox.xml
(3) Build the kernel extension (kext).
% cd src/core/kext % make
(4) Reload the kernel extension (kext).
% cd src/core/kext % make reload
(5) Install the edited checkbox.xml.
% cd files/prefpane % make install
(6) Close System Preferences if opened.
(7) Enable your changes by System Preferences, and test it.
(8) If test has finished, make a package and install it.
% make % open KeyRemap4MacBook.pkg
(9) Completed!! Please send a patch to me.
■ Investigate a key code.
To investigate a key code, turn on debug mode. Type the following command in Terminal.app
% sudo sysctl -w keyremap4macbook.debug=1
Then, type the following command in Terminal.app
*** Type Control-C to quit ***% sudo tail -f /var/log/kernel.log Oct 3 22:22:32 rapeseed kernel[0]: KeyRemap4MacBook KeyboardEventCallback [caught]: eventType 11, flags 0x0, key 13, kbdType 37 Oct 3 22:22:32 rapeseed kernel[0]: KeyRemap4MacBook KeyboardEventCallback [sending]: eventType 11, flags 0x0, key 13, kbdType 37 Oct 3 22:22:32 rapeseed kernel[0]: KeyRemap4MacBook KeyboardEventCallback [caught]: eventType 10, flags 0x0, key 40, kbdType 37 Oct 3 22:22:32 rapeseed kernel[0]: KeyRemap4MacBook KeyboardEventCallback [sending]: eventType 10, flags 0x0, key 40, kbdType 37
Other tools
■ KeyDump-1.1
Comments for This Page. Date: 2010-01-21 22:15 (JST)


