summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm6
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index b00032e..e20b915 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -656,6 +656,12 @@ static bool NPCocoaEventFromWebKeyboardEvent(const WebKeyboardEvent& event,
NPCocoaEvent *np_cocoa_event) {
np_cocoa_event->data.key.keyCode = event.nativeKeyCode;
+ np_cocoa_event->data.key.characters = reinterpret_cast<NPNSString*>(
+ [NSString stringWithFormat:@"%S", event.text]);
+ np_cocoa_event->data.key.charactersIgnoringModifiers =
+ reinterpret_cast<NPNSString*>(
+ [NSString stringWithFormat:@"%S", event.unmodifiedText]);
+
if (event.modifiers & WebInputEvent::ControlKey)
np_cocoa_event->data.key.modifierFlags |= controlKey;
if (event.modifiers & WebInputEvent::ShiftKey)