My vim setup( https://github.com/aaronjorbin/.vim ) contains set pastetoggle=<F2> yet fn+F2 (when vim is running in terminal) causes vim to enter insert mode and output a Q on it's own line (same behavior when I am already in insert mode). This is the same if I am working on my local machine or if I have sshed into another server.
In iterm2, nothing happens when I am in normal or visual mode. When I am in insert mode, <F2> is inserted.
My config works perfectly well on my mac mini and linux netbook, but this is throwing me for a loop.

You have
set noesckeysin your vimrc.I've read a long time ago (no source, sorry) something about function keys being interpreted as
<Esc>numberin some terminals (<Esc>9for<F9>).If I'm correct and if I read
:help noesckeyscorrectly,set noesckeysis blocking all function keys. Try commenting it out.