Overview
VSCode Typing Simulator provides several configuration options to customize your typing simulation videos. All configuration is done by modifying parameters in the Python code.Window Size Configuration
The VSCode window size is configured through theVSCodeMockup class initialization:
vscode_mockup.py
Default Values
- Width:
1280pixels - Height:
720pixels (HD resolution)
Changing Window Size
To use a different resolution, modify the initialization incapture.py:
Typing Speed Configuration
The typing speed determines how fast characters appear in the simulation.Default Typing Speed
vscode_mockup.py
- Default delay:
0.1seconds per character - Effective speed: 10 characters per second
- Lines per minute: Approximately 30-40 (depending on line length)
Adjusting Typing Speed
Modify thedelay parameter when calling simulate_typing:
The delay applies to every character, including whitespace and newlines. A lower delay creates faster typing, while a higher delay makes it more deliberate.
Font Size Settings
Font configuration affects both the code text and UI elements.Code Font Size
vscode_mockup.py
- Default size:
14pixels - Font: Cascadia Code (or Consolas fallback)
Title Bar Font
vscode_mockup.py
- Default size:
12pixels - Font: Segoe UI
Changing Font Sizes
Modify the font initialization inVSCodeMockup.__init__:
Window Margins and Dimensions
The VSCode window is positioned with margins from the desktop edges.Margin Configuration
vscode_mockup.py
Default Values
| Property | Value | Description |
|---|---|---|
window_margin | 100 | Distance from screen edges (left/right) |
title_bar_height | 30 | Height of the title bar |
window_width | width - 200 | Calculated: screen width minus margins |
window_height | height - 150 | Calculated: screen height minus 1.5× margin |
Text Layout Settings
vscode_mockup.py
| Property | Value | Description |
|---|---|---|
line_height | 20 | Vertical spacing between lines |
char_width | 8 | Approximate character width |
left_margin | 50 | Space for line numbers |
Customizing Layout
To adjust the window positioning and spacing:Custom Margins Example
Window Control Buttons
The macOS-style window control buttons can be configured:vscode_mockup.py
vscode_mockup.py:draw_window_buttons
- Button diameter:
12pixels - Button spacing:
8pixels between buttons
Video Output Settings
The video encoding is configured incapture.py:
capture.py
Video Parameters
| Parameter | Value | Description |
|---|---|---|
| Codec | MJPG | Motion JPEG codec |
| Frame Rate | 30.0 | Frames per second |
| Format | AVI | Container format |
| Resolution | (1280, 720) | Video dimensions |
The
screen_size in record_video should match the VSCodeMockup dimensions for proper recording.Configuration Example
Here’s a complete example with custom configuration:capture.py (modified)
Best Practices
Next Steps
Customization
Customize colors, backgrounds, and visual styling
Examples
See real-world examples and use cases