Skip to main content

VIA api implementation for QMK-based keyboards

Project description

[!WARNING]
qmk-via-api is currently in very early development and mostly untested. Use at your own risk!

qmk-via-api

qmk-via-api provides an implementation of the VIA API for QMK (Quantum Mechanical Keyboard) firmware-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 to Cargo.toml dependencies:

[dependencies]
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);
    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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qmk_via_api-0.0.1.tar.gz (28.4 kB view details)

Uploaded Source

Built Distributions

qmk_via_api-0.0.1-cp38-abi3-win_amd64.whl (197.5 kB view details)

Uploaded CPython 3.8+ Windows x86-64

qmk_via_api-0.0.1-cp38-abi3-win32.whl (186.3 kB view details)

Uploaded CPython 3.8+ Windows x86

qmk_via_api-0.0.1-cp38-abi3-manylinux_2_34_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.34+ x86-64

qmk_via_api-0.0.1-cp38-abi3-macosx_11_0_arm64.whl (299.4 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

qmk_via_api-0.0.1-cp38-abi3-macosx_10_12_x86_64.whl (314.9 kB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file qmk_via_api-0.0.1.tar.gz.

File metadata

  • Download URL: qmk_via_api-0.0.1.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.5.1

File hashes

Hashes for qmk_via_api-0.0.1.tar.gz
Algorithm Hash digest
SHA256 daeb605445e3ba25dca368041204c403ba3bcf30c9df2dca10650db4047fabc0
MD5 b41ce16f6bad0fa4ef6e11a914587c2c
BLAKE2b-256 bf6429d70c99521a3b867f78b238a37a1a2f2f80272ce64967dbe9d833ab1979

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.0.1-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.0.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 5429c543f8cceea24ac84fa8d4873adc1617b7f922b2840fdce52eec69d8e11b
MD5 03a9667540034496875946812016605c
BLAKE2b-256 5625df708de8f7ee2ab932370bf74e4ca6a7aac2598873410d4ca46afa074887

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.0.1-cp38-abi3-win32.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.0.1-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 eba4f55db9f6a7eacc5bc65ee710daa4153d844ed8cae4fb2d96bef7d08aa8ba
MD5 0c8f22a72b72bacb598c83d9641e2729
BLAKE2b-256 1c9a8f5180c5996f10bb27acf4b09c5296ad35641973162c59f33ab3132aa9c9

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.0.1-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.0.1-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c45cdeadd0383408a16fa647ac32f213f542d717aea47e297a9f0edd3f3aff71
MD5 b34b9577187349cb52ad848d7cbaa8d4
BLAKE2b-256 bbbfc5931c929c1d6e340874c6e72f67d1df17cbfcd58557ceb5172d688788c9

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.0.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.0.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1494a962270b236b22702fa5a1bd01668e3e31b0d9c378c6aeb067914245acba
MD5 536b60832ba0e653ed29844e3188ebb8
BLAKE2b-256 d65b4de6eb449768ff7450362c0cd3d678e7aa6567ceb8529f740f7642b49216

See more details on using hashes here.

File details

Details for the file qmk_via_api-0.0.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for qmk_via_api-0.0.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ce92ab139826432cc5ffd9dfd4fd0506750b75c98158678b13e6007c15d92247
MD5 2a055953deb870709f911a88e1546a91
BLAKE2b-256 1bcfefe0157f22a03eb4cdce262253608e1ab7972dad252d274c1c6f1ea45fc5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page