keyboardGrab

Grabs the keyboard so that all events are passed to this application until the keyboard is ungrabbed with gdk.global.keyboardUngrab. This overrides any previous keyboard grab by this client.

If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the #GdkEventGrabBroken events that are emitted when the grab ends unvoluntarily.

More...

Parameters

window gdk.window.Window

the #GdkWindow which will own the grab (the grab window).

ownerEvents bool

if false then all keyboard events are reported with respect to window. If true then keyboard events for this application are reported as normal, but keyboard events outside this application are reported with respect to window. Both key press and key release events are always reported, independant of the event mask set by the application.

time uint

a timestamp from a #GdkEvent, or gdk.types.CURRENT_TIME if no timestamp is available.

Return Value

Type: gdk.types.GrabStatus

gdk.types.GrabStatus.Success if the grab was successful.

Detailed Description

Deprecated: Use gdk.device.Device.grab instead.