From Martin Aumueller, "
a collegue of mine noticed that on Windows and X11 the modifier state (such as Alt or Ctrl) would be applied one key press too late: e.g. press & hold Alt, press a, release Alt, press a, press a would generate the key sequence a, Alt-a, a instead of Alt-a, a, a. The problem is also present on Carbon. Moving the call to setModKeyMask in front of the call to keyPress fixed it for me on Carbon and X11. I suppose that this will fix the problem for Windows as well."
This commit is contained in:
@@ -1974,8 +1974,8 @@ LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT uMsg, W
|
||||
int keySymbol = 0;
|
||||
unsigned int modifierMask = 0;
|
||||
adaptKey(wParam, lParam, keySymbol, modifierMask);
|
||||
getEventQueue()->keyPress(keySymbol, eventTime);
|
||||
getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask);
|
||||
getEventQueue()->keyPress(keySymbol, eventTime);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1988,8 +1988,8 @@ LRESULT GraphicsWindowWin32::handleNativeWindowingEvent( HWND hwnd, UINT uMsg, W
|
||||
int keySymbol = 0;
|
||||
unsigned int modifierMask = 0;
|
||||
adaptKey(wParam, lParam, keySymbol, modifierMask);
|
||||
getEventQueue()->keyRelease(keySymbol, eventTime);
|
||||
getEventQueue()->getCurrentEventState()->setModKeyMask(modifierMask);
|
||||
getEventQueue()->keyRelease(keySymbol, eventTime);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user