Switch to layer matrix instead of layer list

This commit is contained in:
2023-07-21 16:18:47 +02:00
parent 2c239b6248
commit dcf950cc66
15 changed files with 438 additions and 210 deletions

View File

@ -134,16 +134,12 @@ pub async fn keypress_handler(
};
match button {
Button::ModTap(_, _) => {
Button::ModTap(..) => {
debug!("adding modtap to queue");
// add event to queue
insert(queue, button);
}
Button::Mod(m) => {
// if events in queue, also add to queue maybe?
// TODO
}
Button::Key(_) => {
Button::Mod(..) | Button::Key(..) => {
if queue.is_empty() {
debug!("sending key now");
// otherwise, send immediately
@ -195,11 +191,7 @@ pub async fn keypress_handler(
slow_release(output, &button).await;
};
}
Button::Mod(m) => {
debug!("mod not implemented yet");
// TODO
}
Button::Key(_) => {
Button::Mod(..) | Button::Key(..) => {
// if this press event was in queue, resolve all ModTaps before in queue as Mods
// otherwise, just resolve this
if let Some(position_in_queue) = position_in_queue {