Skip to content

Lokey — A firmware framework for input devices

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

rust
#![no_main]
#![no_std]

use embassy_executor::Spawner;
use lokey::Context;
use lokey_keyboard::{Key, MatrixConfig, layout};
use lokey_my_device::{MyDevice, MyTransports, MyState};

#[lokey::device]
async fn main(context: Context<MyDevice, MyTransports, MyState>, spawner: Spawner) {
    let layout = layout!(
        [Key::A, Key::B, Key::C]
    );
    context.enable_all((layout, MatrixConfig::default())).await;
}
Toolchain

Powered by Rust & Embassy

Built in Rust for speed and safety, leveraging the async embedded framework Embassy.

Architecture

Modular & Extensible

Structured as a highly modular system, making it possible to easily add functionality and use the framework for a variety of input devices.

Developer Experience

User-Friendly API

An API that is designed to be intuitive and fast, with compile-time checks that prevent mistakes from reaching your device.

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.