Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcuts #861

Open
koke opened this issue Apr 12, 2019 · 10 comments
Open

Keyboard shortcuts #861

koke opened this issue Apr 12, 2019 · 10 comments
Labels
Aztec Parity Feature exists in Aztec but not yet in Gutenberg mobile [Pri] Low [Status] Needs Research [Type] Enhancement Improves a current area of the editor Writing Flow

Comments

@koke
Copy link
Member

koke commented Apr 12, 2019

Gutenberg should support at least the basic keyboard shortcuts for rich text formatting.

@hypest
Copy link
Contributor

hypest commented Dec 2, 2019

I've verified that Aztec (Classic Editor) supports basic rich text editing shortcuts (Modifier-B for bold, Modifier-I for italic, etc) both on WPAndroid and WPiOS.

@hypest hypest added the Aztec Parity Feature exists in Aztec but not yet in Gutenberg mobile label Dec 11, 2019
@kmdupr33
Copy link

kmdupr33 commented Dec 19, 2019

Do we any sort of mockup that demonstrates this behavior? I'm having a bit of a tough time imagining how this would work on mobile. For example, what sorts of modifiers are we imagining we'd use here? (Obviously, we don't have CMD or CTRL or ALT.)

@mchowning
Copy link
Contributor

👋 @kmdupr33 !

I'm having a bit of a tough time imagining how this would work on mobile. For example, what sorts of modifiers are we imagining we'd use here? (Obviously, we don't have CMD or CTRL or ALT.)

I think this is addressing the use-case where someone has a bluetooth keyboard connected.

@hypest
Copy link
Contributor

hypest commented Dec 19, 2019

Obviously, we don't have CMD or CTRL or ALT.

Oh, sorry it wasn't clear before @kmdupr33 , we are referring to external keyboards here, Bluetooth or otherwise that the user can have connected and press the keyboard shortcuts on. A good example of such usecases would be tablets with keyboard cases.

@hypest
Copy link
Contributor

hypest commented Dec 19, 2019

While at it, let's scope down to specific shortcuts that would be nice to see implemented first and probably in that order of preference (thanks @iamthomasbishop for suggesting framing a first set of shortcuts):

  1. Modifier-B for making test bold in RichText based text blocks
  2. Modifier-I for making test italic in RichText based text blocks
  3. Modifier-Z to undo anywhere. Similar with a shortcut for redo.
  4. Modifier-K to insert or edit a link inside a RichText block

@iamthomasbishop
Copy link
Contributor

Modifier-Z to undo anywhere. Similar with a shortcut for redo.

The equivalent here would be Ctrl/Cmd + Shift + Z.

I was imagining the link one could be tricky, but really all it needs to do is trigger the link bottom sheet in the same way that tapping on the block toolbar button would. 😄

@kmdupr33
Copy link

Based on @hypest's comments in slack, I'm hearing that I should focus on Modifier-B, Modifier-I and if there's time, Modifier-K for android.

@hypest
Copy link
Contributor

hypest commented Dec 20, 2019

👋 @kmdupr33 , Bold, Italic and then undo/redo would be a good order to try and tackle. The insert/edit Link can come after if time allows. Thanks!

kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 7, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 7, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 7, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 10, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 10, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 11, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 11, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 11, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 12, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 12, 2020
kmdupr33 added a commit to kmdupr33/gutenberg-mobile that referenced this issue Jan 14, 2020
@SergioEstevao SergioEstevao added [Type] Enhancement Improves a current area of the editor [Pri] Low labels May 6, 2020
@SergioEstevao
Copy link
Contributor

At the moment iOS supports Cmd+B, Cmd+I and Cmd+U.

These are available because our Aztec component uses UITextView that supports this by default.

One of the issues is that the formatting is triggered on the native component so the format bar is not activated immediately after the keypresses only after writing.

@mdrockwell
Copy link

User requested this here:

What's sorely missing is keyboard support for text formatting. Simple things like being able to press Control-B to toggle BOLD and Control-I to toggle ITALICS. These things work as expected in the web-based block editor. So why not in the app? Sure, Androids don't have keyboards by default, but for those of us that still do a lot of writing, a Bluetooth keyboard is an essential accessory. And it would be awesome to be able to bold and underline and /italicise/ text on-the fly, instead of the time-consuming process of having to go back and seek out the words that need emphasis after the fact. Right now it seems like the only while-typing process would be to switch to HTML mode and use tags, but that's also way less convenient.

4852801-zd-woothemes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aztec Parity Feature exists in Aztec but not yet in Gutenberg mobile [Pri] Low [Status] Needs Research [Type] Enhancement Improves a current area of the editor Writing Flow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants