PhpStorm keyboard shortcuts for Windows, Linux and Mac

PhpStorm 2026.2 bindings checked against JetBrains' PhpStorm help. The left column holds the predefined Windows keymap, which the printable reference card heads Windows & Linux; the right column holds the macOS keymap. PHPUnit, PHPDoc, PHP debugging and query-console rows come from topic pages of that help, and alternative keymaps such as Eclipse or NetBeans are not covered. On a Mac most chords take Cmd, yet Run stays on Ctrl + R and Debug on Ctrl + D.

267 shortcuts in 18 sections. Checked row by row against JetBrains on . Edited by Jay.

General 12

Help and card name the first column differently: the PhpStorm help calls it the predefined Windows keymap and has no Linux page, while the PDF reference card it links to prints the same keys under Default Windows & Linux keymap.

On Ubuntu the desktop answers several of these chords first: Reformat Code's Ctrl + Alt + L becomes Lock screen, Surround With's Ctrl + Alt + T launches a terminal, and Evaluate Expression's Alt + F8 resizes the window. JetBrains knows of no predefined keymap that avoids such clashes on Linux, so give the affected actions other keys.

ActionWindows / LinuxMac
Search EverywhereTap Shift twice; one popup then looks through classes, files, symbols, actions and settings.ShiftthenShiftShiftthenShift
Find ActionType part of a command name to run it, whether or not it has a key of its own.Ctrl+Shift+ACmd+Shift+A
Run AnythingTap Ctrl twice on either system; the popup also runs Composer, Symfony console and Laravel Artisan commands.CtrlthenCtrlCtrlthenCtrl
Open SettingsThe Mac binding is Cmd with the comma key.Ctrl+Alt+SCmd+,
Save AllCtrl+SCmd+S
New file in current directoryOffers the New popup for the folder of the file that is open in the editor.Ctrl+Alt+InsertCtrl+Option+N
New scratch fileCreates a throwaway file in the language you pick; choosing HTTP Request starts a request file.Ctrl+Alt+Shift+InsertCmd+Shift+N
Increase editor font sizeApplies to every editor tab at once; Mac swaps Alt for Ctrl in this pair.Alt+Shift+.Ctrl+Shift+.
Decrease editor font sizeShrinks the code font in every open editor tab.Alt+Shift+,Ctrl+Shift+,
SwitcherKeep Ctrl held and press Tab again to step through open files and tool windows.Ctrl+TabCtrl+Tab
Open the Switch menuLists color schemes, keymaps and view modes; pressing the chord again reverts the choice.Ctrl+`Ctrl+`
Focus the editorReturns the keyboard focus from any tool window to the active editor.EscEsc

Editing 30

