KeyControl is a Go-based HTTP server that allows users to simulate keyboard key presses remotely via HTTP requests. This server is useful for automation, testing, and remote control scenarios.
- Overview
- Features
- Getting Started
- API Endpoints
- Configuration
- Key Code Mapping
- Feedback and Contributions
- License
- Author
This project provides a simple HTTP server that allows you to simulate key presses on the server machine by making HTTP requests with specific parameters. It uses the micmonay/keybd_event package to handle the keyboard events.
- Simulate keyboard key presses via HTTP endpoints
- Support for various key combinations (e.g., Ctrl+Alt+Delete)
- Easy-to-use API for integrating with other applications
- Customizable port and authentication token for security
- Go to the Releases
- Download the latest release for your operating system.
If you have Go installed on your system, you can install the latest version of KeyControl directly using the go install command:
go install github.com/itpey/keycontrol@latest
Ensure that your GOBIN
directory is in your PATH
for the installed binary to be accessible globally.
Once installed, you can use KeyControl from the command line:
$ keycontrol -h
Check the health status of the server.
curl -X GET "http://localhost:8080/health"
Simulate key press.
keycodes (required)
: Comma-separated list of virtual key codes to simulate.shift (optional)
: Set to true to press SHIFT key.ctrl (optional)
: Set to true to press CTRL key.alt (optional)
: Set to true to press ALT key.super (optional)
: Set to true to press Windows/Super key.
curl -X POST "http://localhost:8080/press?keycodes=A,B,C&ctrl=true" \
-H "Authorization: keycontrol"
You can configure the KeyControl server using the following command-line flags:
-- port, -p
: Specifies the server port (default: 8080).--auth, -a
: Specifies the authentication token (default: keycontrol).
$ keycontrol -p 9000 -a mytoken
Customize the server port and authentication token using the following environment variables:
KEY_CONTROL_PORT
: Sets the server port (default: 8080).KEY_CONTROL_AUTH_TOKEN
: Sets the authentication token (default: keycontrol).
$ export KEY_CONTROL_PORT=9000
$ export KEY_CONTROL_AUTH_TOKEN=mytoken
$ keycontrol
Refer to the source code for a complete list of key codes.
If you encounter any issues or have suggestions for improvement, please open an issue on GitHub.
We welcome contributions! Fork the repository, make your changes, and submit a pull request.
KeyControl is open-source software released under the Apache License, Version 2.0. You can find a copy of the license in the LICENSE file.
KeyControl was created by itpey