glfwGetKeyScancode function
! @brief Returns the platform-specific scancode of the specified key.
This function returns the platform-specific scancode of the specified key.
If the specified key token
(@ref keys) corresponds to a physical key not
supported on the current platform then this method will return -1
.
Calling this function with anything other than a key token will return -1
and generate a @ref GLFW_INVALID_ENUM error.
@paramin
key Any key token
(@ref keys).
@return The platform-specific scancode for the key, or -1
if the key is
not supported on the current platform or an error
(@ref error_handling)
occurred.
@errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref GLFW_INVALID_ENUM.
@thread_safety This function may be called from any thread.
@sa @ref input_key
@since Added in version 3.3.
@ingroup input
GLFWAPI int glfwGetKeyScancode(int key)
Implementation
int glfwGetKeyScancode(int key) {
final glfwGetKeyScancodeLookupFunction =
libglfw.lookupFunction<Int32 Function(Int32 key), int Function(int key)>(
'glfwGetKeyScancode');
return glfwGetKeyScancodeLookupFunction(key);
}