ActionWindows / LinuxMac
CutWith nothing selected, the whole line at the caret is cut.Ctrl+XCmd+X
CopyWith nothing selected, the whole line the caret is on is copied.Ctrl+CCmd+C
PasteA line copied without a selection is inserted above the current line, not at the caret.Ctrl+VCmd+V
Paste as Plain TextCtrl+Alt+Shift+VCmd+Option+Shift+V
Paste from HistoryOpens the clipboard history, which keeps 100 entries by default.Ctrl+Shift+VCmd+Shift+V
Copy PathsCtrl+Shift+CCmd+Shift+C
Copy ReferenceThe copied reference carries the line number, so it points at that exact spot.Ctrl+Alt+Shift+CCmd+Option+Shift+C
UndoCtrl+ZCmd+Z
RedoNot Ctrl with Y: that chord deletes the current line in this keymap.Ctrl+Shift+ZCmd+Shift+Z
Indent SelectionTabTab
Unindent Line or SelectionShift+TabShift+Tab
Auto-Indent LinesRepairs indentation only; the Mac chord keeps Ctrl and adds Option.Ctrl+Alt+ICtrl+Option+I
Start New LineOpens a line under the current one from any caret position, without splitting the text.Shift+EnterShift+Return
Start new line aboveOpens an empty line over the current one.Ctrl+Alt+EnterCmd+Option+Return
Delete LineOn a Mac the chord is Cmd with Backspace, not a letter key.Ctrl+YCmd+Backspace
Delete to Word EndCtrl+DeleteOption+Delete
Delete to Word StartCtrl+BackspaceOption+Backspace
Join LinesKeep pressing to pull up further lines; it joins string literals too. The Mac chord also takes Ctrl.Ctrl+Shift+JCtrl+Shift+J
Split string literalInside a string literal, breaks it into two parts at the caret.Ctrl+EnterCmd+Return
Duplicate Line or SelectionWith nothing selected, the line at the caret is repeated underneath.Ctrl+DCmd+D
Toggle CaseA CamelCase name is converted to lower case.Ctrl+Shift+UCmd+Shift+U
Move Statement UpCarries the whole statement at the caret upwards and checks the syntax as it goes.Ctrl+Shift+UpCmd+Shift+Up
Move Statement DownMoves the whole statement at the caret below the next one.Ctrl+Shift+DownCmd+Shift+Down
Move Element LeftCtrl+Alt+Shift+LeftCmd+Option+Shift+Left
Move Element RightThe vendor table calls this row Move Statement Right; its chord mirrors Move Element Left.Ctrl+Alt+Shift+RightCmd+Option+Shift+Right
Move Line UpShifts the single line at the caret one row up.Alt+Shift+UpOption+Shift+Up
Move Line DownShifts the single line at the caret one row down.Alt+Shift+DownOption+Shift+Down
Toggle line commentPress again on a commented line to remove the comment marker.Ctrl+/Cmd+/
Toggle block commentThe Mac chord is Cmd, Option and the slash key, with no Shift.Ctrl+Shift+/Cmd+Option+/
Unwrap or removePops up the unwrap and remove choices for the code at the caret; pick one and confirm with Enter.Ctrl+Shift+DeleteCmd+Shift+Delete

Code completion and generation 20

ActionWindows / LinuxMac
Basic CompletionPress it a second time to widen the suggestions; the completion chords stay on Ctrl on a Mac.Ctrl+SpaceCtrl+Space
Type-Matching CompletionCtrl+Shift+SpaceCtrl+Shift+Space
Second Basic CompletionCtrl+Alt+SpaceCtrl+Option+Space
Complete Current StatementBalances parentheses and adds missing braces and semicolons so that the construct is valid.Ctrl+Shift+EnterCmd+Shift+Return
Parameter InfoBrings back the parameter popup for the call at the caret after it has closed.Ctrl+PCmd+P
Quick DocumentationShows the documentation in a popup; a second press moves it to the Documentation tool window. Plain F1 on a Mac.Ctrl+QF1
External DocumentationSends the lookup to a web browser instead of the documentation popup.Shift+F1Shift+F1
Toggle rendered PHPDoc viewSwitches a PHPDoc comment between its source and an easier-to-read rendered form in the editor.Ctrl+Alt+QCtrl+Option+Q
Quick DefinitionShows the definition of the entry highlighted in the completion list; Option with Space on a Mac.Ctrl+Shift+IOption+Space
Type InfoReports the type of the expression or variable at the caret.Ctrl+Shift+PCtrl+Shift+P
Context InfoShows on which code element the caret currently sits.Alt+QCtrl+Shift+Q
GenerateOpens the Generate popup: constructors, getters and setters, PHPDoc blocks and, in a test class, test methods.Alt+InsertCmd+N
Override MethodsPick parent-class methods to override; the chord is the same on a Mac, with Ctrl.Ctrl+OCtrl+O
Implement MethodsCreates stubs for the methods an interface or abstract class still requires.Ctrl+ICtrl+I
Insert Live TemplateLists the templates that apply at the caret, such as fore for a foreach loop.Ctrl+JCmd+J
Surround WithSelect a code fragment first, then pick the construct to wrap it in.Ctrl+Alt+TCmd+Option+T
Surround with live templateWith a block selected, opens the Select Template popup for templates that wrap code.Ctrl+Alt+JCmd+Option+J
Reformat CodeApplies the code style to the selected fragment or the file; on a folder in the project view, to the files inside.Ctrl+Alt+LCmd+Option+L
Reformat File dialogOpens the dialog whose options include cleaning up imports during the reformat.Ctrl+Alt+Shift+LCmd+Option+Shift+L
Optimize ImportsRemoves unused imports and tidies the rest; the Mac chord keeps Ctrl and adds Option.Ctrl+Alt+OCtrl+Option+O

