---
title: Keyboard shortcuts
intro: 'Nearly every page on {% data variables.product.prodname_dotcom %} has a keyboard shortcut to perform actions faster.'
redirect_from:
- /articles/using-keyboard-shortcuts
- /categories/75/articles
- /categories/keyboard-shortcuts
- /articles/keyboard-shortcuts
- /github/getting-started-with-github/keyboard-shortcuts
- /github/getting-started-with-github/using-github/keyboard-shortcuts
- /get-started/using-github/keyboard-shortcuts
versions:
fpt: '*'
ghes: '*'
ghec: '*'
---
## About keyboard shortcuts
Typing ? on {% data variables.product.prodname_dotcom %} brings up a dialog box that lists the keyboard shortcuts available for that page. You can use these keyboard shortcuts to perform actions across the site without using your mouse to navigate.
You can disable character key shortcuts, while still allowing shortcuts that use modifier keys, in your accessibility settings. For more information, see [AUTOTITLE](/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-user-account-settings/managing-accessibility-settings).
{% ifversion command-palette %}
The {% data variables.product.prodname_command_palette %} also gives you quick access to a wide range of actions, without the need to remember keyboard shortcuts. For more information, see [AUTOTITLE](/get-started/accessibility/github-command-palette).
{% endif %}
The following sections list some of the available keyboard shortcuts, organized by the pages where you can use them on {% data variables.product.prodname_dotcom %}.
## Site wide shortcuts
| Keyboard shortcut | Description |
|-----------|------------|
|S or / | Focus the search bar. For more information, see [AUTOTITLE](/search-github/getting-started-with-searching-on-github/about-searching-on-github).
|G N | Go to your notifications. For more information, see [AUTOTITLE](/account-and-profile/managing-subscriptions-and-notifications-on-github/setting-up-notifications/about-notifications).
|Option+↑ (Mac) or Alt+↑ (Windows/Linux) | Move focus from an element to its hovercard |
|Esc | When focused on a user, issue, or pull request hovercard, closes the hovercard and refocuses on the element the hovercard is in
## Repositories
| Keyboard shortcut | Description |
|-----------|------------ |
|G C | Go to the **Code** tab
|G I | Go to the **Issues** tab. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/about-issues).
|G P | Go to the **Pull requests** tab. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
|G A | Go to the **Actions** tab. For more information, see [AUTOTITLE](/actions/learn-github-actions).
| {% ifversion projects-v1 %} |
|G B | Go to the **Projects** tab. For more information, see [AUTOTITLE](/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards).
| {% endif %} |
|G W | Go to the **Wiki** tab. For more information, see [AUTOTITLE](/communities/documenting-your-project-with-wikis/about-wikis). |
|G G | Go to the **Discussions** tab. For more information, see [AUTOTITLE](/discussions/collaborating-with-your-community-using-discussions/about-discussions).
## Source code editing
| Keyboard shortcut | Description |
|-----------|------------|
| {% ifversion fpt or ghec %} |
|. | Opens a repository or pull request in the {% data variables.codespaces.serverless %} editor, in the same browser tab. You must be signed in to use the editor. For more information, see [AUTOTITLE](/codespaces/the-githubdev-web-based-editor).
|> | Opens a repository or pull request in the {% data variables.codespaces.serverless %} editor, in a new browser tab. You must be signed in to use the editor. For more information, see [AUTOTITLE](/codespaces/the-githubdev-web-based-editor). |
| {% endif %} |
|Command+B (Mac) or Ctrl+B (Windows/Linux) | Inserts Markdown formatting for bolding text |
|Command+I (Mac) or Ctrl+I (Windows/Linux) | Inserts Markdown formatting for italicizing text |
|Command+K (Mac) or Ctrl+K (Windows/Linux) | Inserts Markdown formatting for creating a link |
|Command+Shift+7 (Mac) or Ctrl+Shift+7 (Windows/Linux) | Inserts Markdown formatting for an ordered list |
|Command+Shift+8 (Mac) or Ctrl+Shift+8 (Windows/Linux) | Inserts Markdown formatting for an unordered list |
|Command+Shift+. (Mac) or Ctrl+Shift+. (Windows/Linux) | Inserts Markdown formatting for a quote |
|E | Open source code file in the **Edit file** tab |
|Command+F (Mac) or Ctrl+F (Windows/Linux) | Start searching in file editor |
|Command+G (Mac) or Ctrl+G (Windows/Linux) | Find next |
|Command+Shift+G (Mac) or Ctrl+Shift+G (Windows/Linux) | Find previous |
|Command+Option+F (Mac) or Ctrl+Shift+F (Windows/Linux) | Replace |
|Command+Shift+Option+F (Mac) or Ctrl+Shift+R (Windows/Linux) | Replace all |
|Alt+G | Jump to line |
|Command+Z (Mac) or Ctrl+Z (Windows/Linux) | Undo |
|Command+Y (Mac) or Ctrl+Y (Windows/Linux) | Redo |
|Command+Shift+P | Toggles between the **Edit file** and **Preview changes** tabs |
|Command+S (Mac) or Ctrl+S (Windows/Linux) | Write a commit message |
For more keyboard shortcuts, see the [CodeMirror documentation](https://codemirror.net/doc/manual.html#commands).
## Source code browsing
| Keyboard shortcut | Description |
|-----------|------------|
|t | Activates the file finder |
|l | Jump to a line in your code |
|w | Switch to a new branch or tag |
|y | Expand a URL to its canonical form. For more information, see [AUTOTITLE](/repositories/working-with-files/using-files/getting-permanent-links-to-files). |
|i | Show or hide comments on diffs. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request). |
|a | Show or hide annotations on diffs |
|b | Open blame view. For more information, see [AUTOTITLE](/repositories/working-with-files/using-files/viewing-a-file). |
## Navigating within code files
If you view a code file in a repository using the **Code** view and click on any line in the file, you will see a cursor. You can then navigate within the content of the file, also known as a blob (binary large object), using keyboard shortcuts.
| Keyboard shortcut | Description |
|-----------|------------|
|Shift+J| Highlights the line that is currently selected by the cursor within the code file
|Shift+Option+C (Mac) or Shift+Alt+C (Windows/Linux) | If a line of code is currently selected, this shortcut opens the line menu for that line, appearing under {% octicon "kebab-horizontal" aria-label="The horizontal kebab icon" %} to the left of the line
| {% ifversion code-search-upgrade %} |
|Command+Enter (Mac) or Control+Enter (Windows/Linux) | Highlights the code symbol currently selected by the cursor and all other occurrences of the symbol in the code, and shows the symbol in the symbols pane
| {% endif %} |
## Comments
| Keyboard shortcut | Description |
|-----------|------------|
|Command+B (Mac) or Ctrl+B (Windows/Linux) | Inserts Markdown formatting for bolding text |
|Command+I (Mac) or Ctrl+I (Windows/Linux) | Inserts Markdown formatting for italicizing text |
|Command+E (Mac) or Ctrl+E (Windows/Linux) | Inserts Markdown formatting for code or a command within a line |
|Command+K (Mac) or Ctrl+K (Windows/Linux) | Inserts Markdown formatting for creating a link |
|Command+V (Mac) or Ctrl+V (Windows/Linux) | Creates a Markdown link when applied over highlighted text |
|Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) | Toggles between the **Write** and **Preview** comment tabs |
|Command+Shift+V (Mac) or Ctrl+Shift+V (Windows/Linux) | Pastes HTML link as plain text |
|Command+Shift+Option+V (Mac) or Ctrl+Shift+Alt+V (Windows/Linux) | Pastes HTML link as plain text |
|Command+Shift+7 (Mac) or Ctrl+Shift+7 (Windows/Linux) | Inserts Markdown formatting for an ordered list |
|Command+Shift+8 (Mac) or Ctrl+Shift+8 (Windows/Linux) | Inserts Markdown formatting for an unordered list |
|Command+Enter (Mac) or Ctrl+Enter (Windows/Linux) | Submits a comment |
|Ctrl+. and then Ctrl+[saved reply number] | Opens saved replies menu and then autofills comment field with a saved reply. For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-saved-replies/about-saved-replies). |
|Command+Shift+. (Mac) or Ctrl+Shift+. (Windows/Linux) | Inserts Markdown formatting for a quote |
| {% ifversion fpt or ghec %} |
|Command+G (Mac) or Ctrl+G (Windows/Linux) | Insert a suggestion. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request). |
| {% endif %} |
|R | Quote the selected text in your reply. For more information, see [AUTOTITLE](/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#quoting-text). |
## Issue and pull request lists
| Keyboard shortcut | Description |
|-----------|------------ |
|C | Create an issue
|Command+/ (Mac) or Ctrl+/ (Windows/Linux) | Focus your cursor on the issues or pull requests search bar. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests).|
|U | Filter by author |
|L | Filter by or edit labels. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests). |
|Alt and click | While filtering by labels, exclude labels. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests). |
|M | Filter by or edit milestones. For more information, see [AUTOTITLE](/issues/using-labels-and-milestones-to-track-work/filtering-issues-and-pull-requests-by-milestone). |
|A | Filter by or edit assignee. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/filtering-and-searching-issues-and-pull-requests). |
|O or Enter | Open issue |
## Issues and pull requests
| Keyboard shortcut | Description |
|-----------|------------ |
|Q | Request a reviewer. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/requesting-a-pull-request-review). |
|M | Set a milestone. For more information, see [AUTOTITLE](/issues/using-labels-and-milestones-to-track-work/associating-milestones-with-issues-and-pull-requests). |
|L | Apply a label. For more information, see [AUTOTITLE](/issues/using-labels-and-milestones-to-track-work/managing-labels#applying-a-label). |
|A | Set an assignee. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/assigning-issues-and-pull-requests-to-other-github-users). |
|X | Link an issue or pull request from the same repository. For more information, see [AUTOTITLE](/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue). |
|Command+Shift+P (Mac) or Ctrl+Shift+P (Windows/Linux) | Toggles between the **Write** and **Preview** tabs |
| {% ifversion fpt or ghec %} |
|Alt and click | When creating an issue from a task list, open the new issue form in the current tab by holding Alt and clicking the {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists). |
|Shift and click | When creating an issue from a task list, open the new issue form in a new tab by holding Shift and clicking the {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists). |
|Command and click (Mac) or Ctrl+Shift and click (Windows/Linux) | When creating an issue from a task list, open the new issue form in the new window by holding Command or Ctrl+Shift and clicking the {% octicon "issue-opened" aria-label="The issue opened icon" %} in the upper-right corner of the task. For more information, see [AUTOTITLE](/get-started/writing-on-github/working-with-advanced-formatting/about-task-lists). |
| {% endif %} |
| {% ifversion sub-issues %} |
|Option+Shift+c (Mac) or Alt+Shift+c (Windows/Linux) | Create a new sub-issue. See [AUTOTITLE](/issues/tracking-your-work-with-issues/using-issues/adding-sub-issues). |
|Option, Shift+a (Mac) or Alt+Shift+a (Windows/Linux) | Add an existing issue as sub-issue. See [AUTOTITLE](/issues/tracking-your-work-with-issues/using-issues/adding-sub-issues). |
|Option+Shift+p (Mac) or Alt+Shift+p (Windows/Linux) | Edit parent issue. |
| {% endif %} |
## "Files changed" tab in pull requests
| Keyboard shortcut | Description |
|-----------|------------ |
|C | Open the **Commits** dropdown menu to filter which commits are shown in the diffs |
|T | Move your cursor to the "Filter changed files" field |
|Command+Shift+Enter (Mac) or Ctrl+Shift+Enter (Windows/Linux) | Submit a review comment |
|Option and click (Mac) or Alt and click (Windows/Linux) | Toggle between collapsing and expanding all outdated or resolved review comments in a pull request (for example, by holding down Alt and clicking **Show outdated** or **Hide outdated**) |
|Click, then Shift and click | Comment on multiple lines of a pull request by clicking a line number, holding Shift, then clicking another line number. For more information, see [AUTOTITLE](/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/commenting-on-a-pull-request#adding-line-comments-to-a-pull-request).|
## {% data variables.projects.projects_v2_caps %}
### Navigating a project
| Keyboard shortcut | Description |
|-----------|------------ |
|Command+f (Mac) or Ctrl+f (Windows/Linux) | Focus filter field |
|← | Move focus to the left |
|→ | Move focus to the right |
|↑ | Move focus up |
|↓ | Move focus down |
### Manipulating a project
| Keyboard shortcut | Description |
|-----------|------------ |
|Enter | Toggle edit mode for the focused cell |
|Escape | Cancel editing for the focused cell |
|Command+Shift+\ (Mac) or Ctrl+Shift+\ (Windows/Linux) | Open row actions menu |
|Shift+Space | Select item |
|Shift+↓ | Add cell or card below to selection |
|Shift+↑ | Add cell or card above to selection |
|Space | Open selected item |
|e | Archive selected items |
### Moving cards on the board layout
| Keyboard shortcut | Description |
|-----------|------------ |
|Enter or Shift+Space | Start moving the selected card(s) |
|Esc | Cancel the move in progress |
|Enter | Complete the move in progress |
|↓ | Move a single card down |
|Command+↓ or Ctrl+↓ (Windows/Linux) | Move a single card to the bottom of the column |
|↑ | Move a single card up |
|Command+↑ (Mac) or Ctrl+↑ (Windows/Linux) | Move a single card to the top of the column |
|← | Move card(s) left |
|Command+← (Mac) or Ctrl+← (Windows/Linux) | Move card(s) to the leftmost column |
|→ | Move card(s) right |
|Command+→ (Mac) or Ctrl+→ (Windows/Linux) | Move card(s) to the rightmost column |
{% ifversion projects-v1 %}
## {% data variables.product.prodname_projects_v1_caps %}
### Moving a column
| Keyboard shortcut | Description |
|-----------|------------ |
|Enter or Space | Start moving the focused column |
|Esc | Cancel the move in progress |
|Enter | Complete the move in progress |
|← or H | Move column to the left |
|Command+← or Command+H (Mac) or Ctrl+← or Ctrl+H (Windows/Linux) | Move column to the leftmost position |
|→ or L | Move column to the right |
|Command+→ or Command+L (Mac) or Ctrl+→ or Ctrl+L (Windows/Linux) | Move column to the rightmost position |
### Moving a card
| Keyboard shortcut | Description |
|-----------|------------ |
|Enter or Space | Start moving the focused card |
|Esc | Cancel the move in progress |
|Enter | Complete the move in progress |
|↓ or J | Move card down |
|Command+↓ or Command+J (Mac) or Ctrl+↓ or Ctrl+J (Windows/Linux) | Move card to the bottom of the column |
|↑ or K | Move card up |
|Command+↑ or Command+K (Mac) or Ctrl+↑ or Ctrl+K (Windows/Linux) | Move card to the top of the column |
|← or H | Move card to the bottom of the column on the left |
|Shift+← or Shift+H | Move card to the top of the column on the left |
|Command+← or Command+H (Mac) or Ctrl+← or Ctrl+H (Windows/Linux) | Move card to the bottom of the leftmost column |
|Command+Shift+← or Command+Shift+H (Mac) or Ctrl+Shift+← or Ctrl+Shift+H (Windows/Linux) | Move card to the top of the leftmost column
|→ | Move card to the bottom of the column on the right |
|Shift+→ or Shift+L | Move card to the top of the column on the right |
|Command+→ or Command+L (Mac) or Ctrl+→ or Ctrl+L (Windows/Linux) | Move card to the bottom of the rightmost column |
|Command+Shift+→ or Command+Shift+L (Mac) or Ctrl+Shift+→ or Ctrl+Shift+L (Windows/Linux) | Move card to the bottom of the rightmost column |
### Previewing a card
| Keyboard shortcut | Description |
|-----------|------------ |
|Esc | Close the card preview pane |
{% endif %}
{% ifversion fpt or ghec %}
## {% data variables.product.prodname_actions %}
| Keyboard shortcut | Description |
|-----------|------------ |
|Command+Space (Mac) or Ctrl+Space (Windows/Linux) | In the workflow editor, get suggestions for your workflow file. |
|G F | Go to the workflow file |
|Shift+T or T | Toggle timestamps in logs |
|Shift+F or F | Toggle full-screen logs |
|Esc | Exit full-screen logs |
{% endif %}
## Notifications
| Keyboard shortcut | Description |
|-----------|------------ |
|E | Mark as done |
|Shift+U| Mark as unread |
|Shift+I| Mark as read |
|Shift+M | Unsubscribe |
## Network graph
| Keyboard shortcut | Description |
|-----------|------------ |
|← or H | Scroll left |
|→ or L | Scroll right |
|↑ or K | Scroll up |
|↓ or J | Scroll down |
|Shift+← (Mac) or Shift+H (Windows/Linux) | Scroll all the way left |
|Shift+→ (Mac) or Shift+L (Windows/Linux) | Scroll all the way right |
|Shift+↑ (Mac) or Shift+K (Windows/Linux) | Scroll all the way up |
|Shift+↓ (Mac) or Shift+J (Windows/Linux) | Scroll all the way down |