mirror of
https://github.com/glfw/glfw.git
synced 2026-01-11 23:33:16 +01:00
Cleanup
Clean up code and documentation for glfwGetKeyScancode and add implementation for Wayland and Mir. Related to #830.
This commit is contained in:
@@ -225,16 +225,13 @@ arguments can always be passed unmodified to this function.
|
||||
|
||||
@subsection input_key_scancode Key scancodes
|
||||
|
||||
If you need the platform dependent scancode for any given key, you can query
|
||||
it with @ref glfwGetKeyScancode.
|
||||
If you need the platform dependent scancode for a [named key](@ref keys), you
|
||||
can query it with @ref glfwGetKeyScancode.
|
||||
|
||||
@code
|
||||
const short int scancode = glfwGetKeyScancode(GLFW_KEY_X);
|
||||
const int scancode = glfwGetKeyScancode(GLFW_KEY_X);
|
||||
set_key_mapping(scancode, swap_weapons);
|
||||
@encode
|
||||
|
||||
If the key is `GLFW_KEY_UNKNOWN` or does not exist on the keyboard this
|
||||
method will return `-1`.
|
||||
@endcode
|
||||
|
||||
|
||||
@section input_mouse Mouse input
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
@section news_33 New features in 3.3
|
||||
|
||||
|
||||
@subsection new_33_keyscancode Platform dependent scancodes
|
||||
@subsection news_33_keyscancode Platform-specific key scancode query
|
||||
|
||||
GLFW now supports querying the platform dependent scancode of any key with
|
||||
@ref glfwGetKeyScancode.
|
||||
|
||||
Reference in New Issue
Block a user