grab_keyboard/6
grab_keyboard(+Window, +OwnerEvents,
+PointerMode, +KeyboardMode,
+Time, -GrabStatus)
Actively grabs control of the keyboard and
generates focus_in
and focus_out
events.
Window is the ProXL window to which events will be reported while
the grab is in effect.
OwnerEvents is one of:
true
- If keyboard events should be reported normally.
false
- If keyboard events should be reported only to the grab window.
PointerMode controls further processing of pointer events:
async
- If pointer event processing continues normally.
sync
- If the state of the pointer, as seen by applications
appears to freeze. No further pointer events
are generated until the grabbing client calls
allow_events/[1,2,3]
or the pointer grab is released.
KeyboardMode controls further processing of keyboard events:
async
- If keyboard event processing continues normally.
sync
- If the state of the keyboard, as seen by applications
appears to freeze. No further keyboard events
are generated until the grabbing client calls
allow_events/[1,2,3]
or the keyboard grab is released.
Time is a timestamp in milliseconds or current_time
.
GrabStatus is unified by grab_keyboard/6
with one of:
success
- If the grab was successful.
already_grabbed
- If the attempt is unsuccessful because the keyboard
is already actively grabbed by some other
client.
invalid_time
- If the attempt is unsuccessful because the specified
Time is earlier than the last-keyboard-grab time, or later than
the current server time.
not_viewable
- If the attempt is unsuccessful because the
grabbing Window is not viewable.
frozen
- If the attempt is unsuccessful because the keyboard is
frozen by an active grab of another client.