-
Notifications
You must be signed in to change notification settings - Fork 0
Usage
Cameron Rye edited this page Nov 19, 2025
·
1 revision
Learn how to use DosKit effectively.
The simplest way to use DosKit is to run the development server:
npm run devThis will start a DOS prompt that you can interact with directly in your browser at http://localhost:5173.
Once the emulator loads, you'll see a DOS command prompt. You can:
-
Type DOS commands -
dir,cd,cls, etc. -
Run programs - Navigate to directories and execute
.exeor.comfiles - Use keyboard shortcuts - Function keys, Ctrl combinations, etc.
- Click the menu button or press
Ctrl+O - Browse available DOS applications
- Click on an application to load it
- Wait for files to download and initialize
- The application will start automatically
Load specific applications directly via URL:
http://localhost:5173/?app=secondreality
http://localhost:5173/?app=impulsetracker
Features:
- URLs automatically update when you select an app
- Bookmarkable - save direct links to your favorite applications
- Browser navigation works (back/forward buttons)
- Refresh-safe - page refreshes maintain the loaded application
- Function Keys: F1-F12
- Arrow Keys: Navigation
- Enter: Execute command
- Escape: Cancel/Exit
- Tab: Auto-complete (in some applications)
- Ctrl+C: Interrupt program
- Ctrl+Break: Break execution
- F11: Toggle fullscreen
- Ctrl+F10: Release mouse capture
- Ctrl+F12: Speed up emulation
- Ctrl+F11: Slow down emulation
Audio is automatically unmuted when the emulator is ready. You can:
- Adjust volume in your browser tab
- Mute/unmute via browser controls
- Configure volume in the emulator settings
On mobile devices, DosKit provides:
- On-screen keyboard - Touch-friendly keyboard with common DOS keys
- Touch controls - Tap to interact
- Landscape mode - Optimized for landscape orientation
- Pinch to zoom - Zoom in/out on the screen
- Use landscape orientation for better experience
- Tap the keyboard icon to show/hide on-screen keyboard
- Use two-finger tap for right-click
- Swipe to scroll in applications that support it
To run your own DOS applications or games:
Create a new file in src/dos-apps/:
// src/dos-apps/my-app.config.ts
import type { DosApp } from '../types/dos-app';
export const myApp: DosApp = {
id: 'my-app',
name: 'My DOS Application',
description: 'Description of my app',
loader: async () => {
// Load your files here
return {
'myapp.exe': await fetch('/apps/myapp.exe').then(r => r.arrayBuffer()),
};
},
dosboxConf: `
[autoexec]
@echo off
mount c .
c:
myapp.exe
`,
};Put your DOS files in public/apps/:
public/
└── apps/
└── myapp/
├── myapp.exe
├── data.dat
└── config.cfg
Add your app to the application registry in src/dos-apps/index.ts.
Access the Command Interface for programmatic control:
import { useState } from 'react';
import { DosPlayer } from './components/DosPlayer';
import type { CommandInterface } from './types/js-dos';
function MyApp() {
const [ci, setCi] = useState<CommandInterface | null>(null);
const handleReady = (commandInterface: CommandInterface) => {
setCi(commandInterface);
// Now you can control DOS programmatically
commandInterface.simulateKeyPress(13); // Press Enter
};
return <DosPlayer onReady={handleReady} />;
}-
ci.pause()/ci.resume()- Control emulation -
ci.mute()/ci.unmute()- Audio control -
ci.screenshot()- Capture screen -
ci.fsReadFile()/ci.fsWriteFile()- File system access -
ci.save()/ci.load()- Save/load state
See API Documentation for complete API reference.
- Configuration - Customize DosKit
- Deep Linking - Learn about URL-based app loading
- PWA Features - Install as a native app
- Troubleshooting - Common issues and solutions
Made with ❤️ by Cameron Rye