testWidgetSendKey

fnbool testWidgetSendKey(gtk.widget.Widget widget, uint keyval, gdk.types.ModifierType modifiers)

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.Widget.getHasWindow]), 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.global.testSimulateKey] for details.

Parameters

widgetWidget to generate a key press and release on.
keyvalA Gdk keyboard value.
modifiersKeyboard modifiers the event is setup with.

Returns

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