From d5075a1a090d5ff44808d945ccafbddbcc9a4605 Mon Sep 17 00:00:00 2001 From: jtroo Date: Wed, 8 Nov 2023 11:29:50 -0800 Subject: [PATCH] fix: use correct value for max key recency in code --- keyberon/src/action/switch.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyberon/src/action/switch.rs b/keyberon/src/action/switch.rs index 2254de4ab..c163a4648 100644 --- a/keyberon/src/action/switch.rs +++ b/keyberon/src/action/switch.rs @@ -3,6 +3,7 @@ //! Limitations: //! - Maximum opcode length: 4095 //! - Maximum boolean expression depth: 8 +//! - Maximum key recency: 7, where 0 is the most recent key press //! //! The intended use is to build up a `Switch` struct and use that in the `Layout`. //! @@ -18,7 +19,7 @@ use BreakOrFallthrough::*; pub const MAX_OPCODE_LEN: u16 = 0x0FFF; pub const MAX_BOOL_EXPR_DEPTH: usize = 8; -pub const MAX_KEY_RECENCY: u8 = 8; +pub const MAX_KEY_RECENCY: u8 = 7; pub type Case<'a, T> = (&'a [OpCode], &'a Action<'a, T>, BreakOrFallthrough);