Add lock key modifier bits input mode

This adds the GLFW_MOD_CAPS_LOCK and GLFW_MOD_NUM_LOCK modifier bits.
Set the GLFW_LOCK_KEY_MODS input mode to enable these for all callbacks
that receive modifier bits.

Fixes #946.
This commit is contained in:
Camilla Löwy
2017-11-29 20:42:37 +01:00
parent fd72eb917e
commit 0e8c4ea7ce
12 changed files with 107 additions and 10 deletions
+4
View File
@@ -123,6 +123,10 @@ static int mirModToGLFWMod(uint32_t mods)
publicMods |= GLFW_MOD_CONTROL;
if (mods & mir_input_event_modifier_meta)
publicMods |= GLFW_MOD_SUPER;
if (mods & mir_input_event_modifier_caps_lock)
publicMods |= GLFW_MOD_CAPS_LOCK;
if (mods & mir_input_event_modifier_num_lock)
publicMods |= GLFW_MOD_NUM_LOCK;
return publicMods;
}