Caret movement 13

ActionWindows / LinuxMac
Caret to previous wordWord jumps use Ctrl on Windows and Option on a Mac.Ctrl+LeftOption+Left
Caret to next wordCtrl+RightOption+Right
Caret to line startHome on a PC keyboard; Cmd with the Left arrow on a Mac.HomeCmd+Left
Caret to line endEnd on a PC keyboard; Cmd with the Right arrow on a Mac.EndCmd+Right
Caret to matching braceThe Mac chord drops Shift: Ctrl with M.Ctrl+Shift+MCtrl+M
Jump to code block startThe Mac chord needs Option as well as Cmd, since Cmd with a bracket alone navigates back and forward.Ctrl+[Cmd+Option+[
Jump to code block endCtrl+]Cmd+Option+]
Caret to page topJumps to the top of the visible part of the editor.Ctrl+Page UpCmd+Page Up
Caret to page bottomJumps to the bottom of the visible part of the editor.Ctrl+Page DownCmd+Page Down
Page UpPage UpPage Up
Page DownPage DownPage Down
Caret to start of fileCtrl+HomeCmd+Home
Caret to end of fileCtrl+EndCmd+End

Selecting text 19

ActionWindows / LinuxMac
Select AllCtrl+ACmd+A
Extend selection leftShift+LeftShift+Left
Extend selection rightShift+RightShift+Right
Select to previous wordCtrl+Shift+LeftOption+Shift+Left
Select to next wordCtrl+Shift+RightOption+Shift+Right
Select to line startShift+HomeCmd+Shift+Left
Select to line endShift+EndCmd+Shift+Right
Extend selection upShift+UpShift+Up
Extend selection downShift+DownShift+Down
Select to code block startCtrl+Shift+[Cmd+Option+Shift+[
Select to code block endCtrl+Shift+]Cmd+Option+Shift+]
Select to page topCtrl+Shift+Page UpCmd+Shift+Page Up
Select to page bottomCtrl+Shift+Page DownCmd+Shift+Page Down
Select a page upShift+Page UpShift+Page Up
Select a page downShift+Page DownShift+Page Down
Select to start of fileCtrl+Shift+HomeCmd+Shift+Home
Select to end of fileCtrl+Shift+EndCmd+Shift+End
Extend SelectionGrows the selection step by step, in plain text from a word to the sentence and on. Option with Up on a Mac.Ctrl+WOption+Up
Shrink SelectionUndoes the last Extend Selection step.Ctrl+Shift+WOption+Down

Code folding 10

ActionWindows / LinuxMac
ExpandUnfolds the fragment at the caret, for example a single method; the key is on the numeric keypad.Ctrl+Num +Cmd+Num +
CollapseFolds the current fragment, such as a method or a block in curly braces.Ctrl+Num -Cmd+Num -
Expand RecursivelyOpens the current fragment together with every region nested in it.Ctrl+Alt+Num +Cmd+Option+Num +
Collapse RecursivelyFolds the current fragment and all of its subordinate regions.Ctrl+Alt+Num -Cmd+Option+Num -
Expand AllWorks on the selection, or on the whole file when nothing is selected.Ctrl+Shift+Num +Cmd+Shift+Num +
Collapse AllFolds every fragment in the selection or, with no selection, in the file.Ctrl+Shift+Num -Cmd+Shift+Num -
Fold SelectionTurns the selected code into a foldable fragment; press it again to open it.Ctrl+.Cmd+.
Expand to levelA sequence: after the chord, type a digit from 1 to 5 for how many nesting levels to open.Ctrl+Num *then1-5Cmd+Num *then1-5
Expand all to levelSame idea for the whole file: the digit sets the depth to which collapsed fragments open.Ctrl+Shift+Num *then1-5Cmd+Option+Num *then1-5
Go to custom folding regionJumps to a region that you created yourself with folding comments.Ctrl+Alt+.Cmd+Option+.

