summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp')
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
index 88cca5a90a..955da9bd59 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/PlatformKeyboardEventQt.cpp
@@ -511,6 +511,15 @@ void PlatformKeyboardEvent::disambiguateKeyDownEvent(Type type, bool)
m_text = String();
m_unmodifiedText = String();
} else {
+ /*
+ When we receive shortcut events like Ctrl+V then the text in the QKeyEvent is
+ empty. If we're asked to disambiguate the event into a Char keyboard event,
+ we try to detect this situation and still set the text, to ensure that the
+ general event handling sends a key press event after this disambiguation.
+ */
+ if (m_text.isEmpty() && m_windowsVirtualKeyCode && m_qtEvent->key() < Qt::Key_Escape)
+ m_text.append(UChar(m_windowsVirtualKeyCode));
+
m_keyIdentifier = String();
m_windowsVirtualKeyCode = 0;
}