Skip to content
This repository was archived by the owner on Dec 13, 2017. It is now read-only.
This repository was archived by the owner on Dec 13, 2017. It is now read-only.

Add hardware keyboard shortcuts #806

@frosty

Description

@frosty

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:

screen shot 2016-04-14 at 16 32 35

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions