mirror of
https://github.com/glfw/glfw.git
synced 2024-11-11 13:03:52 +00:00
Renamed control modifier bit to match key token.
This commit is contained in:
parent
47b06e1fdc
commit
3bcffba24a
@ -415,7 +415,7 @@ extern "C" {
|
||||
#define GLFW_MOD_SHIFT 0x0001
|
||||
/*! @ingroup input
|
||||
*/
|
||||
#define GLFW_MOD_CTRL 0x0002
|
||||
#define GLFW_MOD_CONTROL 0x0002
|
||||
/*! @ingroup input
|
||||
*/
|
||||
#define GLFW_MOD_ALT 0x0004
|
||||
|
@ -210,7 +210,7 @@ static int convertKeyMods(NSUInteger flags)
|
||||
if (flags & NSShiftKeyMask)
|
||||
mods |= GLFW_MOD_SHIFT;
|
||||
if (flags & NSControlKeyMask)
|
||||
mods |= GLFW_MOD_CTRL;
|
||||
mods |= GLFW_MOD_CONTROL;
|
||||
if (flags & NSAlternateKeyMask)
|
||||
mods |= GLFW_MOD_ALT;
|
||||
|
||||
|
@ -113,7 +113,7 @@ static int getKeyMods(void)
|
||||
if (GetKeyState(VK_SHIFT) & (1 << 31))
|
||||
mods |= GLFW_MOD_SHIFT;
|
||||
if (GetKeyState(VK_CONTROL) & (1 << 31))
|
||||
mods |= GLFW_MOD_CTRL;
|
||||
mods |= GLFW_MOD_CONTROL;
|
||||
if (GetKeyState(VK_MENU) & (1 << 31))
|
||||
mods |= GLFW_MOD_ALT;
|
||||
|
||||
@ -129,7 +129,7 @@ static int getAsyncKeyMods(void)
|
||||
if (GetAsyncKeyState(VK_SHIFT) & (1 << 31))
|
||||
mods |= GLFW_MOD_SHIFT;
|
||||
if (GetAsyncKeyState(VK_CONTROL) & (1 << 31))
|
||||
mods |= GLFW_MOD_CTRL;
|
||||
mods |= GLFW_MOD_CONTROL;
|
||||
if (GetAsyncKeyState(VK_MENU) & (1 << 31))
|
||||
mods |= GLFW_MOD_ALT;
|
||||
|
||||
|
@ -67,7 +67,7 @@ int translateState(int state)
|
||||
if (state & ShiftMask)
|
||||
mods |= GLFW_MOD_SHIFT;
|
||||
if (state & ControlMask)
|
||||
mods |= GLFW_MOD_CTRL;
|
||||
mods |= GLFW_MOD_CONTROL;
|
||||
if (state & Mod1Mask)
|
||||
mods |= GLFW_MOD_ALT;
|
||||
|
||||
@ -532,7 +532,7 @@ static void processEvent(XEvent *event)
|
||||
|
||||
_glfwInputKey(window, key, GLFW_PRESS, mods);
|
||||
|
||||
if (!(mods & GLFW_MOD_CTRL) && !(mods & GLFW_MOD_ALT))
|
||||
if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT))
|
||||
_glfwInputChar(window, translateChar(&event->xkey));
|
||||
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user