Multiple carets 11

Clone Caret Above and Below begin with a double press: press Ctrl, press it again and hold it down while choosing Up or Down. The macOS keymap does the same with Option.

ActionWindows / LinuxMac
Add or remove a caretClicking an existing caret with the modifier removes it; the last caret always stays.Alt+ClickOption+Click
Toggle Column Selection ModeThe Mac binding is unrelated to the Windows one: Cmd, Shift and 8.Alt+Shift+InsertCmd+Shift+8
Clone Caret AboveTap the modifier twice and keep it down on the second tap, then press the arrow.CtrlthenCtrl+UpOptionthenOption+Up
Clone Caret BelowThe doubled modifier is Ctrl on Windows and Option on a Mac.CtrlthenCtrl+DownOptionthenOption+Down
Carets on every selected linePuts a caret at the end of every line of the selected block.Alt+Shift+GOption+Shift+G
Select next occurrencePress repeatedly to add each further match; F3 skips one. The Mac chord is Ctrl with G.Alt+JCtrl+G
Select All OccurrencesCtrl+Alt+Shift+JCmd+Ctrl+G
Deselect last occurrenceTakes the most recently added occurrence out of the multiple selection.Alt+Shift+JCtrl+Shift+G
Rectangular selection to clickPut the caret at one corner, then middle-click the opposite corner with both modifiers held.Alt+Shift+Middle-clickOption+Shift+Middle-click
Rectangular selection by draggingAlt+Shift+ClickOption+Shift+Click
Add another rectangular selectionCtrl+Alt+Shift+ClickCmd+Option+Shift+Click

Bookmarks 6

ActionWindows / LinuxMac
Toggle anonymous bookmarkThe bookmark keys sit on F11 in the Windows keymap and on F3 in the macOS one.F11F3
Toggle mnemonic bookmarkA popup asks for the digit or letter that will identify the bookmark.Ctrl+F11Option+F3
Toggle bookmark with digitSets or clears the bookmark numbered with the digit you press.Ctrl+Shift+0-9Ctrl+Shift+0-9
Go to numbered bookmarkHold Ctrl and press the digit of the bookmark; the macOS keymap uses Ctrl here as well.Ctrl+0-9Ctrl+0-9
Show all bookmarksLists every line bookmark in a popup.Shift+F11Cmd+F3
Show Mnemonic BookmarksCtrl+Shift+F11Cmd+Option+F3

Search and replace 7

ActionWindows / LinuxMac
FindThe search pane opens at the top of the active editor.Ctrl+FCmd+F
Find NextF3 in the Windows keymap; Cmd with G on a Mac, where F3 toggles a bookmark.F3Cmd+G
Find PreviousShift+F3Cmd+Shift+G
ReplaceCtrl+RCmd+R
Find in FilesText highlighted in the editor is placed in the search field.Ctrl+Shift+FCmd+Shift+F
Replace in FilesCtrl+Shift+RCmd+Shift+R
Find word at caretThe help gives this key for Windows only; the macOS keymap page leaves the action without one.Ctrl+F3—

Code inspection 5

ActionWindows / LinuxMac
Show Context ActionsLists quick-fixes for a highlighted problem and intention actions for the code at the caret.Alt+EnterOption+Return
Error DescriptionCtrl+F1Cmd+F1
Next Highlighted ErrorBy default errors come before warnings; F2 on both systems, with Shift to go backwards.F2F2
Previous Highlighted ErrorShift+F2Shift+F2
Run Inspection by NameCtrl+Alt+Shift+ICmd+Option+Shift+I

Running and testing 10

