diff options
author | Gatis Paeglis <gatis.paeglis@theqtcompany.com> | 2014-10-23 14:45:18 +0200 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@digia.com> | 2014-10-27 15:19:02 +0100 |
commit | 2b666d9576210aa98700e219dba6b1bd4f93d793 (patch) | |
tree | 07ed6da88b28d9e68818d422595a1650ab161b94 /src/widgets/styles | |
parent | cc1435952d796476616f54319c1ddf57eeaf80f7 (diff) |
Fix shortcut handling with non-latin layouts
Shortcut handling with non-latin keyboard layouts
were broken for checks like:
QKeyEvent key = ...;
key == QKeySequence::SelectAll
In Qt4 this was handled transparently when getting
keysym from XLookupString. When ctrl modifier was set,
XLookupString performed "keysym transformation" to obtain
a latin keysym. Still this did not solve the non-latin
shortcut issues for all cases due to some of Xlib
assumptions which could not be controled by user.
This patch implements XLookupString-like behavior
in lookupLatinKeysym(). It is not a 1-to-1 copy of how
XLookupString perfoms latin keysym lookup, but it
serves our needs just fine. lookupLatinKeysym() also
handles the cases that did not work in Qt4 with
XLookupString, thanks to libxkbcommon keymap query API.
And lookupLatinKeysym() replaces the fragile implementation
of "fallback latin key" code path in possibleKeys().
Done-with: Ruslan Nigmatullin
Task-number: QTBUG-33182
Task-number: QTBUG-32274
Change-Id: I56a5b624487ca6c2c3768220301a37dac39b439a
Reviewed-by: Ruslan Nigmatullin <euroelessar@yandex.ru>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'src/widgets/styles')
0 files changed, 0 insertions, 0 deletions