diff options
author | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-08-18 15:21:30 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com> | 2015-09-01 08:49:22 +0000 |
commit | dbb24ce477702768534d64b260e269d2abc13e41 (patch) | |
tree | 3abe4af94d567500568cb28f3cd88dd9e1afd83c /src/plugins/platforms | |
parent | 82538aebe4b22978a6f7735924f5451304c3e2a8 (diff) |
iOS: listen for standard text edit shortcuts
Catch the missing shortcuts sent by UIKit, and forward
them to Qt as key events so that the app can respond to them.
Change-Id: If63c4b05466e64843982fce32fbd594d2a0ef312
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/ios/qiostextresponder.mm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiostextresponder.mm b/src/plugins/platforms/ios/qiostextresponder.mm index d16ad40414..fdcc703267 100644 --- a/src/plugins/platforms/ios/qiostextresponder.mm +++ b/src/plugins/platforms/ios/qiostextresponder.mm @@ -360,6 +360,24 @@ [self sendKeyPressRelease:Qt::Key_Delete modifiers:Qt::ControlModifier]; } +- (void)toggleBoldface:(id)sender +{ + Q_UNUSED(sender); + [self sendKeyPressRelease:Qt::Key_B modifiers:Qt::ControlModifier]; +} + +- (void)toggleItalics:(id)sender +{ + Q_UNUSED(sender); + [self sendKeyPressRelease:Qt::Key_I modifiers:Qt::ControlModifier]; +} + +- (void)toggleUnderline:(id)sender +{ + Q_UNUSED(sender); + [self sendKeyPressRelease:Qt::Key_U modifiers:Qt::ControlModifier]; +} + // ------------------------------------------------------------------------- - (void)keyCommandTriggered:(UIKeyCommand *)keyCommand |