Skip to content
Snippets Groups Projects
Commit 2b666d95 authored by Gatis Paeglis's avatar Gatis Paeglis Committed by Gatis Paeglis
Browse files

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: default avatarRuslan Nigmatullin <euroelessar@yandex.ru>
Reviewed-by: default avatarShawn Rutledge <shawn.rutledge@digia.com>
parent cc143595
No related merge requests found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment