https://github.com/benjikuo/desktop-screen-pen
A tool that allows users to draw anywhere on the screen.
https://github.com/benjikuo/desktop-screen-pen
desktop draw pen screen
Last synced: 2 months ago
JSON representation
A tool that allows users to draw anywhere on the screen.
- Host: GitHub
- URL: https://github.com/benjikuo/desktop-screen-pen
- Owner: Benjikuo
- License: mit
- Created: 2025-11-16T02:17:52.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2026-02-26T08:25:50.000Z (5 months ago)
- Last Synced: 2026-02-26T15:40:21.719Z (5 months ago)
- Topics: desktop, draw, pen, screen
- Language: Python
- Homepage:
- Size: 18.6 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Desktop-screen-pen


A tool that allows users to draw anywhere on the screen.
## π οΈ Why I Built This
- I often need to jot down notes, highlight ideas, or illustrate concepts directly on my desktop.
- Being able to turn my computer into a simple **βblackboardβ** whenever I need it is super handy.
- Iβm also using this project as a chance to get better at building desktop apps with **PySide2 / Qt**.
## π§© Features
- βοΈ **Free Drawing** β Draw anywhere on your screen with smooth strokes
- Β βΒ **Eraser Tools** β Normal eraser + rectangular crop eraser
- π¨ **Brush Controls** β Change size, shape, and 7 colors instantly
- β©οΈ **Undo / Redo** β Full history tracking for every stroke
- πΌοΈ **Screenshot Export** β Save with black or transparent background
- π§° **Floating Toolbar** β Quick access to all tools in one place
## π Project Structure
```
Desktop pen/
βββ image/
β βββ toolbar/ # toolbar icon
β βββ showcase/ # Demonstration gif
βββ main.py
βββ window.py
βββ toolbar.py
βββ controller.py
βββ canva.py
βββ LICENSE # MIT license
βββ README.md # Project documentation
```
## π Dependencies
This project uses **PySide2 (Qt5 bindings for Python)** for the GUI and **mss** for screen capture.
## βοΈ Requirements
Install dependencies before running:
```bash
pip install PySide2 mss
```
## βΆοΈ How to Run
1. Clone & run:
```bash
git clone https://github.com/Benjikuo/Desktop-screen-pen.git
python main.py
```
2. Draw on the screen with a floating toolbar at the top for all drawing controls.
## π» Keyboard and Mouse Controls
### [Keyboard]
**Mode Toggles:**
| Key | Action | Mode |
|-----|--------|-------------|
| `1` | Toggle the **board** | transparent / black |
| `2` , `Z` | Toggle the **tool** | pen / highlight / eraser / crop eraser |
| `3` | Toggle the **stroke size** | 4px / 6px / 10px / 14px / 20px / 30px / 50px |
| `4` , `X` | Toggle the **shape** | free pen / line / rectangle |
| `5` , `C` | Toggle the **color** | β¬white / π₯red / π§orange / π¨yellow / π©green / π¦blue / πͺpurple |
*(**+Shift**: toggles in the opposite direction)*
**Direct Actions:**
| Key | Action | Description |
|-----|--------|-------------|
| `6` , `S` or `Ctrl + S` | Save | Save with current background |
| `7` , `D` or `Ctrl + Z` | Undo | Undo the last change |
| `8` , `F` or `Ctrl + Y` | Redo | Redo the last change |
| `9` , `A` or `Ctrl + X` | Clear | Clear all strokes |
| `0` , `Q` , `Ctrl + R` or `Esc` | Quit | Quit the program |
**β¨ Quick Mode Toggles:**
| Key | Action | Description |
|-----|--------|-------------|
| `W` | Toggle mode | Cycle through **transparent / black / view mode** |
| `E` | Toggle eraser | Press again to switch to **crop-eraser** |
| `R` | Toggle pen | Press again to switch to **highlighter** |
*(**+Shift**: toggles in the opposite direction)*
**βοΈ Tool Shortcuts:**
| Key | Tool |
|-----|------|
| `Space` | βͺ White pen |
| `T` | π΄ Red pen |
| `Y` | π Orange pen |
| `G` | π‘ Yellow pen |
| `H` | π’ Green pen |
| `B` | π΅ Blue pen |
| `N` | π£ Purple pen |
| `V` | π₯ Red square outline tool |
---
### [Mouse]
| button \ item | Canva | Toolbar | Button |
|---------------|-------|---------|--------|
| left click | Draw | Set **drawing** mode | Select the tools |
| middle click | Close the program | Close the program | Close the program |
| right click | Set **view** mode | Set **view** mode | Set **view** mode |
The **mouse wheel** up and down can control the **brush size**.
## π License
Released under the **MIT License**.
You are free to use, modify, and share it for learning or personal projects.
**Draw anything you can imagine!**