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

bzimport set Reference to bz33512.
bzimport created this task.Via LegacyJan 4 2012, 2:14 PM
Jdforrester-WMF added a comment.Via ConduitJun 22 2012, 8:59 PM

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

Jdforrester-WMF added a comment.Via ConduitJun 22 2012, 10:06 PM

Mass-moving items into VisualEditor product

Jdforrester-WMF added a comment.Via ConduitJun 23 2012, 1:38 AM

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

Jdforrester-WMF added a comment.Via ConduitJul 2 2012, 7:26 PM

Standardise title.

TrevorParscal added a comment.Via ConduitAug 22 2012, 8:54 PM

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.

Jdforrester-WMF added a comment.Via ConduitJun 12 2013, 4:58 PM

(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)?

Mattflaschen added a comment.Via ConduitJul 17 2013, 4:57 AM

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.

Jdforrester-WMF added a comment.Via ConduitAug 28 2013, 6:58 PM

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.

gerritbot added a comment.Via ConduitAug 29 2013, 12:37 AM

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

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

gerritbot added a comment.Via ConduitSep 4 2013, 12:26 AM

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

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

Mattflaschen removed a subscriber: Mattflaschen.Via WebDec 3 2014, 5:41 AM

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.