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

View File

@@ -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

View File

@@ -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.