Palua lets you set the 'standard function keys' setting for individual apps only.
With Palua, you just need one click - or one hotkey - to toggle the mode your Fx keys are.
<?xml version="1.0"?>
<root>
<appdef>
<appname>TERMINAL</appname>
<equal>com.apple.Terminal</equal>
</appdef>
<item>
<name>FunctionforF4</name>
<identifier>FunctionforF4</identifier>
<only>TERMINAL</only>
<autogen>__KeyToKey__ KeyCode::LAUNCHPAD, KeyCode::F4</autogen>
<autogen>__KeyToKey__ KeyCode::F4, KeyCode::LAUNCHPAD</autogen>
</item>
</root>
For other keys have a look at the key list.