This is a cool little program that turns a single key into multiple commands based on tap/hold patterns, so you can do stuff like control music, paste text and control volume all with one key!!
Windows only for now :c
- Pattern detection where taps and holds are turned into a string (i.e. HT for one hold and one tap)
- Actions configured with a simple json file that HOT-RELOADS!!
- Also, we have validation for
config.jsonso you never have a broken config - Small on-screen overlay which shows your sequence building as you type it, and then provides feedback on the the commands that you executed
- Runs from the tray
- File AND console logging (console logging is obviously only when running from source not through the .exe)
- Download the latest release
- Extract the archive
- Run the exe! (Make sure not to delete
config.json!)
- Clone!
git clone https://github.com/obobed/MCaDOS.git - Create a venv
- Install requirements
pip install -r requirements.txt - Run! (make sure to run input.py!!)
python input.py
All action configuration is done in config.json, which also hot-reloads!
trigger_keycan be any key from pynput.Keyboard.Key and acts as the onekeypatternis a string of T (tap) and H (hold)actionmust match with a function name in ACTIONS (in actions.py)argsoptional, if the function in actions.py takes in kwargs, you can put them here!labeloptional, shows in logs and the overlay, if missing it defaults to the action name
T is a tap, H is a hold
| Pattern | Binding |
|---|---|
| T | Play/Pause Media |
| HT | Media Next |
| HTT | Media Previous |
| TTH | Volume Mute |
| TT | Peek at Desktop |
| THT | Paste onekey text :3 |
| TH | Paste macondo text |
| TTT | Open Slack (you can change the app name in the config to open any app you want!) |
- Write a function in action.py (if you have parameters, they become your
argsinconfig.json) - Add it in the ACTIONS dict at the bottom of actions.py
- Add a binding to
config.json
pyinstaller --windowed --onefile --icon=icon.ico --name MCaDOS --add-data "icon.ico;." --hidden-import=pynput.keyboard._win32 input.py
then, copy config.json into dist
| File | Description |
|---|---|
input.py |
Entry point lol, wires the listener, config, overlay and tray together |
main.py |
Definition of the PatternDetector class and validation logic of config |
actions.py |
What each action does, and the ACTIONS dict which contains all actions |
overlay.py |
Code for on-screen overlay |
logging_setup.py |
As name suggests, sets up file and stdout logging |
config.json |
User-editable configs and bindings |
