Allowed characters regardless of modifier keys.

master
Camilla Berglund ago%!(EXTRA string=12 years)
parent 951f02acf3
commit 9c20737b60
  1. 1
      README.md
  2. 3
      src/cocoa_window.m
  3. 1
      src/win32_window.c
  4. 9
      src/x11_window.c

@ -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…
Cancel
Save