gdkTestSimulateKey: gdkTestSimulateKey

Description Usage Arguments Details Value Author(s)

View source: R/gdkFuncs.R

Description

This function is intended to be used in Gtk+ test programs. If (x,y) are > (-1,-1), it will warp the mouse pointer to the given (x,y) corrdinates within window and simulate a key press or release event. When the mouse pointer is warped to the target location, use of this function outside of test programs that run in their own virtual windowing system (e.g. Xvfb) is not recommended. If (x,y) are passed as (-1,-1), the mouse pointer will not be warped and window origin will be used as mouse pointer location for the event. Also, gtkTestSimulateKey() is a fairly low level function, for most testing purposes, gtkTestWidgetSendKey is the right function to call which will generate a key press event followed by its accompanying key release event.

Usage

1
gdkTestSimulateKey(window, x, y, keyval, modifiers, key.pressrelease)

Arguments

window

Gdk window to simulate a key event for.

x

x coordinate within window for the key event.

y

y coordinate within window for the key event.

keyval

A Gdk keyboard value.

modifiers

Keyboard modifiers the event is setup with.

key.pressrelease

either GDK_KEY_PRESS or GDK_KEY_RELEASE

Details

Since 2.14

Value

[logical] wether all actions neccessary for a key event simulation were carried out successfully.

Author(s)

Derived by RGtkGen from GTK+ documentation


RGtk2 documentation built on Oct. 14, 2021, 5:08 p.m.