Function

Gtk-3.0Gtktest_widget_send_keySince 2.14

  • This function will generate keyboard press and release events in the middle of the first GdkWindow found that belongs to widget. For windowless widgets like Gtk.Button (which returns false from gtk_widget_get_has_window()), this will often be an input-only event window. For other widgets, this is usually widget->window. Certain caveats should be considered when using this function, in particular because the mouse pointer is warped to the key press location, see gdk_test_simulate_key() for details.

    Parameters

    • widget: Gtk.Widget

      Widget to generate a key press and release on.

    • keyval: number

      A Gdk keyboard value.

    • modifiers: Gdk.ModifierType

      Keyboard modifiers the event is setup with.

    Returns boolean

    whether all actions neccessary for the key event simulation were carried out successfully.

    2.14