Email: Takayama Fumihiko <tekezo@pqrs.org>

KeyRemap4MacBook

Download

Version 6.4.0

Version 5.1.0

Repository

You can access repository from

You can also checkout using Mercurial

hg clone http://hg.pqrs.org/KeyRemap4MacBook/

The Latest Code (tar.gz)

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.

  1. Install Xcode
  2. Extract Source Code
  3. Type the following command in Terminal.app. Then, the package file (.pkg) is created.
% make clean all
Ignore the following warnings during creating package.
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

% 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
*** Type Control-C to quit ***

Other tools

KeyDump-1.1

For Snow Leopard only.

KeyDump is the event checker of key & mouse.

keydump.png


Comments for This Page.
Date: 2010-01-21 22:15 (JST)