macOS: Simplify dead key handling
Change-Id: Ie2e2c6e1b1daf08146fd42f3ce58194ee1918794 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
parent
3dedb5292d
commit
f08c15c3de
@ -68,8 +68,8 @@
|
||||
// ALT+E to be used as a shortcut with an English keyboard even though
|
||||
// pressing ALT+E will give a dead key while doing normal text input.
|
||||
if ([characters length] != 0 || [charactersIgnoringModifiers length] != 0) {
|
||||
auto ctrlOrMetaModifier = qApp->testAttribute(Qt::AA_MacDontSwapCtrlAndMeta) ? Qt::ControlModifier : Qt::MetaModifier;
|
||||
if (((modifiers & ctrlOrMetaModifier) || (modifiers & Qt::AltModifier)) && ([charactersIgnoringModifiers length] != 0))
|
||||
if (nativeModifiers & (NSEventModifierFlagControl | NSEventModifierFlagOption)
|
||||
&& [charactersIgnoringModifiers length] != 0)
|
||||
ch = QChar([charactersIgnoringModifiers characterAtIndex:0]);
|
||||
else if ([characters length] != 0)
|
||||
ch = QChar([characters characterAtIndex:0]);
|
||||
|
Loading…
Reference in New Issue
Block a user