ActionWindows / LinuxMac
RunLaunches the configuration selected in the Run widget; Ctrl with R on a Mac.Shift+F10Ctrl+R
Run from configuration listShows a popup of run configurations to choose from.Alt+Shift+F10Ctrl+Option+R
Run test at caretWith the caret in a PHPUnit test class or method, runs just that; Ctrl, Shift and R on a Mac.Ctrl+Shift+F10Ctrl+Shift+R
RerunIn the Run tool window, stops the running application and launches it again.Ctrl+F5Cmd+R
Go to test or test subjectJumps from a class or method to its test, and from a test back to the code it covers.Ctrl+Shift+TCmd+Shift+T
Manage coverage reportsThe same chord also reopens the Coverage tool window after it has been closed.Ctrl+Alt+F6Cmd+Option+F6
Open in browserRenders the output of the PHP file in a web browser through the built-in web server.Alt+F2Option+F2
StopWhen several processes are running, a list asks which one to stop.Ctrl+F2Cmd+F2
Stop Background ProcessesCtrl+Shift+F2Cmd+Shift+F2
Close Run tabCloses the selected Run tab and terminates its process; the Mac chord keeps Ctrl.Ctrl+Shift+F4Ctrl+Shift+F4

Debugging 21

ActionWindows / LinuxMac
DebugStarts the selected configuration under the debugger; Ctrl with D on a Mac.Shift+F9Ctrl+D
Debug from configuration listWith a PHP script open in the editor, the popup lets you pick that script to debug.Alt+Shift+F9Ctrl+Option+D
Attach to ProcessCtrl+Alt+F5Option+Shift+F5
Resume ProgramRuns on to the next breakpoint; F9 on Windows, Cmd, Option and R on a Mac.F9Cmd+Option+R
Step OverExecutes the current line without entering the calls on it.F8F8
Force Step OverLike Step Over, and breakpoints inside the called methods are ignored.Alt+Shift+F8Option+Shift+F8
Step IntoGoes inside the method called on the current line.F7F7
Smart Step IntoOn a line with several calls, lets you choose which one to enter.Shift+F7Shift+F7
Force Step IntoEnters a method even when the regular Step Into would skip it.Alt+Shift+F7Option+Shift+F7
Step OutFinishes the current method and returns to its caller.Shift+F8Shift+F8
Run to CursorContinues until execution reaches the line where the caret is.Alt+F9Option+F9
Force Run to CursorAs Run to Cursor, except that breakpoints on the way are ignored.Ctrl+Alt+F9Cmd+Option+F9
Show Execution PointAlt+F10Option+F10
Evaluate ExpressionOpens the Evaluate dialog; the help warns that this chord may not work on Ubuntu.Alt+F8Option+F8
Quick Evaluate ExpressionEvaluates the expression selected in the editor and shows the value in a tooltip.Ctrl+Alt+F8Cmd+Option+F8
Toggle Line BreakpointActs on the line with the caret; on a method declaration it sets a method breakpoint.Ctrl+F8Cmd+F8
Toggle temporary breakpointCtrl+Alt+Shift+F8Cmd+Option+Shift+F8
View BreakpointsOpens the Breakpoints dialog, which is also where PHP exception breakpoints are added.Ctrl+Shift+F8Cmd+Shift+F8
Edit BreakpointOn a line that has a breakpoint, the same chord opens the full list of its properties.Ctrl+Shift+F8Cmd+Shift+F8
Set ValueLets you change the value of the selected variable during a debugging session.F2F2
Jump to Type SourceFrom a variable in the debugger, opens the declaration of its class.Shift+F4Shift+F4

Refactoring 12

ActionWindows / LinuxMac
Refactor ThisA short Ctrl with T on a Mac, against a four-key chord on Windows.Ctrl+Alt+Shift+TCtrl+T
RenameRenames in place in the editor; press the chord once more for the Rename dialog with more options.Shift+F6Shift+F6
Change SignatureCtrl+F6Cmd+F6
InlineReverses an extraction, for example after Extract Method.Ctrl+Alt+NCmd+Option+N
MoveF6F6
CopyCopies a class, file or directory, with its structure, to another directory.F5F5
Extract MethodCtrl+Alt+MCmd+Option+M
Introduce VariablePuts the selected expression, or a part of it, into a new variable.Ctrl+Alt+VCmd+Option+V
Extract ConstantTurns the selected expression into a constant.Ctrl+Alt+CCmd+Option+C
Introduce FieldCtrl+Alt+FCmd+Option+F
Introduce ParameterCtrl+Alt+PCmd+Option+P
Safe DeleteCmd with Delete on a Mac.Alt+DeleteCmd+Delete

