summaryrefslogtreecommitdiffstats
path: root/webkit/glue/event_conversion.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/glue/event_conversion.cc')
-rw-r--r--webkit/glue/event_conversion.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc
index 5de8271..881cdae 100644
--- a/webkit/glue/event_conversion.cc
+++ b/webkit/glue/event_conversion.cc
@@ -283,10 +283,8 @@ MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e)
m_text = "\x9";
m_unmodifiedText = "\x9";
}
-#elif defined(OS_WIN)
+#elif defined(OS_WIN) || defined(OS_LINUX)
m_text = m_unmodifiedText = ToSingleCharacterString(e.key_code);
-#elif defined(OS_LINUX)
- m_text = m_unmodifiedText = ToSingleCharacterString(e.text);
#endif
}
#if defined(OS_WIN) || defined(OS_LINUX)
@@ -307,10 +305,13 @@ MakePlatformKeyboardEvent::MakePlatformKeyboardEvent(const WebKeyboardEvent& e)
m_metaKey = (e.modifiers & WebInputEvent::META_KEY) != 0;
#if defined(OS_WIN)
m_isSystemKey = e.system_key;
+// TODO(port): set this field properly for linux and mac.
+#elif defined(OS_LINUX)
+ m_isSystemKey = m_altKey;
#else
- m_isSystemKey = false; // TODO(port): make this proper.
+ m_isSystemKey = false;
#endif
-}
+}
void MakePlatformKeyboardEvent::SetKeyType(Type type) {
// According to the behavior of Webkit in Windows platform,