FWIW: I found another way to accomplish this that's better for me (this is in iTerm2).
I wanted emacs to behave the same in the terminal as it does in a window. I have my emacs set to use the command key as the meta key via the following snippet:
;;osx keys
(setq mac-option-key-is-meta nil)
(setq mac-command-key-is-meta t)
(setq mac-command-modifier 'meta)
(setq mac-option-modifier 'alt)
So to get my command key behaving like a meta key in iTerm2, I went to preferences->profiles->->keys and added new keys. The only problem is you have to do it for each key separately, but you can say for example,
keyboard shortcut: <type command-p>
action: send escape sequence
Esc+: p
So I did that for my most frequently used meta+ keys. It would be nice if there was another set of radio buttons like there is for option/alt, where you could just say "command key acts like Esc+".