SDL Wiki
(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)

SDL_HINT_ANDROID_TRAP_BACK_BUTTON

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

Header File

Defined in SDL_hints.h

Syntax

#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"

Remarks

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 set to true, the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of SDL_SCANCODE_AC_BACK.

The variable can be set to the following values:

The value of this hint is used at runtime, so it can be changed at any time.


CategoryAPI, CategoryAPIMacro, CategoryHints


[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.