mirror of
https://github.com/glfw/glfw.git
synced 2026-09-19 15:25:50 +00:00
Add glfwGetKeyScancode
Allows retrieval of platform scancode from GLFW_KEY_*. Implemented for Win32, Cocoa and X11. Stubs for Mir and Wayland. Closes #830.
This commit is contained in:
committed by
Camilla Berglund
parent
f17d60da64
commit
e745b0dd47
@@ -256,6 +256,12 @@ GLFWAPI const char* glfwGetKeyName(int key, int scancode)
|
||||
return _glfwPlatformGetKeyName(key, scancode);
|
||||
}
|
||||
|
||||
GLFWAPI const short int glfwGetKeyScancode(int key)
|
||||
{
|
||||
_GLFW_REQUIRE_INIT_OR_RETURN(-1);
|
||||
return _glfwPlatformGetKeyScancode(key);
|
||||
}
|
||||
|
||||
GLFWAPI int glfwGetKey(GLFWwindow* handle, int key)
|
||||
{
|
||||
_GLFWwindow* window = (_GLFWwindow*) handle;
|
||||
|
||||
Reference in New Issue
Block a user