Q:

How to stop Mod4-P from switching the display?

I use Ctrl-P very frequently to scroll backward in the command history, but I often mistype it as Mod4-P, which is bound to the switch display function. 
I've searched around Keyboard shortcuts and CompizConfig, etc., but I couldn't find where Mod4-P is bound. What controls that?

A:

Disregard my other answer, it's incorrect.
There are laptops out there that have a physical button for video output switching hardcoded to send Win+p.  This is why Ubuntu now interpets Win+p as a video output switching key.
This is hardcoded in gnome-settings-daemon and can be disabled in gconf by setting
/apps/gnome_settings_daemon/plugins/xrandr/active

to false.  This workaround probably has a nasty side effect of breaking your real video switch key, if you have one.
P.S. This feature is added via an Ubuntu-specific debian/45_support_new_video_key.patch, but upstream gnome-settings daemon will do the same thing in a different gnome-settings-daemon plugin (media-keys).  It is therefore likely that this gconf workaround will stop working in Natty.
P.P.S. There's an open bug claiming that stealing Win+p this way is not nice for people who have sane hardware and want to use it for something else.

A:

Ubuntu 14.04 simply:
dconf write /org/gnome/settings-daemon/plugins/media-keys/active false
At the command line :)

