From 46c10f53ddc19291769a6abafca43586d3ea64a1 Mon Sep 17 00:00:00 2001 From: Marc Poulhiès Date: Fri, 9 Sep 2022 22:40:33 +0200 Subject: rust: try to use custom event to change color TLDR; needs a redesign for correctly sharing LEDS (in usb_class) and lower prio data in `backlight`. --- firmware/rust/src/layout.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'firmware/rust/src/layout.rs') diff --git a/firmware/rust/src/layout.rs b/firmware/rust/src/layout.rs index 171f127..5e1a086 100644 --- a/firmware/rust/src/layout.rs +++ b/firmware/rust/src/layout.rs @@ -24,6 +24,8 @@ pub static FD : CustomActions = CustomActions::FreqDown; #[cfg(not(feature = "testmode"))] #[rustfmt::skip] + +// HoldTap for real keys const D_ALT: Action = HoldTap { timeout: 200, tap_hold_interval: 0, @@ -48,6 +50,15 @@ const F_L1: Action = HoldTap { tap: &k(F), }; +// HoldTap for LED control +// const Kb1_Color: Action = HoldTap { +// timeout: 200, +// tap_hold_interval: 0, +// config: HoldTapConfig::Default, +// hold: &Action::Custom(CC), +// tap: &k(Kb1), +// }; + pub static LAYERS: keyberon::layout::Layers<12, 5, 2, CustomActions> = keyberon::layout::layout! { { [Kb1 Kb2 Kb3 Kb4 Kb5 Grave Kb6 Kb7 Kb8 Kb9 Kb0 Minus] -- cgit v1.2.3