logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

SDL_HINT_ANDROID_TRAP_BACK_BUTTON - A variable to control whether we trap the Android back button to

Availability

       This hint is available since SDL 3.2.0.

Simple Directmedia Layer                           SDL 3.2.10               SDL_HINT_ANDROID_TRAP_BACK_BUTTON(3)

Description

       This is necessary for the right mouse button to work on some Android devices, or to be able to  trap  the
       back button for use in your code reliably. If this hint is true, the back button will show up as an

       SDL_EVENT_KEY_DOWN
        /

       SDL_EVENT_KEY_UP
        pair with a keycode of

       SDL_SCANCODE_AC_BACK .

       The variable can be set to the following values:

       • "0": Back button will be handled as usual for system. (default)

       • "1": Back button will be trapped, allowing you to handle the key press
         manually. (This will also let right mouse click work on systems where the
         right mouse button functions as back.)

       This hint can be set anytime.

Header File

       Defined in SDL3/SDL_hints.h

Name

       SDL_HINT_ANDROID_TRAP_BACK_BUTTON  -  A  variable  to  control whether we trap the Android back button to
       handle it manually.

Synopsis

#include"SDL3/SDL.h"#defineSDL_HINT_ANDROID_TRAP_BACK_BUTTONSDL_ANDROID_TRAP_BACK_BUTTON"

See Also