Version control 9

ActionWindows / LinuxMac
VCS Operations PopupAlt with the backtick key on Windows; Ctrl with V on a Mac.Alt+`Ctrl+V
CommitIn the Commit tool window it selects the entire active changelist.Ctrl+KCmd+K
Commit and PushCommits and pushes to the remote repository in one go.Ctrl+Alt+KCmd+Option+K
Stage fileWorks on the file selected in the Commit tool window and stages all of it.Ctrl+Alt+ACmd+Option+A
Update ProjectCtrl+TCmd+T
PushOpens the Push dialog for the commits of the current branch.Ctrl+Shift+KCmd+Shift+K
RollbackCtrl+Alt+ZCmd+Option+Z
Next ChangeCtrl+Alt+Shift+DownCtrl+Option+Shift+Down
Previous ChangeCtrl+Alt+Shift+UpCtrl+Option+Shift+Up

Comparing files 8

ActionWindows / LinuxMac
Show DiffCtrl+DCmd+D
Compare FilesSelect two files, or one file to compare its versions; the diff opens in a new tab.Ctrl+DCmd+D
Next DifferenceIn the diff viewer F7 moves between differences; in a debug session it is Step Into.F7F7
Previous DifferenceShift+F7Shift+F7
Accept Left SideThe Mac chord is Cmd and Ctrl with the Right arrow.Ctrl+Alt+RCmd+Ctrl+Right
Accept Right SideThe Mac chord is Cmd and Ctrl with the Left arrow.Ctrl+Alt+ACmd+Ctrl+Left
Select Opposite Diff PaneMoves the caret between the left and the right pane of the viewer.Ctrl+Shift+TabCtrl+Shift+Tab
Diff viewer settingsPops up a menu of the most commonly used diff commands.Ctrl+Shift+DCmd+Shift+D

Database tools 18

The Database tool window itself has no default key: the vendor table lists Show Database window with N/A, unlike the numbered tool windows.

ActionWindows / LinuxMac
New query consoleCreates another query console for the data source selected in the Database tool window.Ctrl+Shift+QCmd+Shift+L
Jump to Query ConsoleLists the consoles of the selected data source; New Query Console is one of the choices.Ctrl+Shift+F10Cmd+Shift+F10
Open default query consoleClick the data source in the Database tool window first.F4Cmd+Down
Execute statementRuns the statement at the caret in a query console; with several statements you choose which to run.Ctrl+EnterCmd+Return
Browse Query HistoryOpens the Query History dialog with the statements run earlier.Ctrl+Alt+ECmd+Option+E
Select object in Database viewSelect the name of a table or column in your code first.Alt+Shift+BOption+Shift+B
Add RowData editor: inserts a new row, which is saved to the database once you submit it.Alt+InsertCmd+N
Delete RowData editor: removes the selected row or rows.Ctrl+YCmd+Backspace
Revert SelectedData editor: restores the selected cells to their previous values.Ctrl+Alt+ZCmd+Option+Z
Submit changesData editor: sends the local edits to the database server.Ctrl+EnterCmd+Return
Submit and CommitFor the manual transaction mode: submits the edits and commits the transaction.Ctrl+Alt+Shift+EnterCmd+Option+Shift+Return
Reload PageData editor: fetches the table data again from the database.Ctrl+F5Cmd+R
Set cell to DEFAULTCtrl+Alt+DCmd+Option+D
Set cell to NULLCtrl+Alt+NCmd+Option+N
Open in Value EditorEdits the data of the cell in a dedicated editor instead of inline.Shift+EnterShift+Return
Go to RowData editor: jumps to the row and column you type in the dialog.Ctrl+GCmd+L
Full-Text SearchSearches the data itself across the selected databases, not object names.Ctrl+Alt+Shift+FCmd+Option+Shift+F
Cancel Running StatementsCtrl+F2Cmd+F2

Tool windows 22

ActionWindows / LinuxMac
Show Project windowTool windows have number keys: Alt with the digit on Windows, Cmd with it on a Mac.Alt+1Cmd+1
Show Bookmarks windowAlt+2Cmd+2
Show Find windowAlt+3Cmd+3
Show Run windowAlt+4Cmd+4
Show Debug windowAlt+5Cmd+5
Show Problems windowAlt+6Cmd+6
Show Structure windowAlt+7Cmd+7
Show Services windowAlt+8Cmd+8
Show Version Control windowAlt+9Cmd+9
Show Commit windowAlt+0Cmd+0
Show Terminal windowPressed while the terminal has the focus, it closes the Terminal tool window.Alt+F12Option+F12
Hide Active Tool WindowShift+EscShift+Esc
Hide All Tool WindowsLeaves only the active editor visible; with split editors the active one is maximized.Ctrl+Shift+F12Cmd+Shift+F12
Focus last tool windowMoves the focus from the editor back to the tool window used last.F12F12
Maximize Tool WindowStretches the active tool window to its greatest width or height.Ctrl+Shift+'Cmd+Shift+'
Stretch to LeftThe four Stretch chords resize the active tool window; a Mac drops Shift from them.Ctrl+Alt+Shift+LeftCtrl+Option+Left
Stretch to RightCtrl+Alt+Shift+RightCtrl+Option+Right
Stretch to TopCtrl+Alt+Shift+UpCtrl+Option+Up
Stretch to BottomCtrl+Alt+Shift+DownCtrl+Option+Down
Restore default layoutReturns the tool windows to the Default layout.Shift+F12Shift+F12
New terminal tabStarts another shell session in the Terminal tool window; Cmd with T on a Mac.Ctrl+Shift+TCmd+T
List terminal tabsAlt+DownCtrl+Shift+Down

Notes

Finding PHP classes, interfaces and tests

Classes have a finder of their own on Ctrl + N, and Ctrl + Alt + Shift + N looks up any other symbol by name. Ctrl + B on a method call opens its declaration, and inside an overriding method Ctrl + U climbs to the parent version; on an interface name, Ctrl + Alt + B lists the classes that implement it, while Ctrl + H opens the class tree, ancestors and descendants alike, in the Hierarchy tool window. Ctrl + Shift + T hops from a class to its test and back; when there is no single match, a popup lets you pick a test or create one. A @covers annotation keeps that link working for PHPUnit and Codeception tests whose names break the naming convention. Mac users press Cmd + O, Cmd + Option + O, Cmd + B, Cmd + U, Cmd + Option + B and Cmd + Shift + T; the hierarchy chord is identical there.

Writing PHP: imports, PHPDoc and Composer

When code refers to a class from another namespace, Alt + Enter offers to import it; accepting inserts the use statement among the file's imports and leaves the caret in place. Ctrl + Alt + O later strips unused imports from the file, or from every file of a selected directory. Typing /** above a function and pressing Enter writes a PHPDoc stub with the parameters and return value PhpStorm can infer; inside such a block Ctrl + Space suggests tag names, and Ctrl + Alt + Q flips the comment into a rendered view and back. In composer.json the completion key proposes package names and versions, and Alt + Enter on a declared but missing package offers to install it. Alt + Insert generates constructors, accessors and PHPDoc blocks, Ctrl + O and Ctrl + I add overridden or interface methods, and Ctrl + J lists live templates such as fore, which expands to a foreach loop. With the macOS keymap these are Option + Return, Ctrl + Option + O, Ctrl + Option + Q, Cmd + N and Cmd + J, with Override and Implement left on Ctrl.

Running scripts, PHPUnit and Xdebug sessions

Shift + F10 starts whatever configuration the Run widget shows and Shift + F9 launches the same configuration in debug mode. Alt + F2 previews the open PHP file in a browser through the built-in web server, provided a local PHP interpreter is configured. In a PHPUnit class, Ctrl + Shift + F10 runs the test method or class holding the caret, and Ctrl + Alt + F6 opens the coverage reports. Listening for Xdebug has no key: it is the Start Listen PHP Debug Connections toggle on the toolbar or status bar. While a request is suspended, step with F8 and F7, leave a function with Shift + F8, let it continue with F9, and test an expression with Alt + F8. Exception breakpoints, which halt on a thrown exception or error or on a PHP notice or warning, are added in the dialog behind Ctrl + Shift + F8. Mac equivalents: Ctrl + R, Ctrl + D, Option + F2, Ctrl + Shift + R, Cmd + Option + F6, Cmd + Option + R to resume, Option + F8 and Cmd + Shift + F8; the step keys stay the same.

Command line tools, HTTP requests and SQL

Two quick presses of Ctrl (Ctrl, Ctrl) open Run Anything, which launches the commands of configured PHP tools such as Composer, the Symfony console or Laravel Artisan; Laravel support itself comes from the Laravel Idea plugin, which now ships with PhpStorm. A scratch file made with Ctrl + Alt + Shift + Insert can be an HTTP Request file whose requests run straight from the editor. For SQL, Ctrl + Shift + Q adds a query console for the data source picked in the Database tool window, Ctrl + Enter executes the SQL under the caret, and Alt + Shift + B on a table name in your code reveals that table in the Database view. Ctrl + Alt + Shift + F searches the stored rows themselves rather than object names.

Questions

How do I run one PHPUnit test method?

Place the caret inside the method and press Ctrl + Shift + F10; the macOS keymap uses Ctrl + Shift + R. With the caret on the class instead, every test in the class runs. PhpStorm creates a run configuration with default settings that can be saved for reuse, and a test fed by a data provider can be run one data set at a time from the gutter icon beside that set.

How do I add the use statement for a class from another namespace?

With the caret on the class name, Alt + Enter offers the import; in the macOS keymap the key is Option + Return. PhpStorm writes the use statement into the imports section while your caret keeps its place, and Ctrl + Alt + O cleans out imports that are no longer needed.

Which key lists the classes that implement a PHP interface?

Ctrl + Alt + B on the interface name, or Cmd + Option + B in the macOS keymap, pops up the implementing classes. For the whole inheritance tree use Ctrl + H, which both keymaps share.

Can I start listening for Xdebug connections from the keyboard?

PhpStorm ships no key for it. The help switches listening on with the Start Listen PHP Debug Connections button on the toolbar or status bar. Once Xdebug suspends the script, F7 enters a call, F8 moves past it and F9 lets the request run on.

How do I write a PHPDoc block quickly?

Type /** on the line above a function, method or class and press Enter, and PhpStorm fills in a stub with the parameters and return value it can work out. To cover several constructs at once, open Alt + Insert (Cmd + N on a Mac) and choose Generate PHPDoc blocks. Ctrl + Alt + Q then shows the comment rendered.

Can I run Composer or Artisan commands without a terminal?

Yes: press Ctrl twice to open Run Anything and type the command. The help names Composer, the Symfony console and Laravel Artisan among the PHP command line tools it can launch once they are configured. Alt + F12 opens the Terminal tool window if you prefer a shell.

Which keymap does the Mac column follow?

The macOS keymap, the default PhpStorm suggests on a Mac. The help names two other Mac keymaps that this page does not list: IntelliJ IDEA Classic, a legacy set close to the Windows bindings, and macOS System Shortcuts, designed to keep clear of the system's own keys.

Sources and checks

29 more source pages

Every row on this page was matched to a line in the documentation above on . A binding that could not be found there is not listed.

3 rows from the earlier version of this page were removed in that check: duplicates, and bindings the documentation does not list or lists differently.

Found a wrong or missing key? Tell us and it gets checked against the source. How we verify describes the process and its limits.