Clean up code and documentation for glfwGetKeyScancode and add
implementation for Wayland and Mir.

Related to #830.
This commit is contained in:
Camilla Berglund
2016-09-06 15:40:31 +02:00
parent e745b0dd47
commit bb3cb8f233
11 changed files with 28 additions and 41 deletions
+8 -1
View File
@@ -256,9 +256,16 @@ GLFWAPI const char* glfwGetKeyName(int key, int scancode)
return _glfwPlatformGetKeyName(key, scancode);
}
GLFWAPI const short int glfwGetKeyScancode(int key)
GLFWAPI int glfwGetKeyScancode(int key)
{
_GLFW_REQUIRE_INIT_OR_RETURN(-1);
if (key < GLFW_KEY_SPACE || key > GLFW_KEY_LAST)
{
_glfwInputError(GLFW_INVALID_ENUM, "Invalid key %i", key);
return GLFW_RELEASE;
}
return _glfwPlatformGetKeyScancode(key);
}