include/SDL_hints.h
changeset 12059 320b43d5e5a7
parent 11896 5607348c333f
child 12088 399cc39583cc
     1.1 --- a/include/SDL_hints.h	Thu Jul 05 23:01:10 2018 +0300
     1.2 +++ b/include/SDL_hints.h	Thu Jul 12 13:28:13 2018 -0700
     1.3 @@ -753,6 +753,23 @@
     1.4  #define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
     1.5  
     1.6   /**
     1.7 + * \brief A variable to control whether we trap the Android back button to handle it manually.
     1.8 + *        This is necessary for the right mouse button to work on some Android devices, or
     1.9 + *        to be able to trap the back button for use in your code reliably.  If set to true,
    1.10 + *        the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of 
    1.11 + *        SDL_SCANCODE_AC_BACK.
    1.12 + *
    1.13 + * The variable can be set to the following values:
    1.14 + *   "0"       - Back button will be handled as usual for system. (default)
    1.15 + *   "1"       - Back button will be trapped, allowing you to handle the key press
    1.16 + *               manually.  (This will also let right mouse click work on systems 
    1.17 + *               where the right mouse button functions as back.)
    1.18 + *
    1.19 + * The value of this hint is used at runtime, so it can be changed at any time.
    1.20 + */
    1.21 +#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
    1.22 +
    1.23 + /**
    1.24   * \brief A variable to control whether the return key on the soft keyboard
    1.25   *        should hide the soft keyboard on Android and iOS.
    1.26   *