Translate Qt key events through the unicode text with xkbcommon
ClosedPublic

Authored by graesslin on Aug 17 2016, 3:07 PM.

Details

Summary

KKeyServer does an incorrect translation to keysyms: it always
translates to the uppercase variant.

This change makes the default go through xkbcommon and tries to get
the keysym from matching the unicode representation. E.g. an "a" is
then recognized as the lower case a, and an "A" as the uppercase one.

Only if the translation through text fails we pass back to KKeyServer
which does a reasonable translation for non-text symbols.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 5999.Aug 17 2016, 3:07 PM
graesslin retitled this revision from to Translate Qt key events through the unicode text with xkbcommon.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added a reviewer: Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptAug 17 2016, 3:07 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
bshah accepted this revision.Aug 17 2016, 3:10 PM
bshah added a reviewer: bshah.
bshah added a subscriber: bshah.

Looks good..

This revision is now accepted and ready to land.Aug 17 2016, 3:10 PM
This revision was automatically updated to reflect the committed changes.