Event.triggersContextMenu

This function returns whether a #GdkEventButton should trigger a context menu, according to platform conventions. The right mouse button always triggers context menus. Additionally, if gdk.keymap.Keymap.getModifierMask returns a non-0 mask for gdk.types.ModifierIntent.ContextMenu, then the left mouse button will also trigger a context menu if this modifier is pressed.

This function should always be used instead of simply checking for event->button == gdk.types.BUTTON_SECONDARY.

class Event
bool
triggersContextMenu
()

Return Value

Type: bool

true if the event should trigger a context menu.