mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-14 02:33:50 +00:00
Fix for issue 951 - CPResponder flagsChanged does not fire when the key is up
This commit is contained in:
1 parent
696990f035
commit
c9a4821d15
1 file changed
+7
@@ -822,7 +822,14 @@ var supportsNativeDragAndDrop = [CPPlatform supportsDragAndDrop];
|
||||
_capsLockActive = NO;
|
||||
|
||||
if ([ModifierKeyCodes containsObject:keyCode])
|
||||
{
|
||||
// A modifier key will never fire keypress. We don't need to do any other processing so we just fire it here and break.
|
||||
event = [CPEvent keyEventWithType:CPFlagsChanged location:location modifierFlags:modifierFlags
|
||||
timestamp:timestamp windowNumber:windowNumber context:nil
|
||||
characters:nil charactersIgnoringModifiers:nil isARepeat:NO keyCode:_keyCode];
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
var characters = KeyCodesToUnicodeMap[charCode] || String.fromCharCode(charCode),
|
||||
charactersIgnoringModifiers = characters.toLowerCase();
|
||||
|
||||
Reference in new issue
Block a user