mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-30 15:08:31 +00:00
Revert "Change SDL_Keycode
type to an enum"
SDL_Keycode can actually be any printable character on the keyboard, so isn't limited to the enumerated values of SDL_KeyCode.
This commit is contained in:
@@ -31,9 +31,6 @@
|
||||
#include <SDL3/SDL_stdinc.h>
|
||||
#include <SDL3/SDL_scancode.h>
|
||||
|
||||
#define SDLK_SCANCODE_MASK (1<<30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
|
||||
/**
|
||||
* The SDL virtual key representation.
|
||||
*
|
||||
@@ -45,6 +42,10 @@
|
||||
* A special exception is the number keys at the top of the keyboard which
|
||||
* map to SDLK_0...SDLK_9 on AZERTY layouts.
|
||||
*/
|
||||
typedef Sint32 SDL_Keycode;
|
||||
|
||||
#define SDLK_SCANCODE_MASK (1<<30)
|
||||
#define SDL_SCANCODE_TO_KEYCODE(X) (X | SDLK_SCANCODE_MASK)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
@@ -323,7 +324,7 @@ typedef enum
|
||||
SDLK_SOFTRIGHT = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_SOFTRIGHT),
|
||||
SDLK_CALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_CALL),
|
||||
SDLK_ENDCALL = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_ENDCALL)
|
||||
} SDL_Keycode;
|
||||
} SDL_KeyCode;
|
||||
|
||||
/**
|
||||
* Enumeration of valid key mods (possibly OR'd together).
|
||||
|
Reference in New Issue
Block a user