Function

Gtktest_widget_send_key

since: 2.14

Declaration [src]

gboolean
gtk_test_widget_send_key (
  GtkWidget* widget,
  guint keyval,
  GdkModifierType modifiers
)

Description [src]

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 GtkButton (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.

Available since: 2.14

Parameters

widget

Type: GtkWidget

Widget to generate a key press and release on.

The data is owned by the caller of the function.
keyval

Type: guint

A Gdk keyboard value.

modifiers

Type: GdkModifierType

Keyboard modifiers the event is setup with.

Return value

Type: gboolean

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