RStudio keyboard shortcuts
RStudio is Posit's editor for the R language, with the console, plots, and help in panes beside your code. Its shortcuts run the command palette and console, move through source files, fold code, find and edit, and handle plots, Git, and builds.
Windows, macOS, Linux · 204 shortcutsCommand palette and accessibility
Open the searchable command palette and move focus among RStudio panes and accessibility controls.
| Action | Shortcuts |
|---|---|
| Show the Command PaletteFirefox on Windows and Linux also documents Ctrl+Alt+Shift+P. | Windows / LinuxCtrl + Shift + P macOSShift + Cmd + P |
| Toggle screen reader support | Windows / LinuxAlt + Shift + / macOSCtrl + Option + / |
| Speak the text editor location | Windows / LinuxAlt + Shift + 1 macOSCtrl + Option + 1 |
| Focus console outputAlt+Shift+2 on Windows and Linux, or Ctrl+Option+2 on macOS, is also documented. | Windows / macOS / LinuxCtrl + ` |
| Toggle Tab key always moves focus | Windows / LinuxAlt + Shift + [ macOSCtrl + Option + [ |
| Focus the next pane | Windows / macOS / LinuxF6 |
| Focus the previous pane | Windows / macOS / LinuxShift + F6 |
| Focus the main toolbar | Windows / LinuxAlt + Shift + Y macOSCtrl + Option + Y |
Console
Move to the console, clear it, edit the current command line, browse history, and interrupt a running command.
| Action | Shortcuts |
|---|---|
| Move the cursor to the Console | Windows / macOS / LinuxCtrl + 2 |
| Clear the console | Windows / macOS / LinuxCtrl + L |
| Move the cursor to the beginning of the line | Windows / LinuxHome macOSCmd + Left |
| Move the cursor to the end of the line | Windows / LinuxEnd macOSCmd + Right |
| Navigate command historyDown Arrow moves in the opposite direction. | Windows / macOS / LinuxUp Arrow |
| Open the command history popup | Windows / LinuxCtrl + Up macOSCmd + Up |
| Interrupt the currently executing command | Windows / macOS / LinuxEscape |
| Change the working directory | Windows / macOS / LinuxCtrl + Shift + H |
Source structure and tabs
Fold code, jump to lines or sections, change tab focus, navigate history, and extract symbols from the source editor.
| Action | Shortcuts |
|---|---|
| Fold selected code | Windows / LinuxAlt + L macOSOption + Cmd + L |
| Unfold selected code | Windows / LinuxShift + Alt + L macOSOption + Shift + Cmd + L |
| Fold all code | Windows / LinuxAlt + O macOSOption + Cmd + O |
| Unfold all code | Windows / LinuxShift + Alt + O macOSOption + Shift + Cmd + O |
| Go to a line | Windows / LinuxShift + Alt + G macOSOption + Shift + Cmd + G |
| Jump to | Windows / LinuxShift + Alt + J macOSOption + Shift + Cmd + J |
| Expand selection | Windows / LinuxCtrl + Shift + Up macOSCtrl + Option + Shift + Up |
| Shrink selection | Windows / LinuxCtrl + Shift + Down macOSCtrl + Option + Shift + Down |
| Go to the next section | Windows / macOS / LinuxCtrl + Page Down |
| Go to the previous section | Windows / macOS / LinuxCtrl + Page Up |
| Split into lines | Windows / macOS / LinuxCtrl + Alt + A |
| Edit lines from the start | Windows / macOS / LinuxCtrl + Alt + Shift + A |
| Switch to a tab | Windows / macOS / LinuxCtrl + Shift + . |
| Go to the previous tabCtrl+Alt+Left on Windows and Linux, or Ctrl+Option+Left on macOS, is also listed. | Windows / macOS / LinuxCtrl + F11 |
| Go to the previous tab on desktop | Windows / macOS / LinuxCtrl + Shift + Tab |
| Go to the next tabCtrl+Alt+Right on Windows and Linux, or Ctrl+Option+Right on macOS, is also listed. | Windows / macOS / LinuxCtrl + F12 |
| Go to the next tab on desktop | Windows / macOS / LinuxCtrl + Tab |
| Go to the first tab | Windows / macOS / LinuxCtrl + Shift + F11 |
| Go to the last tab | Windows / macOS / LinuxCtrl + Shift + F12 |
| Navigate back | Windows / LinuxCtrl + F9 macOSCmd + F9 |
| Navigate forward | Windows / LinuxCtrl + F10 macOSCmd + F10 |
| Extract a function from the selection | Windows / LinuxCtrl + Alt + X macOSOption + Cmd + X |
| Extract a variable from the selection | Windows / LinuxCtrl + Alt + V macOSOption + Cmd + V |
| Reindent lines | Windows / LinuxCtrl + I macOSCmd + I |
| Comment or uncomment the current line or selection | Windows / LinuxCtrl + Shift + C macOSShift + Cmd + C |
| Reflow a comment | Windows / macOS / LinuxCtrl + Shift + / |
| Reformat the selection | Windows / LinuxCtrl + Shift + A macOSShift + Cmd + A |
| Show diagnostics for the current project | Windows / LinuxCtrl + Shift + Alt + D macOSOption + Shift + Cmd + D |
| Move lines up or downDown moves in the opposite direction. | Windows / LinuxAlt + Up macOSOption + Up |
| Copy lines up or downDown moves in the opposite direction. | Windows / LinuxShift + Alt + Up macOSOption + Cmd + Up |
| Jump to the matching brace or parenthesis | Windows / macOS / LinuxCtrl + P |
| Expand to the matching brace or parenthesis | Windows / LinuxCtrl + Shift + Alt + E macOSCtrl + Shift + E |
| Add a cursor above the current cursor | Windows / LinuxCtrl + Alt + Up macOSCtrl + Option + Up |
| Add a cursor below the current cursor | Windows / LinuxCtrl + Alt + Down macOSCtrl + Option + Down |
| Move the active cursor up | Windows / LinuxCtrl + Alt + Shift + Up macOSCtrl + Option + Shift + Up |
| Move the active cursor down | Windows / LinuxCtrl + Alt + Shift + Down macOSCtrl + Option + Shift + Down |
Find and editing
Search and replace text, select ranges, delete words, indent code, and insert common R syntax from the editor.
| Action | Shortcuts |
|---|---|
| Find and replace | Windows / LinuxCtrl + F macOSCmd + F |
| Find the next matchLinux uses Ctrl+G instead of F3. | Windows / LinuxF3 macOSCmd + G |
| Find the previous matchLinux uses Ctrl+Shift+G instead of Shift+F3. | Windows / LinuxShift + F3 macOSShift + Cmd + G |
| Use the selection for Find | Windows / LinuxCtrl + F3 macOSCmd + E |
| Replace and find | Windows / LinuxCtrl + Shift + J macOSShift + Cmd + J |
| Find in files | Windows / LinuxCtrl + Shift + F macOSShift + Cmd + F |
| Check spelling | Windows / macOS / LinuxF7 |
| Rename a symbol in scope | Windows / LinuxCtrl + Alt + Shift + M macOSOption + Shift + Cmd + M |
| Insert an Roxygen skeleton | Windows / LinuxCtrl + Shift + Alt + R macOSOption + Shift + Cmd + R |
| Undo | Windows / LinuxCtrl + Z macOSCmd + Z |
| Redo | Windows / LinuxCtrl + Shift + Z macOSShift + Cmd + Z |
| Cut | Windows / LinuxCtrl + X macOSCmd + X |
| Copy | Windows / LinuxCtrl + C macOSCmd + C |
| Paste | Windows / LinuxCtrl + V macOSCmd + V |
| Paste with indent | Windows / LinuxCtrl + Shift + V macOSShift + Cmd + V |
| Select all | Windows / LinuxCtrl + A macOSCmd + A |
| Jump to the previous or next wordRight moves in the opposite direction. | Windows / LinuxCtrl + Left macOSOption + Left |
| Jump to the start or endThe source also lists Ctrl+Up and Ctrl+End on Windows and Linux, and Cmd+Down on macOS. | Windows / LinuxCtrl + Home macOSCmd + Up |
| Delete a line | Windows / LinuxCtrl + D macOSCmd + D |
| Select with the arrow keys | Windows / macOS / LinuxShift + Arrow keys |
| Select a wordRight moves in the opposite direction. | Windows / LinuxCtrl + Shift + Left macOSOption + Shift + Left |
| Select to the line start | Windows / LinuxAlt + Shift + Left macOSShift + Cmd + Left |
| Select to the line end | Windows / LinuxAlt + Shift + Right macOSShift + Cmd + Right |
| Select a page up or downPage Down moves in the opposite direction. | Windows / macOS / LinuxShift + Page Up |
| Select to the start or endThe source also lists Ctrl+Shift+End and Shift+Alt+Down on Windows and Linux, and Shift+Cmd+Down on macOS. | Windows / LinuxCtrl + Shift + Home macOSShift + Cmd + Up |
| Delete the word to the leftThe source also lists Ctrl+Option+Backspace on macOS. | Windows / LinuxCtrl + Backspace macOSOption + Backspace |
| Delete the word to the right | Windows / LinuxNot documented macOSOption + Delete |
| Delete to the line end | Windows / LinuxNot documented macOSCtrl + K |
| Delete to the line start | Windows / LinuxNot documented macOSOption + Backspace |
| Indent at the beginning of a line | Windows / macOS / LinuxTab |
| Outdent | Windows / macOS / LinuxShift + Tab |
| Yank the line up to the cursor | Windows / macOS / LinuxCtrl + U |
| Yank the line after the cursor | Windows / macOS / LinuxCtrl + K |
| Insert currently yanked text | Windows / macOS / LinuxCtrl + Y |
| Insert the assignment operator | Windows / LinuxAlt + - macOSOption + - |
| Insert the pipe operator | Windows / LinuxCtrl + Shift + M macOSShift + Cmd + M |
| Show help for the function at the cursor | Windows / macOS / LinuxF1 |
| Show source code for the function at the cursor | Windows / macOS / LinuxF2 |
| Find usages for a symbol at the cursorThe source limits this to C++. | Windows / LinuxCtrl + Alt + U macOSOption + Cmd + U |
Completions and views
Accept code completions and move focus or zoom among RStudio's source, console, help, files, plots, packages, and panes.
| Action | Shortcuts |
|---|---|
| Attempt completionCtrl+Space on Windows and Linux, or Command+Space on macOS, is also documented. | Windows / macOS / LinuxTab |
| Navigate completion candidatesDown Arrow moves in the opposite direction. | Windows / macOS / LinuxUp Arrow |
| Accept the selected completionTab and Right Arrow are also documented. | Windows / macOS / LinuxEnter |
| Dismiss the completion popup | Windows / macOS / LinuxEscape |
| Move focus to the Source Editor | Windows / macOS / LinuxCtrl + 1 |
| Zoom the Source Editor | Windows / macOS / LinuxCtrl + Shift + 1 |
| Move focus to the Console | Windows / macOS / LinuxCtrl + 2 |
| Zoom the Console | Windows / macOS / LinuxCtrl + Shift + 2 |
| Move focus to Help | Windows / macOS / LinuxCtrl + 3 |
| Zoom Help | Windows / macOS / LinuxCtrl + Shift + 3 |
| Move focus to the Terminal | Windows / LinuxAlt + Shift + M macOSOption + Shift + M |
| Show History | Windows / macOS / LinuxCtrl + 4 |
| Zoom History | Windows / macOS / LinuxCtrl + Shift + 4 |
| Show Files | Windows / macOS / LinuxCtrl + 5 |
| Zoom Files | Windows / macOS / LinuxCtrl + Shift + 5 |
| Show Plots | Windows / macOS / LinuxCtrl + 6 |
| Zoom Plots | Windows / macOS / LinuxCtrl + Shift + 6 |
| Show Packages | Windows / macOS / LinuxCtrl + 7 |
| Zoom Packages | Windows / macOS / LinuxCtrl + Shift + 7 |
| Show Environment | Windows / macOS / LinuxCtrl + 8 |
| Zoom Environment | Windows / macOS / LinuxCtrl + Shift + 8 |
| Show Viewer | Windows / macOS / LinuxCtrl + 9 |
| Zoom Viewer | Windows / macOS / LinuxCtrl + Shift + 9 |
| Show Git or SVN | Windows / LinuxCtrl + F1 macOSCmd + F1 |
| Zoom Git or SVN | Windows / macOS / LinuxCtrl + Shift + F1 |
| Show Build | Windows / LinuxCtrl + F2 macOSCmd + F2 |
| Zoom Build | Windows / macOS / LinuxCtrl + Shift + F2 |
| Show Connections | Windows / macOS / LinuxCtrl + F5 |
| Zoom Connections | Windows / macOS / LinuxCtrl + Shift + F5 |
| Zoom Tutorial | Windows / macOS / LinuxCtrl + Shift + F6 |
| Show Find in Files results | Windows / LinuxCtrl + F6 macOSCmd + F6 |
| Sync the editor and PDF preview | Windows / LinuxCtrl + F8 macOSCmd + F8 |
| Zoom the left column | Windows / LinuxCtrl + Alt + Shift + F12 macOSCtrl + Option + Shift + F12 |
| Zoom the right column | Windows / LinuxCtrl + Alt + Shift + F11 macOSCtrl + Option + Shift + F11 |
| Show all panes | Windows / LinuxCtrl + Alt + Shift + 0 macOSCtrl + Alt + 0 |
| Add a source column | Windows / LinuxCtrl + F7 macOSCmd + F7 |
| Open global options | Windows / LinuxNot documented macOSCmd + ,Chrome and desktop use Command+Comma. Safari and Firefox use Option+Command+Comma. |
| Open project options | Windows / LinuxNot documented macOSShift + Cmd + , |
Help, build, and debug
Open RStudio help, install or check packages, and control the debugger with the current Posit key map.
| Action | Shortcuts |
|---|---|
| Show the keyboard shortcut reference | Windows / LinuxAlt + Shift + K macOSOption + Shift + K |
| Search R Help | Windows / LinuxCtrl + Alt + F1 macOSCtrl + Option + F1 |
| Find in a Help topic | Windows / LinuxCtrl + F macOSCmd + F |
| Open the previous Help topic | Windows / LinuxShift + Alt + F2 macOSOption + Shift + F2 |
| Open the next Help topic | Windows / LinuxShift + Alt + F3 macOSOption + Shift + F3 |
| Install and restart | Windows / LinuxCtrl + Shift + B macOSShift + Cmd + B |
| Load all development tools | Windows / LinuxCtrl + Shift + L macOSShift + Cmd + L |
| Test a package on desktop | Windows / LinuxCtrl + Shift + T macOSShift + Cmd + T |
| Test a package on the web | Windows / LinuxCtrl + Alt + F7 macOSOption + Cmd + F7 |
| Check a package | Windows / LinuxCtrl + Shift + E macOSShift + Cmd + E |
| Document a package | Windows / LinuxCtrl + Shift + D macOSShift + Cmd + D |
| Toggle a breakpoint | Windows / macOS / LinuxShift + F9 |
| Execute the next line | Windows / macOS / LinuxF10 |
| Step into a function | Windows / macOS / LinuxShift + F4 |
| Finish a function or loop | Windows / macOS / LinuxShift + F7 |
| Continue debugging | Windows / macOS / LinuxShift + F5 |
| Stop debugging | Windows / macOS / LinuxShift + F8 |
Plots, Git, sessions, and terminal
Move between plots, review Git changes, stage files, restart sessions, and switch among RStudio terminal instances.
| Action | Shortcuts |
|---|---|
| Show the previous plot | Windows / LinuxCtrl + Alt + F11 macOSOption + Cmd + F11 |
| Show the next plot | Windows / LinuxCtrl + Alt + F12 macOSOption + Cmd + F12 |
| Diff the active source document | Windows / LinuxCtrl + Alt + D macOSCtrl + Option + D |
| Commit changes | Windows / LinuxCtrl + Alt + M macOSCtrl + Option + M |
| Scroll the diff viewDown moves in the opposite direction. | Windows / macOS / LinuxCtrl + Up |
| Stage or unstage in Git | Windows / macOS / LinuxSpace |
| Stage or unstage and move to the next item | Windows / macOS / LinuxEnter |
| Quit the desktop session | Windows / LinuxCtrl + Q macOSCmd + Q |
| Restart the R session | Windows / LinuxCtrl + Shift + F10 macOSShift + Cmd + 0 |
| Open a new terminal | Windows / LinuxShift + Alt + R macOSOption + Shift + R |
| Move focus to the terminal | Windows / LinuxShift + Alt + M macOSOption + Shift + M |
| Go to the previous terminal | Windows / LinuxShift + Alt + F11 macOSOption + Shift + F11 |
| Go to the next terminal | Windows / LinuxShift + Alt + F12 macOSOption + Shift + F12 |
Source
official Posit RStudio keyboard shortcuts · Checked
RStudio User Guide version 2026.08.2 checked September 1, 2026. The guide warns that Emacs, Vim, and Sublime Text keybindings change the defaults. This record uses the standard keybinding set and omits rows where the guide says no shortcut.