sdlHasKeyboard function

bool sdlHasKeyboard()

Return whether a keyboard is currently connected.

\returns true if a keyboard is connected, false otherwise.

\threadsafety This function should only be called on the main thread.

\since This function is available since SDL 3.1.3.

\sa SDL_GetKeyboards

extern SDL_DECLSPEC bool SDLCALL SDL_HasKeyboard(void)

Implementation

bool sdlHasKeyboard() {
  final sdlHasKeyboardLookupFunction = libSdl3
      .lookupFunction<Uint8 Function(), int Function()>('SDL_HasKeyboard');
  return sdlHasKeyboardLookupFunction() == 1;
}