Skip to content

Great for live coding presentations, impressing your friends, or just trying to look busy at work.

License

Notifications You must be signed in to change notification settings

nodename/vscode-hacker-typer

 
 

Repository files navigation

VSCode Hacker Typer

Hacker Typer allows you to record your keystrokes in VSCode, and to play them back either automatically or by typing random keys. Supports typing, editing, selections (including multicursor) and autocompletions.

This version is a fork of Jani Eväkallio's original extension.

😳 See it live in action: Writing Code Like a Real Hacker - Reactivate X, London

⬇️ Download the extension from Visual Studio Code Marketplace

Features

  • Record and play macros.
  • Insert stop points, so you don't accidentally overrun your talking points while "live coding."
  • Play macros back either automatically or by typing randomly.

How to use Hacker Typer

Status Bar

If you keep the status bar visible you can see the current state of the extension (View -> Appearance -> Show Status Bar).

Record a macro

  1. Open a file or a new VSCode window.
  2. If you want to use another macro's end state as your new macro's start state, execute HackerTyper: Load Macro's Final State from the command palette (or Cmd+Shift+T F).
  3. Execute HackerTyper: Record Macro command from the command palette (or Cmd+Shift+T R).
  4. The current content and selections of the active editor will be snapshotted.
  5. Start typing. Every edit is recorded into an in-memory buffer, including deletions, selection changes, etc.
  6. If you make a mistake you can back up by typing Cmd+Shift+T U (the Undo Last Recorded Buffer command).
  7. You can cancel recording with HackerTyper: Cancel Recording (Cmd+Shift+T C).
  8. When you're ready, execute HackerTyper: Save or Discard Macro command from the command palette (or Cmd+Shift+T S), and choose Save or Discard.
  9. Give your macro a name.
  10. You're done! Or if you wish, you can continue recording the macro.

Play a macro

  1. Open a file or a new VSCode window.
  2. Execute HackerTyper: Play Macro command from the command palette (or Cmd+Shift+T P).
  3. Choose your previously saved macro.
  4. The active workspace will be reset to the contents of the macro's starting point. If there is no active text editor, a new anonymous unsaved file will be opened.
  5. Start hammering your keyboard like a mad-person, or hit the '`' (backtick) key to play the macro back automatically. You can toggle in or out of autoplay mode at any time.
  6. WHOA HOW ARE YOU TYPING SO FAST
  7. You can cancel play with HackerTyper: Cancel Playing (Cmd+Shift+T X).
  8. Feel free to move around the file, highlight code etc. When you continue play, the next character will be inserted where you did while recording.

Stop points

While in recording mode, execute the HackerTyper: Insert Stop Point command from the command palette (or Cmd+Shift+T I).

When you hit a stop point in play mode, either manual or autoplay, a high sound ("beep") is played. You must press ENTER to break out of the stop point and continue playing. All other keystrokes are ignored until you break out.

If you're going to play the macro by hitting keys, you'll want to put a stop point at the end so you don't overrun the end and let your typed gibberish appear on screen. (If you don't do this, you'll be prompted to add a final stop point when you save the macro.)

You can turn off/on beeps by typing Cmd+Shift+T T (the HackerTyper: Toggle Silence command).

Command summary

For Windows, substitute Ctrl for Cmd.

Commands available in the IDLE state

Command Key Binding
HackerTyper: Record Macro Cmd+Shift+T R
HackerTyper: Play Macro Cmd+Shift+T P
HackerTyper: Delete Macros Cmd+Shift+T D
HackerTyper: Export Macro Cmd+Shift+T E
HackerTyper: Import Macro Cmd+Shift+T M
HackerTyper: Load Macro's Final State Cmd+Shift+T F

Export and Import were implemented by Kael Kirk.

Commands available in the RECORD state

Command Key Binding
HackerTyper: Insert Stop Point Cmd+Shift+T I
HackerTyper: Undo Last Recorded Buffer Cmd+Shift+T U
HackerTyper: Save or Discard Macro Cmd+Shift+T S
HackerTyper: Cancel Recording Cmd+Shift+T C

NOTE! The only ways to exit the recording state are Cancel Recording and Save or Discard Macro.

Commands available in the PLAY state

Command Key Binding
HackerTyper: Cancel Playing Cmd+Shift+T X
HackerTyper: Toggle Silence Cmd+Shift+T T
toggle autoplay mode ` (backtick)

Current limitations

  • Only supports single file macros #11
  • When starting from existing active editor, the document language is not restored from the macro (see vscode#1800)

License

MIT

About

Great for live coding presentations, impressing your friends, or just trying to look busy at work.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 100.0%