You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2017. It is now read-only.
Let's add keyboard shortcuts for the various editor features for devices with a hardware keyboard, like the iPad Pro with a Smart Keyboard.
We can do this by implementing UIResponders' keyCommands method in the editor view controller and returning a list of UIKeyCommands. Any commands that have a discoverabilityTitle will show up in the iOS overlay that appears when you hold down a modifier key on an external keyboard:
At the very least, we could add shortcuts that correspond to each of the items in the editor toolbar:
Insert image (Cmd+Shift+I?)
Bold and Italic we get for free (Cmd+B, Cmd+I), but I think we could add explicit keyboard shortcuts so that they show in the overlay
Strikethrough (Cmd+Shift+S? Cmd+~?)
Quote (Cmd+>?)
Bullet list (OneNote uses Cmd+., iA Writer uses Cmd+L)
Ordered list (OneNote uses Cmd+/, iA Writer uses Cmd+Shift+L)
Insert link (Cmd+K seems to be a fairly standard shortcut for this – it's what TextEdit uses)
Toggle HTML mode (Cmd+<? Cmd+H?)
I can't find examples of pre-existing shortcuts for a number of these items in other apps (where I've used a ? above), so we'll just have to choose pick an appropriate shortcut in those cases.
Let's add keyboard shortcuts for the various editor features for devices with a hardware keyboard, like the iPad Pro with a Smart Keyboard.
We can do this by implementing UIResponders'
keyCommandsmethod in the editor view controller and returning a list ofUIKeyCommands. Any commands that have adiscoverabilityTitlewill show up in the iOS overlay that appears when you hold down a modifier key on an external keyboard:At the very least, we could add shortcuts that correspond to each of the items in the editor toolbar:
Cmd+Shift+I?)Cmd+B,Cmd+I), but I think we could add explicit keyboard shortcuts so that they show in the overlayCmd+Shift+S?Cmd+~?)Cmd+>?)Cmd+., iA Writer usesCmd+L)Cmd+/, iA Writer usesCmd+Shift+L)Cmd+<?Cmd+H?)I can't find examples of pre-existing shortcuts for a number of these items in other apps (where I've used a ? above), so we'll just have to choose pick an appropriate shortcut in those cases.