summaryrefslogtreecommitdiff
path: root/firmware/rust/src
diff options
context:
space:
mode:
authorMarc Poulhiès <dkm@kataplop.net>2023-01-20 21:41:50 +0100
committerMarc Poulhiès <dkm@kataplop.net>2023-01-20 22:51:44 +0100
commit99702cd9334fa1227cd75dea7b84b3fd43dd962f (patch)
treeee39541bb78e47017f5a343e6a9d4c364381dca4 /firmware/rust/src
parent6efe439ef5ed5e9e879a76abb43a6043be584e3b (diff)
rust: update dependencies, adjust Keyberon usagemain
Do a "cargo update" and adjust the minor change in Keyberon.
Diffstat (limited to 'firmware/rust/src')
-rw-r--r--firmware/rust/src/layout.rs28
1 files changed, 13 insertions, 15 deletions
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<CustomActions>;
@@ -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 {