Added hardware keyboard shortcuts for iPad#820
Conversation
|
@frosty Do you mind adding these shortcuts to the legacy editor also? |
| [UIKeyCommand keyCommandWithInput:@"I" | ||
| modifierFlags:UIKeyModifierCommand|UIKeyModifierShift | ||
| action:@selector(didTouchMediaOptions) | ||
| discoverabilityTitle:NSLocalizedString(@"Insert Image", @"Discoverability title for insert image keyboard shortcut.")], |
There was a problem hiding this comment.
This shortcut should be renamed to be "Insert Media" and maybe change the shortcut to Cmd + M
|
@SergioEstevao I've managed to add support to the legacy editor. I had to add a |
|
@frosty I tested it a bit more on the device and found the following issues:
|
|
Thanks for the comments, @SergioEstevao – sorry for the delay in replying!
This is working for me – can you confirm that it's definitely not for you? I can record a GIF / video if necessary.
I've taken a look at this and it seems to be the same issue as with the legacy editor: HTML uses a |
This reverts commit 7b0be2f.
|
@SergioEstevao I've been looking into highlighting the toolbar buttons, and the problem only affects the Bold and Italic buttons. It's the same iOS 9 bug, where our custom methods for these shortcuts aren't called. The issue is that we seem to have no way of knowing then the user's pressed the keyboard shortcut. I've even hooked up the editor to Safari's inspector, and no javascript events get fired when you press Cmd+B/ Cmd+I. It's up to you whether you want to proceed without these two buttons getting highlighted as soon as you press the shortcut? They do highlight once you start pressing other keys, and as you noted the B / I icons on the top of the keyboard get highlighted too. I think the benefit of having the shortcuts in the first place outweighs these few issues. |
|
Ok, let's proceed with this anyway I think it will be good for our users with keyboards, even if they are few of them. |
|
Thanks @SergioEstevao! |
Fixes #806. I've added keyboard shortcuts for iPads using hardware keyboards.
I've used shortcut keys they either: match system defaults (bold / underline), match other third party apps (bullet and ordered list shortcuts match iA Writer), or I've tried to pick something that makes sense where I couldn't find any precedent. Here's the initial selection that I've added:
To test: Try to use each of the shortcuts listed above (you can hold down Command in the app to view the shortcuts). Test with text selected and without.
Also, please let me know if you think any of the shortcut keys should be changed to something else!
Needs Review: @SergioEstevao
Thanks!