https://github.com/sorebit/couch-remote
Simple FastAPI remote control for a PC keyboard
https://github.com/sorebit/couch-remote
fastapi remote-control
Last synced: about 1 month ago
JSON representation
Simple FastAPI remote control for a PC keyboard
- Host: GitHub
- URL: https://github.com/sorebit/couch-remote
- Owner: Sorebit
- License: mit
- Created: 2022-06-16T10:26:10.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-29T12:46:35.000Z (over 3 years ago)
- Last Synced: 2025-09-25T14:23:41.681Z (9 months ago)
- Topics: fastapi, remote-control
- Language: Python
- Homepage: https://pypi.org/project/couch-remote/
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**⚠️ Current status of this project**
- Run `remote` to serve
- Commands are not supported yet.
- Supported Operating Systems:
- [x] Linux (Xorg) - pynput
- [x] Windows - pynput
- [x] macos - pynput (tested on 12.6)
- Not yet supported Operating Systems:
- [ ] Linux (Wayland)
---
# Couch Remote
A utility, available at [PyPI](https://pypi.org/project/couch-remote/), which serves a remote keyboard to control a computer.
## Usage
1. **To install:** `pip install couch-remote` (in a venv or globally)
2. Now, your `remote` should be available.
3. **Optionally,** `remote scaffold-config`, creates a basic settings file, then `remote global settings.py` copies it to a [global configuration directory](#install-a-global-settings-file-remote-global-settingspy).
4. **Finally,** `remote control` serves an instance at [0.0.0.0:4444](http://localhost:4444). This is the **only** command, you're going to need from now on.
> On macOS it might be required to allow the running process to control your keyboard. Most likely a pop-up will open on the first recorded keypress.
## Settings
```python
from pynput.keyboard import Key
from remote.models import Button
buttons = {
'play_pause_media': Button(key=Key.media_play_pause, label='⏯️'),
'esc': Button(key=Key.esc, label='Esc'),
'caps': Button(key=Key.caps_lock, label='Caps Lock'),
'space': Button(key=Key.space, label='Space'),
}
port = 4444
```
Q: Do jakiego formatu zapisują się i wczytują configi w settingsach?
### Install a global settings file `remote global settings.py `
When ran, stores settings at a default path: `~/.config/couch-remote/settings.py`
The app will default to this path when not specified.