Summary
The XGrabKeyboard() function actively grabs control of the keyboard and generates
FocusIn and FocusOut events. Further key events are reported only to the grabbing client.
XGrabKeyboard() overrides any active keyboard grab by this client.
If owner_events is False, all generated key events are reported with respect to grab_window.
If owner_events is True and if a generated key event would normally be reported to this client,
it is reported normally; otherwise, the event is reported with respect to the grab_window.
Both KeyPress and KeyRelease events are always reported, independent of any event selection made by the client.
Syntax
[DllImportAttribute(LibraryName)]
public static extern int XGrabKeyboard(IntPtr display, IntPtr window, bool own, int pointerMode, int keyboardMode, long currentTime)
Attributes
Type |
Description |
DllImportAttribute |
|
Parameters
Name |
Type |
Description |
display |
IntPtr |
Specifies the connection to the X server. |
window |
IntPtr |
Specifies the grab window. |
own |
bool |
Specifies a Boolean value that indicates whether the keyboard events are to be reported as usual. |
pointerMode |
int |
Specifies further processing of pointer events. You can pass GrabModeSync (0) or GrabModeAsync (1) . |
keyboardMode |
int |
Specifies further processing of keyboard events. You can pass GrabModeSync (0) or GrabModeAsync (1). |
currentTime |
long |
Specifies the time. You can pass either a timestamp or CurrentTime. |
Return Value