Bug 628585 - (Mac) Pressing ctrl key in Flash doesn't work as expected. r=josh

This commit is contained in:
Mehdi Mulani 2011-03-28 13:03:39 -07:00
Родитель 4482aca7bd
Коммит 978a31d379
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -4133,12 +4133,12 @@ static void ConvertCocoaKeyEventToNPCocoaEvent(NSEvent* cocoaEvent, NPCocoaEvent
printf("Asked to convert key event of unknown type to Cocoa plugin event!");
}
pluginEvent.data.key.modifierFlags = [cocoaEvent modifierFlags];
pluginEvent.data.key.keyCode = [cocoaEvent keyCode];
// don't try to access character data for flags changed events, it will raise an exception
if (nativeType != NSFlagsChanged) {
pluginEvent.data.key.characters = (NPNSString*)[cocoaEvent characters];
pluginEvent.data.key.charactersIgnoringModifiers = (NPNSString*)[cocoaEvent charactersIgnoringModifiers];
pluginEvent.data.key.isARepeat = [cocoaEvent isARepeat];
pluginEvent.data.key.keyCode = [cocoaEvent keyCode];
}
}