OSX vs Vim: a war for the Function keys

Is there a way to quickly toggle the "use F1, F2, etc as standard function keys" in OSX? I'm a vim user on a MacBook, and I'd like to use at least some of the function keys for vim mappings, but it's a big sacrifice in ease-of-use outside of Vim.

How do most people resolve this?


Palua

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.

Palua Smart Mode

KeyRemap4Macbook

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