Changeset View
Changeset View
Standalone View
Standalone View
source/ps/KeyName.h
Show All 17 Lines | |||||
#ifndef INCLUDED_KEYNAME | #ifndef INCLUDED_KEYNAME | ||||
#define INCLUDED_KEYNAME | #define INCLUDED_KEYNAME | ||||
// Need SDLK_* enum values. | // Need SDLK_* enum values. | ||||
#include "lib/external_libraries/libsdl.h" | #include "lib/external_libraries/libsdl.h" | ||||
class CStr8; | class CStr8; | ||||
extern SDL_Scancode FindScancode(const CStr& keyname); | extern SDL_Scancode FindScancode(const CStr8& keyname); | ||||
// Map a scancode to a locale-independent scancode name. | // Map a scancode to a locale-independent scancode name. | ||||
extern CStr8 FindScancodeName(SDL_Scancode scancode); | extern CStr8 FindScancodeName(SDL_Scancode scancode); | ||||
// Map a scancode to a locale-dependent key name (to show the user). | // Map a scancode to a locale-dependent key name (to show the user). | ||||
extern CStr8 FindKeyName(SDL_Scancode scancode); | extern CStr8 FindKeyName(SDL_Scancode scancode); | ||||
enum { | enum { | ||||
// Start sequential IDs in the right place | // Start sequential IDs in the right place | ||||
// Pick a code which is greater than any scancodes used by SDL itself | // Pick a code which is greater than any scancodes used by SDL itself | ||||
Show All 24 Lines |
Wildfire Games · Phabricator