Lokey — A firmware framework for input devices

Easily create modular firmware for keyboards, mice, MIDI controllers, and more.

Lokey logo
main.rs
#![no_main]#![no_std]use embassy_executor::Spawner;use lokey::Context;use lokey_keyboard::{Key, Scanner, layout};use lokey_my_device::{MyDevice, MyTransports, MyState};#[lokey::device]async fn main(context: Context<MyDevice, MyTransports, MyState>, spawner: Spawner) {    let scanner = Scanner::new();    let layout = layout!([Key::A, Key::B, Key::C]);    context.enable_all((scanner, layout)).await;}
Toolchain

Powered by Rust & Embassy

Built with Rust and the Embassy async framework for fast, reliable, and memory-safe firmware.

Architecture

Modular & Extensible

Designed around small, reusable components so you can easily extend and adapt it to any input device.

Developer Experience

User-Friendly API

Intuitive to use, with compile-time checks that catch mistakes before you flash your device.

Configuration

Runtime Configuration

Configure your device at runtime using Lokey Editor, without needing to recompile or reflash your firmware.

Composability

Multi-Part Device Support

Includes first-class support for devices that consist of multiple parts (e.g. split keyboards).

Connectivity

Wireless Support

Supports connecting devices to the host and to each other via Bluetooth Low Energy, with power-efficient components for battery-powered use.

License

Open Source

Licensed under either of Apache License, Version 2.0 or MIT License at your option.