Lightweight on-screen annotation tool for Windows, built with AutoHotkey v2 and GDI+.
Draw directly on top of any screen with multiple tools (freehand, line, rectangle, ellipse, circle, arrow), configurable hotkeys, and an INI-based settings system. Run it as source (.ahk) or as a compiled standalone .exe.
- Fast overlay drawing with GDI+ anti-aliased rendering
- Drawing tools: freehand, straight line, rectangle, ellipse, circle, arrow
- Dynamic line width and opacity controls
- Color palette with single-key shortcuts (fully configurable in
settings.ini) - Built-in hotkeys help dialog (F1 by default, configurable in
settings.ini) - Undo and Redo support for all drawing actions, including clearing the screen
- Clear all drawings while in drawing mode with a single key or button
- Right-click in-place settings panel: color picker, line width, opacity, quick actions
- Pen cursor while drawing mode is active
- Always-on-top help and info windows that don't get lost behind the overlay
- Multi-monitor support — starts on the monitor the mouse cursor is on
- Per-monitor DPI awareness with multiple fallbacks for mixed-scaling setups
- Shapes are preserved across drawing sessions (within the same monitor)
- Remembers your last used drawing settings (color, line width, opacity) across application restarts
- Windows
- AutoHotkey v2.x (for source usage only)
Gdip_all.ahkin the same folder as the main script
If you use the compiled .exe, AutoHotkey installation is not required.
- Install AutoHotkey v2.
- Keep these files in the same directory:
On Screen Drawing.ahkGdip_all.ahksettings.ini(optional — defaults are applied automatically)app_icon.ico(optional — used for the tray icon)
- Run
On Screen Drawing.ahk. - Press Ctrl+F9 (default) to start drawing mode.
- Download the latest release
.exefrom the Releases page. - Optionally place
settings.ininext to the.exefor custom settings. - Run the executable.
| Hotkey | Action |
|---|---|
| Ctrl+F9 | Toggle drawing mode on/off |
| F1 | Show hotkeys help |
| Ctrl+Shift+F12 | Exit the application |
| Hotkey / Action | Description |
|---|---|
| Esc | Clear all drawings |
| Backspace | Undo last drawing action (can restore a cleared screen) |
| Shift+Backspace | Redo last undone action |
| XButton1 (Mouse Back) | Undo last drawing action (can restore a cleared screen) |
| XButton2 (Mouse Forward) | Redo last undone action |
| Ctrl+NumpadAdd | Increase line width |
| Ctrl+NumpadSub | Decrease line width |
| WheelUp / WheelDown | Increase / decrease line width |
| Right-click on overlay | Open in-place settings panel |
| Modifier | Tool |
|---|---|
| (none) | Freehand |
| Shift | Straight line |
| Ctrl | Rectangle |
| Alt | Ellipse |
| Ctrl+Alt | Circle (radius = max of X/Y drag distance) |
| Ctrl+Shift | Arrow (with auto-sized filled arrowhead) |
| Key | Color | Key | Color | Key | Color |
|---|---|---|---|---|---|
| r | Red | m | Magenta | s | Brown |
| g | Green | c | Cyan | w | White |
| b | Blue | o | Orange | n | Gray |
| y | Yellow | v | Violet | k | Black |
Color hotkeys are only active while drawing mode is on and the mouse cursor is on the active monitor.
Right-clicking anywhere on the overlay opens a compact floating panel that includes:
- Color grid — shows configured colors in a 3-column grid. The active color is marked with a ✓ checkmark, and hotkey hints are displayed on each swatch by default.
- Line width — numeric edit field with up/down spinner (1–10 by default).
- Opacity — numeric edit field with up/down spinner (0–255).
- Quick action buttons:
- Undo / Redo
- Clear — removes all drawings
- Help — shows the hotkeys help dialog
- Stop drawing — exit drawing mode
- Exit application
The panel snaps to within the active monitor's bounds. Press Esc or click away to close it.
Right-clicking the tray icon shows:
- About — shows app and author information
- Hotkeys Help — displays all active hotkeys
- GitHub repo — opens the project repository
- Open settings.ini — opens the config file in Notepad
- Reset to Defaults — restores original settings
- Reload Script — reloads the application
- Start/Stop Drawing — toggles drawing mode
- Exit — closes the app
The app reads settings.ini from the script/exe directory on startup. Missing keys fall back to defaults. You can reset the file to defaults at any time via the tray menu.
| Key | Description | Default |
|---|---|---|
StartupLineWidth |
Initial stroke width | 2 |
MinLineWidth |
Minimum allowed width | 1 |
MaxLineWidth |
Maximum allowed width | 10 |
DrawAlpha |
Drawing opacity (0–255; 255 = fully opaque) | 200 |
FrameIntervalMs |
Overlay redraw interval (milliseconds) | 16 |
MinPointStep |
Min distance for freehand points | 3 |
ClearOnExit |
Discard shapes when closing overlay | false |
ShowColorHints |
Show hotkey hints on color swatches | true |
SaveLastUsedOnExit |
Remember color, width, opacity on exit | true |
MaxHistorySize |
Maximum undo steps to retain | 200 |
| Key | Description | Default |
|---|---|---|
ToggleDrawingMode |
Start/Stop drawing | ^F9 |
ExitApp |
Close application | ^+F12 |
ClearDrawing |
Clear all shapes | Esc |
UndoDrawing |
Remove last shape | Backspace |
RedoDrawing |
Restore last removed shape | +Backspace |
IncreaseLineWidth |
Line width + | ^NumpadAdd |
DecreaseLineWidth |
Line width - | ^NumpadSub |
HotkeysHelp |
Show help window | F1 |
On Screen Drawing.ahk(Main script)Gdip_all.ahk(Required library)settings.ini(Config file)app_icon.ico(Icon)
- Persistent Settings: The application now automatically saves your last used color, line width, and opacity when exiting, and restores them on the next launch. Two new INI settings (
SaveLastUsedOnExit,MaxHistorySize) have been added. - Performance Optimization: Major improvements to the freehand drawing tool to avoid memory bottlenecks and provide significantly smoother drawing.
- Code Organization: Restructured configuration classes and grouped global variables to improve reliability and adhere strictly to DRY principles.
- UI Enhancement: Added hotkey hints to the color swatches in the right-click settings panel to improve discoverability.
- New Setting: Introduced the
ShowColorHintsoption insettings.inito allow users to disable the new color hotkey hints if desired. This is enabled by default.
- Enhanced Undo/Redo: Added support for undoing "Clear Drawing" actions, allowing users to restore all shapes after a total clear.
- Interaction Fixes: Resolved an issue where the mouse wheel interfered with numeric editboxes in the settings panel; wheel scrolling now correctly adjusts the focused control's value.
- Code Refactoring & Optimization: Major internal architecture update, centralizing application state and logic (using a unified
Appobject andDrawingColorsclass) for improved reliability and performance.
- Re-do Support: Restored shapes are preserved in a stack; added
RedoLastShapefunctionality. - Mouse Shortcuts: Fast undo/redo using mouse side buttons (XButton1 and XButton2).
- Improved Settings GUI:
- Added Clear Drawing and Help buttons to the panel.
- Reordered action buttons for better workflow (Help, Exit Drawing, Exit App).
- UI Fixes:
- Help (F1) and About windows now stay on top and handle focus correctly during drawing (Modal-like overlay behavior).
- Added a configurable
HotkeysHelpaction with F1 as the default shortcut. - Added
AboutandGitHub repoitems to the tray menu. - Updated tray menu labels to show the assigned hotkeys for drawing toggle, help, and exit actions.
- Added a pen cursor while drawing mode is active.
- Improved the floating settings panel so it hides and reopens cleanly instead of being recreated each time.
- Improved settings panel state syncing for the selected color, line width, and opacity controls.
- Initial public release.
- Included overlay drawing tools for freehand, line, rectangle, ellipse, circle, and arrow.
- Included configurable hotkeys, color shortcuts, tray menu actions, and
settings.inisupport.
Nothing happens when pressing the toggle hotkey
- Check
ToggleDrawingModeinsettings.ini. - Ensure no other application is capturing the same hotkey combination.
Error about GDI+ or screen capture on startup
- Verify that
Gdip_all.ahkexists in the same folder as the script and is compatible with AHK v2.
Wrong position or scale on multi-monitor / mixed-DPI setups
- The script applies per-monitor DPI awareness with multiple fallbacks. Restart the app after changing monitor layout or DPI settings.
Color hotkeys do not work while drawing
- Confirm all
[Colors]entries follow the0xRRGGBBformat. - Make sure the mouse cursor is on the active drawing monitor — color hotkeys are restricted to that monitor.
Shapes disappear when re-entering drawing mode
- Check that
ClearOnExitis set tofalseinsettings.ini. - Note: switching to a different monitor always resets the shape list.
Issues and pull requests are welcome on GitHub.
When reporting a bug, please include:
- Windows version
- AutoHotkey version (if running from source)
- Your
settings.inicontents - Steps to reproduce the issue
- Gdip_all.ahk by buliasz — GDI+ wrapper library for AutoHotkey v2
Mesut Akcan
- GitHub: akcansoft
- Blog: akcansoft.blogspot.com
- Blog: mesutakcan.blogspot.com
- YouTube: youtube.com/mesutakcan


