1
0
Fork
You've already forked luxboard
0
virtual keyboard library for firefly zero
  • Rust 98.9%
  • Just 1.1%
Find a file
2026年03月03日 11:25:48 -06:00
assets add more display edges, update demo image 2026年02月27日 12:32:17 -06:00
src fmt + clippy 2026年03月03日 11:25:48 -06:00
.gitignore concept, most customization options implemented 2026年02月26日 16:26:06 -06:00
Cargo.toml concept, most customization options implemented 2026年02月26日 16:26:06 -06:00
firefly.toml add alphabet layout, add cursor to text editor 2026年02月26日 17:46:39 -06:00
justfile concept, most customization options implemented 2026年02月26日 16:26:06 -06:00
README.md fix readme example 2026年02月27日 15:40:26 -06:00

luxboard

Virtual keyboard for Firefly Zero!

User guide

While in Luxboard, the touchpad is mapped to nine areas, with each area containing four characters. The characters are mapped to the N, E, S, and W buttons respectively, going clockwise from the top character. To type a character, press down on the touchpad in the area where the character where you would like is placed, then press the corresponding button.

The bottom right area changes switches letter casing on N, and switches to an extra characters layout on S.

When the touchpad is not being touched, E is mapped to space, S is mapped to exit, and W is mapped to backspace.

Developer guide

First, initialize Luxboard:

letluxboard=Luxboard::default()// or if you'd like to define some custom options...
letluxboard=Luxboard::new(LuxboardOptions{highlight_color: Some(firefly_rust::Color::Red),..Default::default()})

Then, place the Luxboard functions update() and render() into the Firefly SDK's update() and render() functions. Here is an example implementation:

#[unsafe(no_mangle)]extern"C"fn update(){// ...
ifprecondition{matchluxboard.update(){// returns the current state of the luxboard
LuxboardState::Closed=>{ifpressed_buttons.n{luxboard.open();}},LuxboardState::JustClosed(output)=>{// do something with output text here...
}}}// ...
}#[unsafe(no_mangle)]extern"C"fn render(){// ...
ifluxboard.is_open(){luxboard.render(&font);}// ...
}