Method for using F4 key without pressing function button on MacBook Pro

Solution 1:

You could also use KeyRemap4MacBook:

<?xml version="1.0"?>
<root>
  <appdef>
    <appname>TEXTEDIT</appname>
    <equal>com.apple.TextEdit</equal>
  </appdef>
  <item>
    <name>flipf4</name>
    <identifier>flipf4</identifier>
    <only>TEXTEDIT</only>
    <autogen>__KeyToKey__ KeyCode::LAUNCHPAD, KeyCode::F4</autogen>
    <autogen>__KeyToKey__ KeyCode::F4, KeyCode::LAUNCHPAD</autogen>
  </item>
</root>

See the source for the key code values and predefined settings.

Solution 2:

Palua

Palua lets you change all function keys for individual apps.

With Palua, you just need one click - or one hotkey - to toggle the mode your Fx keys are.

Palua Smart Mode

FunctionFlip

FunctionFlip can 'flip' certain function keys only instead of changing all keys, but it works for all apps.

FunctionFlip individually controls your MacBook or MacBook Pro's function keys, turning special keys back to regular F-keys, or vice-versa.

FunctionFlip

FunctionFlip's purpose is simply to disable the special features — rewind, play, mute, etc. — on the function keys. For example, if you "flip" F7, F8, and F9, those keys — only those keys — will revert back to normal F keys. Press the fn key with the special key to get the special function back. That is, the "special" and "normal" functions are flipped.