Skip to content
Back to home
Back to blog
Tips

Keyboard Shortcuts & Productivity in PocketCode

Master keyboard shortcuts, snippets, and productivity tricks to code faster from your Android device.

Updated:
6 min
By Pelayo Naredo
Keyboard Shortcuts & Productivity in PocketCode

Keyboard Shortcuts & Productivity in PocketCode

Coding on mobile can be fast if you know the right tools. Every shortcut below is real: it's the same list the editor shows under Tools › Keyboard Shortcuts (Ctrl + Shift + /), generated from its own command registry.

Keyboard shortcuts

Editing

ShortcutAction
Ctrl + ZUndo
Ctrl + Shift + Z / Ctrl + YRedo
Ctrl + D / Ctrl + Shift + DDuplicate line
Ctrl + Shift + KDelete line
Ctrl + Shift + ↑/↓ / Alt + ↑/↓Move line up/down
Ctrl + /Toggle comment
Ctrl + ] / Ctrl + [Indent / outdent
Ctrl + Shift + LAdd cursors to all occurrences
Ctrl + SpaceTrigger autocomplete
Shift + Alt + FFormat document
F2Rename symbol
Ctrl + .Quick fixes
Ctrl + Shift + OOrganize imports
Ctrl + S / Ctrl + Shift + S / Ctrl + Alt + SSave / Save as / Save all
ShortcutAction
Ctrl + PQuick open (files)
Ctrl + Shift + PCommand palette
Ctrl + GGo to line
F12 / Alt + F12Go to definition / peek
Shift + F12Find references
Ctrl + Tab / Ctrl + Shift + TabNext / previous tab
Ctrl + WClose tab
Ctrl + Shift + TReopen closed tab
Ctrl + Shift + EExplorer
F8 / Shift + F8Next / previous problem
Ctrl + Shift + MProblems panel
Ctrl + \Split editor
F6 / Shift + F6Move between regions of the screen
F11Zen mode (outside a debug session)

Search, run and more

ShortcutAction
Ctrl + FFind in file
Ctrl + HFind and replace
Ctrl + Shift + FFind in project
F5 / Ctrl + F5Run file / Run with…
Shift + F5Debug file
F9Toggle breakpoint on the cursor line
F5 / F10 / F11While debugging: continue / step over / step into
Ctrl + Shift + GSource control
Ctrl + IAsk the AI
Ctrl + Alt + KToggle bookmark
Ctrl + Alt + L / Ctrl + Alt + JNext / previous bookmark

Snippets

Open Snippets Library from the palette or the Edit section of the menu. It has three sources:

  • Built-in — 81 snippets across Kotlin, Java, Python, JavaScript, TypeScript, HTML, CSS, Go, Rust, Swift, SQL, Shell, Dart, C, C++, Ruby and PHP. For example: cl (console.log), imp (import), expd (export default), af (arrow function) and tryc (try/catch) in JavaScript; def, class, ifmain, tryex and with in Python; fn, impl, match and struct in Rust.
  • Your own — create them with a name, prefix, language and body, and export or import them as JSON. The free plan keeps up to 5.
  • The Marketplace catalog — curated snippets you install from the editor.

Pick one and it's inserted at the cursor.

Productivity tricks

Multi-cursor

Put the cursor on a word and press Ctrl + Shift + L (or use Add Cursors to All Occurrences in the menu): every occurrence gets a cursor, and whatever you type — including from the on-screen keyboard — goes to all of them.

For one extra cursor at a time, hold Alt and tap (or click) where you want it; Alt + tap on an existing cursor removes it. It needs a physical keyboard or a mouse — on a phone without one, use the occurrences command above.

Emmet

Type an HTML or CSS abbreviation and run Expand Emmet Abbreviation from the palette or the Edit menu:

div.container>ul>li*5>a.link

Generates:

<div class="container">
	<ul>
		<li><a href="" class="link"></a></li>
		<li><a href="" class="link"></a></li>
		<li><a href="" class="link"></a></li>
		<li><a href="" class="link"></a></li>
		<li><a href="" class="link"></a></li>
	</ul>
</div>

Command palette

Ctrl + Shift + P (or a tap on the command key at the left of the symbol bar) opens the palette at the top of the screen. Type to run any editor action; start with @ to jump to a symbol or : and a number to go to a line.

Zen mode

F11 (or View › Zen mode) hides everything but the code and goes truly full screen. Leave it with Back, Esc, F11 or the floating button.

External keyboards

A Bluetooth keyboard works out of the box with all the shortcuts above. In Settings › Keybindings you can pick a scheme or rebind keys (PocketCode, VS Code, IntelliJ IDEA, Sublime Text, Atom): the editor follows the table for saving, find and replace, go to line, undo/redo, comment, duplicate and move line, tabs and the debugger, and the keys above keep working while the table doesn't give them to something else.

Touch, without a keyboard

  • Command key — tap it for the palette; drag it to move the cursor precisely; hold and drag to select
  • Symbol bar — the characters code needs, with a profile per language you can customize (Customize keys…)
  • Pinch — zoom the code in and out
  • Long press — a magnifier for placing the cursor

Mastering these shortcuts will transform your development experience in PocketCode. Start with the palette and the command key; the rest comes naturally.

The tool behind this article

Code Editor

Ready to try PocketCode?

Download the app and start coding from your mobile.