ContextMenu.getEvent
gdk.event.Event getEvent()Gets the #GdkEvent that triggered the context menu. This function only returns a valid #GdkEvent when called for a #WebKitContextMenu passed to #WebKitWebView::context-menu signal; in all other cases, null is returned.
The returned #GdkEvent is expected to be one of the following types:
<itemizedlist> <listitem><para>a #GdkEventButton of type [gdk.types.EventType.ButtonPress] when the context menu was triggered with mouse.
</para></listitem> <listitem><para>a #GdkEventKey of type [gdk.types.EventType.KeyPress] if the keyboard was used to show the menu.
</para></listitem> <listitem><para>a generic #GdkEvent of type [gdk.types.EventType.Nothing] when the #GtkWidget::popup-menu signal was used to show the context menu.
</para></listitem> </itemizedlist>Returns
the menu event or null.