Ubuntu – Using Menu key as Compose key in Ubuntu 15.04 pops up a menu instead

15.04compose-key

I configured my Compose key to be the Menu key as in this question. However, instead of (or maybe in addition to?) getting the compose behaviour, when I press the Menu key, the context menu appears (the menu that you'd normally get on right-click).

This now happens in Chrome and in gnome-terminal, so I'm assuming it's a system-wide feature. It used to work fine in 14.04 (not sure about 14.10).

How to override/disable this so I can use Menu as the Compose key?

In case it matters: I'm using Xmonad, not Unity.

xev output for the Menu key:

KeyPress event, serial 33, synthetic NO, window 0x2800001,
    root 0x1d7, subw 0x0, time 49369104, (497,344), root:(1690,368),
    state 0x10, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x2800001,
    root 0x1d7, subw 0x0, time 49369216, (497,344), root:(1690,368),
    state 0x10, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

xmodmap output:

xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

Best Answer

As I said here, use this configuration: ['compose:menu'] in org.gnome.desktop.input-sources > xkb-options. Tested with Ubuntu 15.04 and xmonad.

With this configuration:

% xev
KeyPress event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38683999, (93,83), root:(138,192),
    state 0x10, keycode 135 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: True

KeyRelease event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38684071, (93,83), root:(138,192),
    state 0x10, keycode 135 (keysym 0xff20, Multi_key), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

Without this configuration:

% xev
KeyPress event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38796879, (476,270), root:(521,379),
    state 0x10, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 36, synthetic NO, window 0x1600001,
    root 0x233, subw 0x0, time 38796951, (476,270), root:(521,379),
    state 0x10, keycode 135 (keysym 0xff67, Menu), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False