diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-02 15:24:37 +0200 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2020-07-03 11:14:11 +0200 |
commit | 7b2cc3fc7567cd4885cf1c9ecea97647efa6a6bf (patch) | |
tree | 099db22af008f33d37db0dc900c034e74cb3978a /examples/widgets/touch | |
parent | fdc5e91dcf6a2ee1b16a572a2266c77608e80ade (diff) |
macOS: Fix mapping of Qt to Carbon modifiers with AA_MacDontSwapCtrlAndMeta
The macOS platform plugin function toCarbonModifiers is based on a
mapping table with already swapped modifiers, where Qt::MetaModifier
maps to controlKey.
We were using the Carbon fooKeyBit constants instead of the fooKey
constants, so the logic for mapping from Qt to Carbon modifiers
when AA_MacDontSwapCtrlAndMeta was set to true would fail to reverse
the swap from the mapping table.
Since the command and control modifiers rarely produce different
unicode characters from the base keyboard layout, at least not in
the tested key layouts, and the AA_MacDontSwapCtrlAndMeta is not
commonly used, this bug was not that visible.
The logic maintains the behavior of mapping a single Qt modifier
to multiple Carbon modifiers (both left and right command e.g.).
This is a bit weird, but existing behavior that should be looked
at in a followup.
Change-Id: I8b30854770d1230a47f5144bf3245d0ac1493b51
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'examples/widgets/touch')
0 files changed, 0 insertions, 0 deletions