Keyboard Shortcuts and Habits That Save Real Time With Copilot
I've watched testers open the command palette once, decide clicking is faster, and never touch it again. The cost is never one big delay. It's hundreds of small pauses a day, each one a moment where your attention leaves the problem to go find a button. Keyboard shortcuts aren't about looking fast in a screen recording. They keep your hands on the code and your head in the failure you're chasing.
The habits that save time have shifted now that GitHub Copilot and coding agents are in the editor. Typing is less of the work. Reading is more of it: reviewing a suggestion, checking an agent's diff, running the one test that proves the change is right. The shortcuts that matter most are the ones that make reading, navigating and verifying quick.
Everything below works in a stock VS Code install with a Python test project. I list Windows and Linux keys; on a Mac, Ctrl is usually Cmd and Alt is Option. I'll cover the editing shortcuts I use inside test files, the navigation habits that keep me out of the mouse, the Copilot keys worth learning, and the daily habits that matter more than any single keystroke.
Learn Node.js, Cucumber, GitHub Copilot, APIs, CI/CD, and modern automation by building a complete framework.
The shortcuts that matter inside a test file
- Ctrl+P, Quick Open. Type part of a filename and you're there. In a Behave project, Ctrl+P then
steps/authbeats clicking through the sidebar every time. - Ctrl+Shift+P, Command Palette. Everything without its own key lives here: format document, select the Python interpreter, run tests, reload the window.
- Ctrl+` (backtick), toggle the terminal. Ctrl+Shift+` opens a new terminal, so one can run tests while another stays free for Git or a quick request.
- Alt+Up / Alt+Down, move lines. Reorder assertions or steps without cut and paste.
- Ctrl+D, add next occurrence. With the cursor in a word, the first press selects it and each further press adds the next match. Safer than a file-wide replace when you only want some occurrences.
- Ctrl+Shift+L, select all occurrences. Every match at once, for a genuine rename within a file.
- Ctrl+/, toggle comment. Comment out an assertion to isolate a failure, then put it back.
- Alt+Click, extra cursors. Useful for editing several rows of a
parametrizelist at once.
Navigation habits that keep you out of the mouse
F12 and Alt+Left. Go to definition, then back. A step definition calls a helper that calls a client; F12 follows the chain and Alt+Left (Ctrl+- on a Mac) returns you to where you started. This pair is how I trace a failing assertion through three files without losing my place.
Ctrl+Shift+O and Ctrl+T. Go to a symbol in the current file, or anywhere in the workspace. When I can't remember which module holds a fixture, Ctrl+T and a few letters finds it. Good names make this work, which is one more reason to name fixtures for what they do.
Ctrl+\, split editor. Feature file on the left, step definitions on the right. Write the Gherkin, implement the step, no switching.
Ctrl+Shift+T. Reopen the editor you just closed. I use it more than I'd like to admit.
The common mistake is using the Explorer sidebar as your main navigation. It's fine for an overview and slow for jumping to files you know exist. Reach for Ctrl+P first; within a week it's automatic.
Copilot keys worth learning
If Copilot is in your editor, a handful of keys change how it feels to work with it:
- Tab accepts an inline suggestion and Esc dismisses it. Dismissing is the one people forget. A wrong suggestion you half-accept costs more than one you never took.
- Alt+] and Alt+[ cycle through alternative suggestions when there's more than one.
- Ctrl+I opens inline chat at the cursor. I use it for narrow, reviewable requests: "add a parametrize case for an empty string", not "write the tests for this module".
Keybindings change between releases and can be remapped, so if one doesn't work, search for the command in the Command Palette and check its binding there. The palette shows the current key next to each command.
Daily habits that compound
Run the focused test, not the whole suite
The biggest time sink I see is running everything to check one thing. In pytest, pytest tests/test_users.py::test_get_user_returns_email runs exactly one test, and -k filters by name. In Behave, point it at one feature file or use --name to match a scenario. The loop from change to answer shrinks from minutes to seconds, and that's where debugging time goes.
Verify every AI change with a run
This is the habit I'd add first for anyone using Copilot or an agent. Every accepted suggestion or agent edit gets one focused test run before I move on. Not because the code is usually wrong, but because "looks right" is exactly what generated code is good at. I also make one test fail on purpose (flip an expected value) to prove the new assertion can actually fail. A test that can't fail is decoration.
Review agent diffs keyboard-first
When an agent changes several files, I open Source Control with Ctrl+Shift+G and step through each changed file in the diff view rather than skimming a summary. I'm looking for the things agents slip in: a loosened assertion, a new skip, a mock that hides the behaviour under test. Staging individual lines from the diff lets me keep the good parts of a change and reject the rest. More on what to look for in reviewing AI-suggested test coverage before you commit it.
Snippets for the boilerplate you still type
Copilot fills a lot of boilerplate now, but a snippet is deterministic: it expands the same way every time, with your conventions. Open the Command Palette and run "Snippets: Configure User Snippets", then add something like this to your Python snippets:
"pytest api test": {
"prefix": "apitest",
"body": [
"def test_${1:name}(api_client):",
" response = api_client.${2:get}(\"${3:/path}\")",
" assert response.status_code == ${4:200}",
" $0"
],
"description": "API test with status assertion"
}
I go further with this in turning VS Code snippets into a personal test toolkit.
Keep a scratch terminal
One terminal for the test runner, one for throwaway commands: a quick request to check an endpoint is up, decoding a token, looking at a fixture. Right-click the tab to rename it. Your runner output stays readable.
Commit small
One scenario implemented, one bug reproduced, one commit. Small commits make agent work reviewable too: if an agent's change and your change land in one commit, nobody can tell later which was which.
Time-box debugging
If I've stared at a failure for twenty minutes with no clear hypothesis, I write down what I've ruled out and change approach. Sometimes that means asking a colleague. Sometimes it means asking an AI assistant to explain the traceback, with the list of what I've already ruled out pasted in so it doesn't send me round the same loop.
The compounding part
None of these is dramatic on its own. But Quick Open instead of the sidebar, focused runs instead of full ones, a test run after every AI change and a careful diff review add up to a noticeably shorter loop, because there's less friction and less rework. For the wider workflow these fit into, see developer workflows for testers. My API testing courses use VS Code and GitHub Copilot throughout, so you can build these habits on a real project.