Skip to content

MTY_AppGrabKeyboard

chrisd1100 edited this page May 13, 2023 · 2 revisions

Grab the keyboard, capturing certain keys usually handled by the OS.

The app defaults being ungrabbed. This function will attempt to route all special OS hotkeys to the app instead, i.e. ATL+TAB on Windows. On macOS, MTY_APP_FLAG_HID_KEYBOARD must be set during MTY_AppCreate for this function to succeed.

bool MTY_AppGrabKeyboard(
    MTY_App * ctx,
    bool      grab
);

Parameters

ctx (MTY_App *)

The MTY_App.

grab (bool)

Set true to grab, false to ungrab.

Return value

bool

The resulting keyboard grab state of the app.

Platform support

Windows   macOS  

See also

Module: App

Clone this wiki locally