diff options
author | Marc Poulhiès <dkm@kataplop.net> | 2022-09-09 22:40:33 +0200 |
---|---|---|
committer | Marc Poulhiès <dkm@kataplop.net> | 2022-09-09 22:40:33 +0200 |
commit | 46c10f53ddc19291769a6abafca43586d3ea64a1 (patch) | |
tree | 74db9cc7832289ce8eaf422df26e10c50528eb40 /firmware/rust/src/layout.rs | |
parent | f53ee644189101a2b004e29a38acd49dc00b6842 (diff) |
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`.
Diffstat (limited to 'firmware/rust/src/layout.rs')
-rw-r--r-- | firmware/rust/src/layout.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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] |