14

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?

Marco Ceppi
  • 47,783
  • 30
  • 172
  • 197
Lenik
  • 10,188
  • 12
  • 34
  • 36
  • I'm uncertain as to which key is Mod4 - is that the ["Super" key](http://askubuntu.com/questions/19558/what-are-the-meta-super-and-hyper-keys)? – Marco Ceppi Jan 05 '11 at 02:19
  • It's the "Win" key. or `Super_L` in the output of `xev`. – Lenik Jan 05 '11 at 02:35
  • 1
    Read **[this](http://askubuntu.com/a/585204/209676)** question/answer. – setempler Feb 14 '15 at 13:42
  • Possible duplicate of [How to disable global -p shortcut?](http://askubuntu.com/questions/68463/how-to-disable-global-super-p-shortcut) – Sadegh Feb 09 '16 at 14:29

5 Answers5

7

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.

Marius Gedminas
  • 11,161
  • 8
  • 50
  • 54
  • 1
    Now I have convinced my self to learn not to press Win-p. – Lenik Jan 06 '11 at 09:50
  • Switching from macOS to Linux on a daily basis this has been the bane of my existence, Win+P opens the source browser in VSCode on macOS, so glad there is a solution. – icirellik Oct 23 '18 at 20:06
4

Ubuntu 14.04 simply:

dconf write /org/gnome/settings-daemon/plugins/media-keys/active false

At the command line :)

Leo Gallucci
  • 316
  • 2
  • 13
2

Install compizconfig-settings-manager, run it, press Advanced Search >, enable the checkbox for searching in setting values, and do a search for <Super>p (and <Mod4>p, just in case -- both spellings appear to work).

On my machine I find that <Super>p is bound by two disabled plugins: ADD Helper and Shelf.

Stefano Palazzo
  • 85,787
  • 45
  • 210
  • 227
Marius Gedminas
  • 11,161
  • 8
  • 50
  • 54
1

For newer versions of Ubuntu, dconf is used (instead of gconf) for changing the gnome-settings-daemon setting: see this question.

Mark
  • 1,439
  • 13
  • 15
0

On Ubuntu Quantal

Find all bindings to Super-p

gconftool-2 -R /apps | grep "<Super>p"
gconftool-2 -R /system | grep "<Super>p"

Unbind them

gconftool-2 -s /apps/compiz-1/plugins/shelf/screen0/options/triggerscreen_key "" --type String
gconftool-2 -s /apps/compiz-1/plugins/addhelper/screen0/options/toggle_key "" --type String