MCPcopy Index your code
hub / github.com/TeXitoi/keyberon

github.com/TeXitoi/keyberon @v0.1.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.1 ↗ · + Follow
91 symbols 160 edges 8 files 33 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Keyberon Build status

A rust crate to create a pure rust keyboard firmware.

It is exposed as a library giving you the different building blocks to create a featureful keyboard firmware. As the different functionality are interconected by the user of the crate, you can use only the parts you are interested in or easily insert your own code in between.

This crate is a no_std crate, running on stable rust. To use it on a given MCU, you need GPIO throw the embedded hal crate to read the key states, and the usb-device crate for USB communication.

Projects using this firmware

The first project using this firmware is Keyberon grid, a handwired keyboard with a grid of keys. It is based on the blue pill, a cheap development board based on a STM32F103 MCU.

keyberon-grid

There is a port to Cannon Keys's Ortho60 keyboard kit (blue pill based).

Ortho60

Another handwired project using keyberon is keyberon-f4, a unsplitted ergo keyboard. It runs on a WeAct MiniF4 based on a STM32F401 MCU.

keyberon-f4

TssT16's 4x12 keyboard (blue pill based):

TssT16's

gilescope's 4x12 keyboard (keyberon grid, blue pill based):

gilescope's

covah901's keyboard (WeAct MiniF4 based):

covah901

KeySeeBee, a split ergo keyboard (STM32F072 based).

KeySeeBee

Features

The supported features are: - Layers when holding a key (aka the fn key). When holding multiple layer keys, the numbers add (if you have a layer 1 key and a layer 2 key, when holding the 2 together, the layer 3 will be active). - Transparent key, i.e. when on a alternative layer, the key have the same behavior of the default layer. - Change default layer dynamically. - Multiple keys send on an single key press. It allows to have keys for complex shortcut, as a key for copy and paste, for alt tab, or for whatever you want. - hold tap: different action depending if the key is holded or tapped. For example, you can have a key acting as layer change when holded, and space when tapped.

FAQ

Keyberon, what's that name?

To find new, findable and memorable project names, some persons in the rust community try to mix the name of a city with some keyword related to the project. For example, you have the Tokio project that derive its name from the Japanese capital Tokyo and IO for Input Output, the main subject of this project.

So, I have to find such a name. In the mechanical keyboard community, "keeb" is slang for keyboard. Thus, I searched for a city with the sound [kib], preferably in France as it is the country of origin of the project. I found Quiberon, and thus I named the project Keyberon.

Extension points exported contracts — how you extend this code

Leds (Interface)
A trait to manage keyboard LEDs. `()` implements this trait if you don't care of LEDs. [1 implementers]
src/keyboard.rs
HidDevice (Interface)
(no doc) [1 implementers]
src/hid.rs
HeterogenousArray (Interface)
(no doc)
src/matrix.rs

Core symbols most depended-on inside this repo

assert_keys
called by 21
src/layout.rs
tick
called by 13
src/layout.rs
into_iter
called by 9
src/matrix.rs
event
called by 8
src/layout.rs
k
called by 6
src/action.rs
get
called by 3
src/matrix.rs
waiting_into_hold
called by 3
src/layout.rs
do_action
called by 3
src/layout.rs

Shape

Method 61
Class 9
Enum 9
Function 9
Interface 3

Languages

Rust100%

Modules by API surface

src/layout.rs25 symbols
src/hid.rs22 symbols
src/keyboard.rs14 symbols
src/matrix.rs8 symbols
src/key_code.rs8 symbols
src/action.rs7 symbols
src/debounce.rs5 symbols
src/lib.rs2 symbols

For agents

$ claude mcp add keyberon \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact