4

The half-size arrow keys on my MacBook are a little small for me. The keys I'd prefer to use are:

  • fn +  J  to move left
  • fn +  K  to move down
  • fn +  L  to move right
  • fn +  I  to move up

I badly want to use the "fn" key for this, both for ergonomic and practical reasons (ie: avoid conflicts with other apps).

Is this possible? How?

  • To clarify: I know how to do this using the ctrl key, the shift key, the alt key... unfortunately the function key seems to be off limits – username Apr 9 '12 at 16:13
4

I installed a third party utility to remap these keys on my MacBook Pro running OS X 10.8. Here are the steps I used:

(1) Download and install KeyRemap4MacBook.app

(2) Edit (or create) the following file in a text editor:

~/Library/Application Support/KeyRemap4MacBook/private.xml

...so that its content is:

<?xml version="1.0"?>
<root>
<item>
        <name>JKLI to Arrow Keys</name>
        <identifier>private.jkli_to_arrow_keys</identifier>
        <autogen>
            __KeyToKey__
            KeyCode::J, ModifierFlag::FN,
            KeyCode::CURSOR_LEFT
        </autogen>
        <autogen>
        __KeyToKey__
            KeyCode::K, ModifierFlag::FN,
            KeyCode::CURSOR_DOWN
        </autogen>
        <autogen>
        __KeyToKey__
            KeyCode::L, ModifierFlag::FN,
            KeyCode::CURSOR_RIGHT
        </autogen>
        <autogen>
        __KeyToKey__
            KeyCode::I, ModifierFlag::FN,
            KeyCode::CURSOR_UP
        </autogen>
</item>
</root>

(3) Select "Preferences" from the little KeyRemap4MacBook icon in the OS X MenuBar at the top of the screen.

KeyRemap4MacBook > Preferences

(4) In KeyRemap4MacBook's "Change Key" tab, tick "JKLI to Arrow Keys". (if this option doesn't appear, you may need to click the "ReloadXML" button)

KeyRemap4MacBook > Change Key

You should now be able to use the Function key with J|K|L|I to control the cursor, in addition to the Arrow keys.

2

You are correct. Although Mac OS X allows you to remap the control, caps lock, option, and command keys, the fn key is not included. To do this, you'll need to use 3rd-party software such as DoubleCommand. That will let you remap the fn key to the control key.

From there, you should check out additional software to remap the control+J key etc. to emulate the left key etc. So long as you can emulate ctrl, you should be able to create the keybinding in ~/Library/KeyBindings. You might be able to do this last step in DoubleCommand as well.

  • Not sure DoubleCommand works with Lion, I'll check this out. If it does, this would indeed be a solution, because OS X allows you to add keybindings ( ~/Library/KeyBindings ) with [ctrl] – username Apr 10 '12 at 8:00
  • Very cool. You should edit my answer to add that information! – zwerdlds Apr 10 '12 at 14:32
  • 1
    Update for those coming to this in 2015: KeyRemap4MacBook.app has been renamed and is available at [1]: pqrs.org/osx/karabiner – Centzon Jul 23 '15 at 13:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .