Commit 49815919 authored by Amy Qualls's avatar Amy Qualls Committed by Craig Norris

Clean up the shortcuts page

Split apart the MacOS and Windows shortcuts. Standardize the
capitalization. Tidy column lengths to make tables easier to read.
Split out "disable keyboard shortcuts" into a CTRT-style subheading.
parent 98b7340c
...@@ -17,10 +17,6 @@ following methods: ...@@ -17,10 +17,6 @@ following methods:
- Press <kbd>?</kbd>. - Press <kbd>?</kbd>.
- In the Help menu in the top right of the application, select **Keyboard shortcuts**. - In the Help menu in the top right of the application, select **Keyboard shortcuts**.
In [GitLab 12.8 and later](https://gitlab.com/gitlab-org/gitlab/-/issues/22113),
you can disable keyboard shortcuts by using the **Keyboard shortcuts** toggle
at the top of the keyboard shortcut window.
Although [global shortcuts](#global-shortcuts) work from any area of GitLab, Although [global shortcuts](#global-shortcuts) work from any area of GitLab,
you must be in specific pages for the other shortcuts to be available, as you must be in specific pages for the other shortcuts to be available, as
explained in each section. explained in each section.
...@@ -49,13 +45,13 @@ Additionally, the following shortcuts are available when editing text in text ...@@ -49,13 +45,13 @@ Additionally, the following shortcuts are available when editing text in text
fields (for example, comments, replies, issue descriptions, and merge request fields (for example, comments, replies, issue descriptions, and merge request
descriptions): descriptions):
| Keyboard shortcut | Description | | macOS shortcut | Windows shortcut | Description |
|---------------------------------------------------------------------------|-------------| |----------------|------------------|-------------|
| <kbd></kbd> | Edit your last comment. You must be in a blank text field below a thread, and you must already have at least one comment in the thread. | | <kbd></kbd> | <kbd></kbd> | Edit your last comment. You must be in a blank text field below a thread, and you must already have at least one comment in the thread. |
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>p</kbd> | Toggle Markdown preview when editing text in a text field that has **Write** and **Preview** tabs at the top. | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>p</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>p</kbd> | Toggle Markdown preview when editing text in a text field that has **Write** and **Preview** tabs at the top. |
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>b</kbd> | Bold the selected text (surround it with `**`). | | <kbd>Command</kbd> + <kbd>b</kbd> | <kbd>Control</kbd> + <kbd>b</kbd> | Bold the selected text (surround it with `**`). |
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>i</kbd> | Italicize the selected text (surround it with `_`). | | <kbd>Command</kbd> + <kbd>i</kbd> | <kbd>Control</kbd> + <kbd>i</kbd> | Italicize the selected text (surround it with `_`). |
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>k</kbd> | Add a link (surround the selected text with `[]()`). | | <kbd>Command</kbd> + <kbd>k</kbd> | <kbd>Control</kbd> + <kbd>k</kbd> | Add a link (surround the selected text with `[]()`). |
The shortcuts for editing in text fields are always enabled, even if other The shortcuts for editing in text fields are always enabled, even if other
keyboard shortcuts are disabled. keyboard shortcuts are disabled.
...@@ -113,7 +109,7 @@ These shortcuts are available when browsing the files in a project (go to ...@@ -113,7 +109,7 @@ These shortcuts are available when browsing the files in a project (go to
|-------------------|-------------| |-------------------|-------------|
| <kbd></kbd> | Move selection up. | | <kbd></kbd> | Move selection up. |
| <kbd></kbd> | Move selection down. | | <kbd></kbd> | Move selection down. |
| <kbd>enter</kbd> | Open selection. | | <kbd>Enter</kbd> | Open selection. |
| <kbd>Escape</kbd> | Go back to file list screen (only while searching for files, **Repository > Files**, then select **Find File**). | | <kbd>Escape</kbd> | Go back to file list screen (only while searching for files, **Repository > Files**, then select **Find File**). |
| <kbd>y</kbd> | Go to file permalink (only while viewing a file). | | <kbd>y</kbd> | Go to file permalink (only while viewing a file). |
| <kbd>.</kbd> | Open the [Web IDE](project/web_ide/index.md). | | <kbd>.</kbd> | Open the [Web IDE](project/web_ide/index.md). |
...@@ -122,15 +118,15 @@ These shortcuts are available when browsing the files in a project (go to ...@@ -122,15 +118,15 @@ These shortcuts are available when browsing the files in a project (go to
These shortcuts are available when editing a file with the [Web IDE](project/web_ide/index.md): These shortcuts are available when editing a file with the [Web IDE](project/web_ide/index.md):
| Keyboard shortcut | Description | | macOS shortcut | Windows shortcut | Description |
|------------------------------------------------------------|-------------| |---------------------------------|---------------------|-------------|
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>p</kbd> | Search for, and then open another file for editing. | | <kbd>Command</kbd> + <kbd>p</kbd> | <kbd>Control</kbd> + <kbd>p</kbd> | Search for, and then open another file for editing. |
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>Enter</kbd> | Commit (when editing the commit message). | | <kbd>Command</kbd> + <kbd>Enter</kbd> | <kbd>Control</kbd> + <kbd>Enter</kbd> | Commit (when editing the commit message). |
### Repository graph ### Repository graph
These shortcuts are available when viewing the project [repository graph](project/repository/index.md#repository-history-graph) These shortcuts are available when viewing the project [repository graph](project/repository/index.md#repository-history-graph)
page (navigate to **Repository > Graph**): page (go to **Repository > Graph**):
| Keyboard shortcut | Description | | Keyboard shortcut | Description |
|--------------------------------------------------------------------|-------------| |--------------------------------------------------------------------|-------------|
...@@ -151,63 +147,64 @@ This shortcut is available when viewing a [wiki page](project/wiki/index.md): ...@@ -151,63 +147,64 @@ This shortcut is available when viewing a [wiki page](project/wiki/index.md):
### Content editor ### Content editor
These shortcuts are available when editing a file with the [Content Editor](https://about.gitlab.com/direction/create/editor/content_editor/): These shortcuts are available when editing a file with the
[Content Editor](https://about.gitlab.com/direction/create/editor/content_editor/):
| Keyboard shortcut | Description | | macOS shortcut | Windows shortcut | Description |
|-------------------|-------------| |----------------|------------------|-------------|
| <kbd></kbd> + <kbd>C</kbd> (Mac) / <kbd>Control</kbd> + <kbd>C</kbd> | Copy | | <kbd>Command</kbd> + <kbd>C</kbd> | <kbd>Control</kbd> + <kbd>C</kbd> | Copy |
| <kbd></kbd> + <kbd>X</kbd> (Mac) / <kbd>Control</kbd> + <kbd>X</kbd> | Cut | | <kbd>Command</kbd> + <kbd>X</kbd> | <kbd>Control</kbd> + <kbd>X</kbd> | Cut |
| <kbd></kbd> + <kbd>V</kbd> (Mac) / <kbd>Control</kbd> + <kbd>V</kbd> | Paste | | <kbd>Command</kbd> + <kbd>V</kbd> | <kbd>Control</kbd> + <kbd>V</kbd> | Paste |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> (Mac) / <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | Paste without formatting | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | Paste without formatting |
| <kbd></kbd> + <kbd>Z</kbd> (Mac) / <kbd>Control</kbd> + <kbd>Z</kbd> | Undo | | <kbd>Command</kbd> + <kbd>Z</kbd> | <kbd>Control</kbd> + <kbd>Z</kbd> | Undo |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> (Mac) / <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | Redo | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>V</kbd> | Redo |
| <kbd>Shift</kbd> + <kbd>Enter</kbd> | Add a line break | | <kbd>Shift</kbd> + <kbd>Enter</kbd> | <kbd>Shift</kbd> + <kbd>Enter</kbd> | Add a line break |
#### Formatting #### Formatting
| Mac | Windows/Linux | Description | | macOS shortcut | Windows/Linux shortcut | Description |
|-----|---------------|-------------| |----------------|------------------------|-------------|
| <kbd></kbd> + <kbd>b</kbd> | <kbd>Control</kbd> + <kbd>b</kbd> | Bold | | <kbd>Command</kbd> + <kbd>b</kbd> | <kbd>Control</kbd> + <kbd>b</kbd> | Bold |
| <kbd></kbd> + <kbd>i</kbd> | <kbd>Control</kbd> + <kbd>i</kbd> | Italic | | <kbd>Command</kbd> + <kbd>i</kbd> | <kbd>Control</kbd> + <kbd>i</kbd> | Italic |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>s</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>s</kbd> | Strikethrough | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>s</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>s</kbd> | Strikethrough |
| <kbd></kbd> + <kbd>e</kbd> | <kbd>Control</kbd> + <kbd>e</kbd> | Code | | <kbd>Command</kbd> + <kbd>e</kbd> | <kbd>Control</kbd> + <kbd>e</kbd> | Code |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> | Apply normal text style | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>0</kbd> | Apply normal text style |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> | Apply heading style 1 | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>1</kbd> | Apply heading style 1 |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> | Apply heading style 2 | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>2</kbd> | Apply heading style 2 |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> | Apply heading style 3 | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>3</kbd> | Apply heading style 3 |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> | Apply heading style 4 | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>4</kbd> | Apply heading style 4 |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>5</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>5</kbd> | Apply heading style 5 | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>5</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>5</kbd> | Apply heading style 5 |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>6</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>6</kbd> | Apply heading style 6 | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>6</kbd> | <kbd>Control</kbd> + <kbd>Alt</kbd> + <kbd>6</kbd> | Apply heading style 6 |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | Ordered list | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | Ordered list |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | Bullet list | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>8</kbd> | Bullet list |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>9</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>7</kbd> | Task list | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>9</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>9</kbd> | Task list |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd>b</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>b</kbd> | Blockquote | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd>b</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>b</kbd> | Blockquote |
| <kbd></kbd> + <kbd>Alt</kbd> + <kbd>c</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>c</kbd> | Code block | | <kbd>Command</kbd> + <kbd>Alt</kbd> + <kbd>c</kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd>c</kbd> | Code block |
| <kbd></kbd> + <kbd>,</kbd> | <kbd>Control</kbd> + <kbd>,</kbd> | Subscript | | <kbd>Command</kbd> + <kbd>,</kbd> | <kbd>Control</kbd> + <kbd>,</kbd> | Subscript |
| <kbd></kbd> + <kbd>.</kbd> | <kbd>Control</kbd> + <kbd>,</kbd> | Superscript | | <kbd>Command</kbd> + <kbd>.</kbd> | <kbd>Control</kbd> + <kbd>.</kbd> | Superscript |
| <kbd>Tab</kbd> | | Indent list | | <kbd>Tab</kbd> | <kbd>Tab</kbd> | Indent list |
| <kbd>Shift</kbd> + <kbd>Tab</kbd> | | Outdent list | | <kbd>Shift</kbd> + <kbd>Tab</kbd> | <kbd>Shift</kbd> + <kbd>Tab</kbd> | Outdent list |
#### Text selection #### Text selection
| Keyboard shortcut | Description | | macOS shortcut | Windows shortcut | Description |
|-------------------|-------------| |----------------|------------------|-------------|
| <kbd></kbd> + <kbd>a</kbd> (Mac) / <kbd>Control</kbd> + <kbd>a</kbd> | Select all | | <kbd>Command</kbd> + <kbd>a</kbd> | <kbd>Control</kbd> + <kbd>a</kbd> | Select all |
| <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one character to left | | <kbd>Shift</kbd> + <kbd></kbd> | <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one character to left |
| <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one character to right | | <kbd>Shift</kbd> + <kbd></kbd> | <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one character to right |
| <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one line up | | <kbd>Shift</kbd> + <kbd></kbd> | <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one line up |
| <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one line down | | <kbd>Shift</kbd> + <kbd></kbd> | <kbd>Shift</kbd> + <kbd></kbd> | Extend selection one line down |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd></kbd> | Extend selection to the beginning of the document | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd></kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd></kbd> | Extend selection to the beginning of the document |
| <kbd></kbd> + <kbd>Shift</kbd> + <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd></kbd> | Extend selection to the end of the document | | <kbd>Command</kbd> + <kbd>Shift</kbd> + <kbd></kbd> | <kbd>Control</kbd> + <kbd>Shift</kbd> + <kbd></kbd> | Extend selection to the end of the document |
### Filtered search ### Filtered search
These shortcuts are available when using a [filtered search input](search/index.md): These shortcuts are available when using a [filtered search input](search/index.md):
| Keyboard shortcut | Description | | macOS shortcut | Windows shortcut | Description |
|--------------------------------------------------------|-------------| |----------------------|----------------------------------------|-------------|
| <kbd></kbd> (Mac) + <kbd></kbd> | Clear entire search filter. | | <kbd>Command</kbd> | <kbd>Delete</kbd> | Clear entire search filter. |
| <kbd></kbd> (Mac) / <kbd>Control</kbd> + <kbd></kbd> | Clear one token at a time. | | <kbd>Option</kbd> | <kbd>Control</kbd> + <kbd>Delete</kbd> | Clear one token at a time. |
## Epics **(PREMIUM)** ## Epics **(PREMIUM)**
...@@ -218,3 +215,13 @@ These shortcuts are available when viewing [epics](group/epics/index.md): ...@@ -218,3 +215,13 @@ These shortcuts are available when viewing [epics](group/epics/index.md):
| <kbd>r</kbd> | Start writing a comment. Pre-selected text is quoted in the comment. Can't be used to reply in a thread. | | <kbd>r</kbd> | Start writing a comment. Pre-selected text is quoted in the comment. Can't be used to reply in a thread. |
| <kbd>e</kbd> | Edit description. | | <kbd>e</kbd> | Edit description. |
| <kbd>l</kbd> | Change label. | | <kbd>l</kbd> | Change label. |
## Disable keyboard shortcuts
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22113) in GitLab 12.8.
To disable keyboard shortcuts:
1. While viewing a page that supports keyboard shortcuts, and outside a text box,
press <kbd>?</kbd> to display the list of shortcuts.
1. Select **Toggle shortcuts**.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment