VIA api implementation for QMK-based keyboards
Project description
[!WARNING]
qmk-via-api
is in early development and partly untested. Use at your own risk!
qmk-via-api
qmk-via-api
provides an implementation of the VIA API for QMK (Quantum Mechanical Keyboard) based keyboards. It allows developers to interact with QMK keyboards programmatically, enabling tasks such as configuring keymaps, macros, lighting effects and more.
Additionally, this library includes Python bindings for all API calls for integration of QMK keyboard configuration into Python-based applications or scripts.
Usage
Rust
Add dependency with Cargo:
cargo add qmk-via-api
Usage example:
use qmk_via_api::api::KeyboardApi;
const PRODUCT_VID: u16 = 0x594D;
const PRODUCT_PID: u16 = 0x604D;
const USAGE_PAGE: u16 = 0xff60;
fn main() {
let api = KeyboardApi::new(PRODUCT_VID, PRODUCT_PID, USAGE_PAGE).unwrap();
println!("Protocol version: {:?}", api.get_protocol_version());
println!("Layer count: {:?}", api.get_layer_count());
}
Python
Install with pip:
pip install qmk-via-api
Usage example:
import qmk_via_api
PRODUCT_VID = 0x594D
PRODUCT_PID = 0x604D
USAGE_PAGE = 0xff60
if __name__ == "__main__":
api = qmk_via_api.KeyboardApi(PRODUCT_VID, PRODUCT_PID, USAGE_PAGE)
print(f"Protocol version {api.get_protocol_version()}")
print(f"Layers count: {api.get_layer_count()}")
License & Attribution
The Rust code in this project is based on code from the VIA project, which is licensed under the GNU General Public License v3.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file qmk_via_api-0.1.0.tar.gz
.
File metadata
- Download URL: qmk_via_api-0.1.0.tar.gz
- Upload date:
- Size: 30.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce72da7acc345e78f0afb01abb0c7faf10de29c7831f8dad76d099b67b3d94cf |
|
MD5 | 0c935dc8a14fa38cdbf576f2d4a816db |
|
BLAKE2b-256 | 722fae3b029dd8cf76dad3c2b08345d6bf4266a4cef543fee5a182a86f64920e |
File details
Details for the file qmk_via_api-0.1.0-cp38-abi3-win_amd64.whl
.
File metadata
- Download URL: qmk_via_api-0.1.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 201.2 kB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ffd31a63a029b5d7a4d9242db541ac816180c49dbc080024f5c86e861e816324 |
|
MD5 | b1d60399852fdc6420fa0b7188440796 |
|
BLAKE2b-256 | abb7e871964cabc6dc9e3b6516df8e9892c4391d04286a49a2afd9ef7e2211ce |
File details
Details for the file qmk_via_api-0.1.0-cp38-abi3-win32.whl
.
File metadata
- Download URL: qmk_via_api-0.1.0-cp38-abi3-win32.whl
- Upload date:
- Size: 184.0 kB
- Tags: CPython 3.8+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e201e9e2d10901623792ab1a1f425394d6e7484068d88ef22ad567160ec80c59 |
|
MD5 | 13660996db4037a070f63e31e9388e66 |
|
BLAKE2b-256 | fccb9d84f814a493484916ebc7d5e3c4ad6ad989f13f97324e9af7d1bf92a41d |
File details
Details for the file qmk_via_api-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl
.
File metadata
- Download URL: qmk_via_api-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 445.0 kB
- Tags: CPython 3.8+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79fbf9d53387a8931606bdcd6e3822150e7e3333e303029645e3b922f4d7cfc1 |
|
MD5 | 08d4cede77067d4adb36d2f1d4eda8fb |
|
BLAKE2b-256 | 8eb654fb10001c1dcab0c4c5f9e260881546d774a2199c8909ba192dda35efdb |
File details
Details for the file qmk_via_api-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
.
File metadata
- Download URL: qmk_via_api-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 295.4 kB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38ed776e8ba4d0c6ccfe62c2a981edc831f9d476f36adbdcfdb91c6b55828fc6 |
|
MD5 | a837e9141cb4db69f718d753484ef013 |
|
BLAKE2b-256 | c827650d26da7812034884e19a0d10370d028421c725671903accf363c436521 |
File details
Details for the file qmk_via_api-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: qmk_via_api-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 299.5 kB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb0c486afec861852416edf2fe7e2d514517731c9547126934f66e2d4d8b8c11 |
|
MD5 | 164193348b3ebbc752c6ae04dd40dc93 |
|
BLAKE2b-256 | 81cf11f9c89b6e3589598ee91f75253958966ef47313f08d436e6c0336f0c0f1 |