diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2016-01-11 15:13:07 +0100 |
---|---|---|
committer | Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> | 2016-01-11 15:44:23 +0000 |
commit | b0d02b3cfd39f6a8815cc07848ca865257cd2c9f (patch) | |
tree | ab069025539259e6543c5ff9ea437e6ebf610974 | |
parent | f51de354b14d5a25d7e32debe0d56b9fbed67a4f (diff) | |
download | qtwayland-b0d02b3cfd39f6a8815cc07848ca865257cd2c9f.tar.gz |
Fix the control key
Let Ctrl+A cause a key event with text Ctrl+A (0x01), like we do on
the other platforms. Previously we would use 'A', which would confuse
some applications.
Task-number: QTBUG-50398
Change-Id: Ie3def4bd9c96e538b2572b88fae029d347e08814
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
-rw-r--r-- | src/client/qwaylandinputdevice.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp index 9ac678c9..567620ba 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -645,6 +645,13 @@ void QWaylandInputDevice::Keyboard::keyboard_key(uint32_t serial, uint32_t time, qtkey = QWaylandXkb::keysymToQtKey(sym, modifiers, text); + + // Map control + letter to proper text + if (utf32 >= 'A' && utf32 <= '~' && (modifiers & Qt::ControlModifier)) { + utf32 &= ~0x60; + text = QString::fromUcs4(&utf32, 1); + } + QWindowSystemInterface::handleExtendedKeyEvent(window->window(), time, type, qtkey, modifiers, |