Q:

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

I'm using a program that uses the F4 key as an important shortcut which I use heavily.
Every time I want to press F4 on my MacBook Pro also have to press the fn button.
Is there a possibility (such as with an AppleScript?) that something could detect if I'm using that program and allow me to avoid pressing fn and let me use the shortcut just with the F4 key?

A:

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.

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'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.

A:

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.

