mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 13:32:01 +00:00
Allowed characters regardless of modifier keys.
This commit is contained in:
parent
951f02acf3
commit
9c20737b60
@ -204,6 +204,7 @@ See the [GLFW documentation](http://www.glfw.org/docs/latest/).
|
||||
|
||||
## Changelog
|
||||
|
||||
- Allowed character callback to be triggered regardless of modifier keys
|
||||
- Bugfix: The `-Wall` flag was not used with Clang and other GCC compatibles
|
||||
- Bugfix: The default for `GLFW_ALPHA_BITS` was set to zero
|
||||
- [Win32] Added `_GLFW_USE_DWM_SWAP_INTERVAL` for forcing the swap interval
|
||||
|
@ -566,9 +566,6 @@ static int translateKey(unsigned int key)
|
||||
const int mods = translateFlags([event modifierFlags]);
|
||||
_glfwInputKey(window, key, [event keyCode], GLFW_PRESS, mods);
|
||||
|
||||
if (mods & GLFW_MOD_SUPER)
|
||||
return;
|
||||
|
||||
NSString* characters = [event characters];
|
||||
NSUInteger i, length = [characters length];
|
||||
|
||||
|
@ -480,6 +480,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
||||
}
|
||||
|
||||
case WM_CHAR:
|
||||
case WM_SYSCHAR:
|
||||
{
|
||||
_glfwInputChar(window, (unsigned int) wParam);
|
||||
return 0;
|
||||
|
@ -513,15 +513,12 @@ static void processEvent(XEvent *event)
|
||||
{
|
||||
const int key = translateKey(event->xkey.keycode);
|
||||
const int mods = translateState(event->xkey.state);
|
||||
const int character = translateChar(&event->xkey);
|
||||
|
||||
_glfwInputKey(window, key, event->xkey.keycode, GLFW_PRESS, mods);
|
||||
|
||||
if (!(mods & GLFW_MOD_CONTROL) && !(mods & GLFW_MOD_ALT))
|
||||
{
|
||||
const int character = translateChar(&event->xkey);
|
||||
if (character != -1)
|
||||
_glfwInputChar(window, character);
|
||||
}
|
||||
if (character != -1)
|
||||
_glfwInputChar(window, character);
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user