Blog

How to make coding tutorial videos on a Mac

A laptop with a code editor, glowing keycaps and a shield protecting a key
Readable code, visible shortcuts, no leaked keys: the three jobs of a coding tutorial.

A coding tutorial has three jobs a normal screen recording doesn't: the code has to be readable on a phone, viewers need to see the shortcuts you press, and no API key, email or password can ever appear on screen. Here's the Mac setup that covers all three, for VS Code, the terminal and the browser, before you press record.

Make the code readable on a phone

A full-size editor at your normal font is unreadable once YouTube shrinks it into a phone screen or an embedded player. Most people don't watch fullscreen. Fix it at the source. Zooming in afterwards only enlarges blurry pixels.

  • Bigger fonts. Advice ranges from 16 to 20 points. For a 1080p video, 18–20 in the editor and 16–18 in the terminal holds up on a phone.
  • A smaller window. Record a 1280 × 720 point window instead of the full screen. The same font takes up more of the frame, and on a Retina Mac it still records at 2560 × 1440 pixels.
  • Less chrome. Turn off the minimap and breadcrumbs, and use Zen Mode (⌘K Z) when you only need the editor.
  • A high-contrast theme. Low-contrast themes that look calm on your screen turn into grey mush after YouTube's compression.

Put all of it in a separate VS Code profile called "Recording" (Code → Settings → Profiles), so your everyday setup stays untouched. These are the settings I'd start with:

{
  "editor.fontSize": 20,
  "terminal.integrated.fontSize": 18,
  "editor.minimap.enabled": false,
  "breadcrumbs.enabled": false,
  "window.zoomLevel": 1
}

Show the shortcuts you press

"And then I just…" is the most frustrating moment in a coding tutorial: something happened and the viewer has no idea which keys did it. There are three ways to put the keys on screen:

OptionCostWorks inWatch out for
VS Code Screencast ModeFree, built inVS Code onlyShows every key by default, including what you type
KeyCastrFree, open sourceEvery appNeeds Accessibility permission to work
Overlay built into the recorderComes with the recorderEvery appDepends on the recorder

VS Code Screencast Mode

Open the Command Palette (⌘⇧P) and run Toggle Screencast Mode. Out of the box it shows every keystroke, including plain typing, which is noisy and can show things you'd rather not. Turn off raw keys so only shortcuts and the commands they run appear, and move the overlay away from your code. These setting names are from VS Code 1.146:

{
  "screencastMode.keyboardOptions": {
    "showKeys": false,
    "showKeybindings": true,
    "showCommands": true,
    "showCommandGroups": false,
    "showSingleEditorCursorMoves": false
  },
  "screencastMode.fontSize": 48,
  "screencastMode.verticalOffset": 10
}

It stops at the edge of VS Code. When you switch to the terminal app or the browser, the keys disappear.

KeyCastr

KeyCastr is a free, open-source Mac app that shows keys system-wide. If it shows nothing, which is a common complaint, it's almost always permissions: open System Settings → Privacy & Security → Accessibility, allow KeyCastr, then restart it. Like Screencast Mode, check what it displays before you type anything private on camera.

Keep secrets out of the frame

The rule from security folks is blunt: treat any key that has appeared in a video as public, and rotate it. Video gets downloaded, re-uploaded and archived. Deleting your upload doesn't take it back.

So plan so nothing real is ever on screen:

  • Use a throwaway key. Create a key for the recording with tight limits, and revoke it when you're done.
  • Never open .env on camera. Show .env.example with placeholder values instead.
  • Shorten your terminal prompt. The default zsh prompt shows your username and computer name. PROMPT='%1~ %# ' shows only the current folder.
  • Use a clean browser profile. Autocomplete drop-downs love to show your email address, and the bookmarks bar shows your clients.
  • Turn on a Focus mode. A Slack preview sliding in from the corner is a leak too.

If something slips through anyway, blur it before you publish. Watch out with code: a fixed blur box stops covering the key the moment you scroll. You need a blur that tracks the content, or you have to keyframe the box by hand, frame by frame.

Recording the session

  • Record in sections. One concept per clip. A typo or a failed build costs you one section, not the whole video.
  • Decide: live or voiceover. Talking while you type feels natural but slows you down. Recording the screen silently and narrating over it afterwards gives cleaner audio. Both are fine; pick one per video.
  • Leave real mistakes in sometimes. A failing test you then fix teaches more than a perfect run.
  • Zoom where the action is. Clicking into a file or a menu is a good moment to zoom in. Long stretches of typing are better with a steady view of the whole function.

Captions and publishing

Add captions. Lots of people watch tutorials on mute at work. Automatic transcription, whether YouTube's or any other, struggles with function names, library names and acronyms, so read the captions before you publish. Upload them to YouTube as an .srt file rather than relying on its auto-captions.

For YouTube Shorts, everything goes up a size again. A 9:16 frame is narrow, so show one small function at a time at a much bigger font.

The tools, honestly

The free stack works: QuickTime or OBS to record, Screencast Mode or KeyCastr for keys, and a video editor to blur anything that leaks.

I make CursorFlow, a Mac screen recorder, and a few of its features exist exactly for coding videos:

  • A keystroke overlay that works in every app and only records shortcuts: keys pressed with ⌘, ⌃ or ⌥, plus navigation keys like Escape and the arrows. Plain typing is never recorded or saved, so a typed password can't end up on screen.
  • Privacy masks that follow the content as you scroll, tracked on your Mac with Apple's Vision framework.
  • Automatic zoom on clicks, which you can adjust or override on the timeline for long typing stretches.
  • On-device captions, burned in or exported as .srt.

It's free to use, with a watermark on exports until you buy the one-time licence. For the general recording checklist, see how to record a product demo on Mac. For a full YouTube pipeline, see recording a YouTube tutorial on Mac.

Frequently asked questions

What font size should I use for coding tutorials?
For a 1080p video, 18–20 points in the editor and 16–18 in the terminal stays readable on a phone. Go bigger again for vertical Shorts.
How do I show keystrokes in VS Code?
Open the Command Palette with Command-Shift-P and run Toggle Screencast Mode. In settings, set screencastMode.keyboardOptions with showKeys false and showKeybindings true, so it shows shortcuts and not everything you type.
Why is KeyCastr not working on my Mac?
Usually a missing permission. Open System Settings, Privacy & Security, Accessibility, allow KeyCastr, then restart the app.
I showed an API key in a published video. What should I do?
Rotate the key right away. Deleting or re-uploading the video doesn't help, because copies may already exist.
Should I narrate while I code or add a voiceover later?
Both work. Narrating live feels natural but slows you down; a silent recording with a voiceover afterwards gives cleaner audio. Pick one approach per video.