Lokey — A firmware framework for input devices
Easily create modular firmware for keyboards, mice, MIDI controllers, and more.
#![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;}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.