From 99702cd9334fa1227cd75dea7b84b3fd43dd962f Mon Sep 17 00:00:00 2001 From: Marc Poulhiès Date: Fri, 20 Jan 2023 21:41:50 +0100 Subject: rust: update dependencies, adjust Keyberon usage Do a "cargo update" and adjust the minor change in Keyberon. --- firmware/rust/src/layout.rs | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) (limited to 'firmware/rust/src') diff --git a/firmware/rust/src/layout.rs b/firmware/rust/src/layout.rs index 835e2f1..6fd46ff 100644 --- a/firmware/rust/src/layout.rs +++ b/firmware/rust/src/layout.rs @@ -1,4 +1,4 @@ -use keyberon::action::{k, l, m, Action::*, HoldTapConfig}; +use keyberon::action::{k, l, m, Action::*, HoldTapConfig, HoldTapAction}; use keyberon::key_code::KeyCode::*; type Action = keyberon::action::Action; @@ -24,31 +24,29 @@ pub static FD : CustomActions = CustomActions::FreqDown; #[cfg(not(feature = "testmode"))] #[rustfmt::skip] - -// HoldTap for real keys -const D_ALT: Action = HoldTap { +const D_ALT: Action = HoldTap(&HoldTapAction { timeout: 200, tap_hold_interval: 199, config: HoldTapConfig::Default, - hold: &k(LAlt), - tap: &k(D), -}; + hold: Action::KeyCode(LAlt), + tap: Action::KeyCode(D), +}); -const K_ALT: Action = HoldTap { +const K_ALT: Action = HoldTap(&HoldTapAction { timeout: 200, tap_hold_interval: 199, config: HoldTapConfig::Default, - hold: &k(RAlt), - tap: &k(K), -}; + hold: Action::KeyCode(RAlt), + tap: Action::KeyCode(K), +}); -const F_L1: Action = HoldTap { +const F_L1: Action = HoldTap(&HoldTapAction { timeout: 200, tap_hold_interval: 199, config: HoldTapConfig::Default, - hold: &l(1), - tap: &k(F), -}; + hold: Action::Layer(1), + tap: Action::KeyCode(F), +}); // HoldTap for LED control // const Kb1_Color: Action = HoldTap { -- cgit v1.2.3