mirror of
https://github.com/raysan5/raylib.git
synced 2025-10-05 01:16:28 +00:00
Adding GetKeyName(int key) (WIP) (#4161)
This commit is contained in:
@@ -632,6 +632,13 @@ void SetMouseCursor(int cursor)
|
||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
|
@@ -1075,6 +1075,12 @@ void SetMouseCursor(int cursor)
|
||||
}
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
return glfwGetKeyName(key, glfwGetKeyScancode(key));
|
||||
}
|
||||
|
||||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
|
@@ -756,6 +756,13 @@ void SetMouseCursor(int cursor)
|
||||
RGFW_window_setMouseStandard(platform.window, cursor);
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
static KeyboardKey ConvertScancodeToKey(u32 keycode);
|
||||
|
||||
// TODO: Review function to avoid duplicate with RSGL
|
||||
|
@@ -966,6 +966,12 @@ void SetMouseCursor(int cursor)
|
||||
CORE.Input.Mouse.cursor = cursor;
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
return SDL_GetKeyName(key);
|
||||
}
|
||||
|
||||
static void UpdateTouchPointsSDL(SDL_TouchFingerEvent event)
|
||||
{
|
||||
CORE.Input.Touch.pointCount = SDL_GetNumTouchFingers(event.touchId);
|
||||
|
@@ -628,6 +628,13 @@ void SetMouseCursor(int cursor)
|
||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
|
@@ -384,6 +384,13 @@ void SetMouseCursor(int cursor)
|
||||
TRACELOG(LOG_WARNING, "SetMouseCursor() not implemented on target platform");
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
|
@@ -884,6 +884,13 @@ void SetMouseCursor(int cursor)
|
||||
}
|
||||
}
|
||||
|
||||
// Get physical key name.
|
||||
const char *GetKeyName(int key)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "GetKeyName() not implemented on target platform");
|
||||
return "";
|
||||
}
|
||||
|
||||
// Register all input events
|
||||
void PollInputEvents(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user