Fix for issue 951 - CPResponder flagsChanged does not fire when the key is up

This commit is contained in:
Blair Duncan authored and Ross Boucher committed 2010-10-20 18:54:50 -07:00
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();