VisualEditor: Add keyboard shortcut for heading level
Closed, ResolvedPublic

Description

Author: utsavsabharwal

Description:
It would be great if could add following shortcuts:

ctrl + { <-- For decreasing font size upto Heading 6
ctrl + } <-- For increasing font size upto Heading 1

Lemme know if I can help you out :)


Version: unspecified
Severity: enhancement

Details

Reference
bz33512
bzimport created this task.Jan 4 2012, 2:14 PM

Not sure if we want key bindings for toggling formatting type? Also, not sure if we want to use these particular ones. :-)

Mass-moving items into VisualEditor product

Mass-move out of "General" to "ContentEditable".

Standardise title.

This is typically done with ctrl+alt+# in Microsoft Word on Windows, where # is a number between 1 and 3.

I'm not sure if this is the right way to go, but at least there's some precedence.

(In reply to comment #5)

This is typically done with ctrl+alt+# in Microsoft Word on Windows, where #
is a number between 1 and 3.

I'm not sure if this is the right way to go, but at least there's some
precedence.

Microsoft Word:

  • Ctrl + Shift + N -> Paragraph (⌘ + Shift + N on Mac)
  • Ctrl + Alt + 1 -> H1 (⌘ + Alt + 1 on Mac)
  • Ctrl + Alt + 2 -> H2 (⌘ + Alt + 2 on Mac)
  • Ctrl + Alt + 3 -> H3 (⌘ + Alt + 3 on Mac)
  • Ctrl + Alt + 4 -> € (hello, Europe!)

Confluence:

  • Ctrl + 0 -> Paragraph (⌘ + 0 on Mac)
  • Ctrl + 1 -> H1 (⌘ + 1 on Mac)
  • Ctrl + 2 -> H2 (⌘ + 2 on Mac)
  • Ctrl + 3 -> H3 (⌘ + 3 on Mac)
  • Ctrl + 4 -> H4 (⌘ + 4 on Mac)
  • Ctrl + 5 -> H5 (⌘ + 5 on Mac)
  • Ctrl + 6 -> H6 (⌘ + 6 on Mac)
  • Ctrl + 7 -> Preformatted (⌘ + 7 on Mac)

Should we adopt the Word ones (which are more common but less relevant) or the Confluence ones (which are a perfect fit for our needs, but less commonly-known)?

Confluence seems preferable, mainly because it has one less key. I'm not sure how many people are familiar with either, and people who know the Word shortcuts will have to disregard Ctrl + Alt + 4 either way.

Unfortunately the ⌘ + 1 -> ⌘ + 8 are taken by the browser in Chrome for "switch to tab 1…8", and ⌘ + 9 is for "switch to final tab".

I'm going to go our own way (whee) with:

  • ⌘ + Alt + 0 -> Paragraph
  • ⌘ + Alt + 1 -> Heading 1 (Page title)
  • ⌘ + Alt + 2 -> Heading 2 (Heading)
  • ⌘ + Alt + 3 -> Heading 3 (Sub-heading 1)
  • ⌘ + Alt + 4 -> Heading 4 (Sub-heading 2)
  • ⌘ + Alt + 5 -> Heading 5 (Sub-heading 3)
  • ⌘ + Alt + 6 -> Heading 6 (Sub-heading 4)
  • ⌘ + Alt + 7 -> Preformatted

And potentially:

  • ⌘ + Alt + 8 -> Blockquote (when that is working)

This isn't great, but it's the least-bad option that I can see.

Change 81605 had a related patch set uploaded by Jforrester:
[WIP] Add keyboard shortcuts for formatting tools

https://gerrit.wikimedia.org/r/81605

Change 81605 merged by jenkins-bot:
Add keyboard shortcuts for formatting tools

https://gerrit.wikimedia.org/r/81605

Add Comment