Skip to content

feat: add combo.prior_idle_time cooldown window#834

Merged
HaoboGu merged 2 commits into
HaoboGu:mainfrom
yekingyan:feat/osm-and-combo-enhancements
May 9, 2026
Merged

feat: add combo.prior_idle_time cooldown window#834
HaoboGu merged 2 commits into
HaoboGu:mainfrom
yekingyan:feat/osm-and-combo-enhancements

Conversation

@yekingyan
Copy link
Copy Markdown
Contributor

Added a configurable cooldown window (require_prior_idle_ms) that prevents combo recording when a key is pressed within the idle period after the previous key. This is equivalent to ZMK's per-combo require-prior-idle-ms, but implemented as a global setting under [behavior.combo].

Tested on nrf52840_split with require_prior_idle_ms = 150 — fast typing no longer triggers combo false-positives, and keystrokes are never swallowed.

When a key press falls within the idle window, combo update is skipped while the key still dispatches normally — fast typists won't lose keystrokes, only combo false-positives are prevented.

Configuration example:
[behavior.combo]
require_prior_idle_ms = 150 # 150ms cooldown

Default is no cooldown (backward compatible).

@yekingyan yekingyan force-pushed the feat/osm-and-combo-enhancements branch from 4319f4b to 976f4fc Compare May 6, 2026 15:22
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Size Report

Example main PR Diff .text .data .bss
use_config/nrf52832_ble 356.4 KiB 356.2 KiB -0.06% ⬇️ -252 0 +16
use_config/nrf52840_ble 406.2 KiB 406.3 KiB +0.03% ⬆️ +116 0 +16
use_config/nrf52840_ble_split (central) 481.6 KiB 482.2 KiB +0.11% ⬆️ +540 0 +16
use_config/nrf52840_ble_split (peripheral) 307.5 KiB 307.2 KiB -0.12% ⬇️ -392 0 0
use_config/pi_pico_w_ble 640.0 KiB 640.2 KiB +0.02% ⬆️ +180 0 +16
use_config/rp2040 146.6 KiB 146.7 KiB +0.01% ⬆️ +4 0 +16
use_config/rp2040_split (central) 158.4 KiB 158.4 KiB +0.00% ⬇️ -24 0 +16
use_config/rp2040_split (peripheral) 25.9 KiB 25.9 KiB +0.00% 0 0 0
use_config/stm32f1 62.2 KiB 62.3 KiB +0.08% ⬆️ +40 0 +16
use_config/stm32h7 99.5 KiB 99.7 KiB +0.14% ⬆️ +136 0 +16
use_rust/nrf52832_ble 345.4 KiB 345.3 KiB -0.02% ⬇️ -116 0 +16
use_rust/nrf52840_ble 401.4 KiB 401.5 KiB +0.04% ⬆️ +172 0 +16
use_rust/nrf52840_ble_split (central) 490.4 KiB 490.5 KiB +0.02% ⬆️ +96 0 +16
use_rust/nrf52840_ble_split (peripheral) 304.4 KiB 304.5 KiB +0.00% ⬆️ +12 0 0
use_rust/pi_pico_w_ble 640.6 KiB 640.8 KiB +0.02% ⬆️ +144 0 +16
use_rust/rp2040 146.3 KiB 146.4 KiB +0.08% ⬆️ +104 0 +16
use_rust/rp2040_split (central) 157.7 KiB 157.7 KiB +0.00% ⬆️ -8 0 +16
use_rust/rp2040_split (peripheral) 26.4 KiB 26.4 KiB +0.00% 0 0 0
use_rust/stm32f1 61.7 KiB 61.8 KiB +0.11% ⬆️ +56 0 +16
use_rust/stm32h7 120.7 KiB 120.8 KiB +0.10% ⬆️ +116 0 +16
use_config/nrf52832_ble — 356.4 KiB → 356.2 KiB (-0.06% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 326056	   5192	  33464	 364712	  590a8	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 326308	   5192	  33448	 364948	  59194	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.2% +3.33Ki  [ = ]       0    .debug_info
  +0.2% +1.47Ki  [ = ]       0    .debug_loc
  +0.2%    +476  [ = ]       0    .debug_line
  +0.1%    +208  [ = ]       0    .debug_ranges
  +0.4%     +33  [ = ]       0    .debug_abbrev
  +0.0%     +32  [ = ]       0    .symtab
   +68%     +26  [ = ]       0    [Unmapped]
  +0.0%     +21  [ = ]       0    .strtab
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  [ = ]       0    .debug_frame
  +0.0%     +16  +0.0%     +16    .rodata
  +0.0%      +8  [ = ]       0    .debug_aranges
  -0.1%    -268  -0.1%    -268    .text
  -0.0% -1.26Ki  [ = ]       0    .debug_str
  +0.1% +4.09Ki  -0.1%    -236    TOTAL
use_config/nrf52840_ble — 406.2 KiB → 406.3 KiB (+0.03% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 360616	   5200	  50248	 416064	  65940	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 360500	   5200	  50232	 415932	  658bc	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.89Ki  [ = ]       0    .debug_str
  +0.0%    +968  [ = ]       0    .debug_info
  +0.1%    +187  [ = ]       0    .debug_line
  +0.0%    +100  +0.0%    +100    .text
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  +0.0%     +16    .rodata
   +19%      +9  [ = ]       0    [Unmapped]
  -0.1%     -56  [ = ]       0    .debug_aranges
  -0.2%    -112  [ = ]       0    .debug_frame
  -0.1%    -152  [ = ]       0    .debug_ranges
  -0.1%    -184  [ = ]       0    .strtab
  -0.2%    -256  [ = ]       0    .symtab
  -0.1%    -826  [ = ]       0    .debug_loc
  +0.0% +1.59Ki  +0.0%    +132    TOTAL
use_config/nrf52840_ble_split (central) — 481.6 KiB → 482.2 KiB (+0.11% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 441164	   6524	  46056	 493744	  788b0	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 440624	   6524	  46040	 493188	  78684	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +2.25Ki  [ = ]       0    .debug_str
  +0.2% +1.29Ki  [ = ]       0    .debug_loc
  +0.0%    +953  [ = ]       0    .debug_info
  +0.1%    +524  +0.1%    +524    .text
  +0.1%    +247  [ = ]       0    .debug_line
  +0.1%     +96  [ = ]       0    .symtab
  +0.0%     +54  [ = ]       0    .strtab
  +0.1%     +36  [ = ]       0    .debug_frame
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  [ = ]       0    .debug_aranges
  +0.0%     +16  +0.0%     +16    .rodata
   +11%      +7  [ = ]       0    [Unmapped]
  -0.1%    -120  [ = ]       0    .debug_ranges
  +0.1% +5.32Ki  +0.1%    +556    TOTAL
use_config/nrf52840_ble_split (peripheral) — 307.5 KiB → 307.2 KiB (-0.12% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 282128	   5888	  26520	 314536	  4cca8	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 282520	   5888	  26520	 314928	  4ce30	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +216  [ = ]       0    .debug_ranges
   +15%      +8  [ = ]       0    [Unmapped]
  -0.1%     -48  [ = ]       0    .debug_aranges
  -0.0%     -62  [ = ]       0    .debug_line
  -0.0%     -68  [ = ]       0    .debug_info
  -0.3%     -92  [ = ]       0    .debug_frame
  -0.1%    -163  [ = ]       0    .strtab
  -0.0%    -204  [ = ]       0    .debug_loc
  -0.3%    -256  [ = ]       0    .symtab
  -0.2%    -392  -0.2%    -392    .text
  -0.0% -1.05Ki  [ = ]       0    .debug_str
  -0.0% -2.09Ki  -0.1%    -392    TOTAL
use_config/pi_pico_w_ble — 640.0 KiB → 640.2 KiB (+0.02% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 600944	      0	  54632	 655576	  a00d8	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 600764	      0	  54616	 655380	  a0014	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +2.04Ki  [ = ]       0    .debug_str
  +0.2% +1.58Ki  [ = ]       0    .debug_loc
  +0.0%    +334  [ = ]       0    .debug_info
  +0.3%    +224  [ = ]       0    .symtab
  +0.1%    +187  [ = ]       0    .strtab
  +0.1%    +164  +0.1%    +164    .text
  +0.0%    +118  [ = ]       0    .debug_line
  +0.1%     +28  [ = ]       0    .debug_frame
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  +0.0%     +16    .rodata
   +20%     +11  [ = ]       0    [Unmapped]
  +0.0%      +8  [ = ]       0    .debug_aranges
  -0.0%     -80  [ = ]       0    .debug_ranges
  +0.1% +4.61Ki  +0.0%    +196    TOTAL
use_config/rp2040 — 146.6 KiB → 146.7 KiB (+0.01% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 134928	      0	  15244	 150172	  24a9c	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 134924	      0	  15228	 150152	  24a88	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +738  [ = ]       0    .debug_info
  +0.5%    +408  [ = ]       0    .debug_ranges
  +0.0%    +241  [ = ]       0    .debug_str
  +0.1%    +208  [ = ]       0    .debug_loc
  +0.0%     +69  [ = ]       0    .debug_line
   +73%     +27  [ = ]       0    [Unmapped]
  [ = ]       0  +0.1%     +16    .bss
  +0.1%     +16  +0.1%     +16    .rodata
  -0.0%     -12  -0.0%     -12    .text
  -0.0%     -19  [ = ]       0    .strtab
  -0.3%    -112  [ = ]       0    .symtab
  +0.0% +1.53Ki  +0.0%     +20    TOTAL
use_config/rp2040_split (central) — 158.4 KiB → 158.4 KiB (+0.00% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 146156	      0	  16008	 162164	  27974	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 146180	      0	  15992	 162172	  2797c	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.04Ki  [ = ]       0    .debug_str
  +0.1%    +760  [ = ]       0    .debug_info
  +0.3%    +264  [ = ]       0    .debug_ranges
  +0.1%    +115  [ = ]       0    .debug_line
  +0.0%     +31  [ = ]       0    .debug_loc
  [ = ]       0  +0.1%     +16    .bss
  +0.1%     +16  +0.1%     +16    .rodata
 -20.0%      -9  [ = ]       0    [Unmapped]
  -0.0%     -19  [ = ]       0    .strtab
  -0.0%     -40  -0.0%     -40    .text
  -0.3%    -112  [ = ]       0    .symtab
  +0.1% +2.03Ki  -0.0%      -8    TOTAL
use_config/rp2040_split (peripheral) — 25.9 KiB → 25.9 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  24016	     56	   2412	  26484	   6774	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  24016	     56	   2412	  26484	   6774	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%      +1  [ = ]       0    .strtab
  -0.0%     -17  [ = ]       0    .debug_str
  -0.0%     -16  [ = ]       0    TOTAL
use_config/stm32f1 — 62.2 KiB → 62.3 KiB (+0.08% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  56312	     28	   7432	  63772	   f91c	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  56272	     28	   7416	  63716	   f8e4	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +545  [ = ]       0    .debug_str
  +0.1%    +453  [ = ]       0    .debug_info
  +0.2%    +188  [ = ]       0    .debug_loc
  +0.4%    +168  [ = ]       0    .debug_ranges
  +0.1%     +65  [ = ]       0    .debug_line
  +0.1%     +40  +0.1%     +40    .text
  +0.2%     +32  [ = ]       0    .symtab
  [ = ]       0  +0.2%     +16    .bss
  +0.0%      +6  [ = ]       0    .strtab
 -13.0%      -9  [ = ]       0    [Unmapped]
  +0.1% +1.45Ki  +0.1%     +56    TOTAL
use_config/stm32h7 — 99.5 KiB → 99.7 KiB (+0.14% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  92116	    268	   9664	 102048	  18ea0	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  91980	    268	   9648	 101896	  18e08	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%    +594  [ = ]       0    .debug_str
  +0.0%    +382  [ = ]       0    .debug_info
  +0.3%    +168  [ = ]       0    .debug_ranges
  +0.5%    +128  [ = ]       0    .symtab
  +0.2%    +120  +0.2%    +120    .text
  +0.1%     +62  [ = ]       0    .strtab
  +0.0%     +47  [ = ]       0    .debug_loc
  +0.2%     +32  [ = ]       0    .debug_frame
  [ = ]       0  +0.2%     +16    .bss
  +0.0%     +16  [ = ]       0    .debug_aranges
  +0.1%     +16  +0.1%     +16    .rodata
 -14.3%      -8  [ = ]       0    [Unmapped]
  -0.0%     -13  [ = ]       0    .debug_line
  +0.0% +1.51Ki  +0.1%    +152    TOTAL
use_rust/nrf52832_ble — 345.4 KiB → 345.3 KiB (-0.02% ⬇️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 315944	   5200	  32456	 353600	  56540	rmk-nrf52832

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 316060	   5200	  32440	 353700	  565a4	rmk-nrf52832

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +948  [ = ]       0    .debug_info
  +0.0%    +474  [ = ]       0    .debug_str
  +0.1%    +208  [ = ]       0    .debug_ranges
  +0.2%     +20  [ = ]       0    .debug_abbrev
  [ = ]       0  +0.1%     +16    .bss
  +0.0%     +16  +0.0%     +16    .rodata
  +0.0%     +13  [ = ]       0    .debug_line
  -0.0%      -8  [ = ]       0    .debug_aranges
  -0.0%     -12  [ = ]       0    .debug_frame
  -0.0%     -17  [ = ]       0    .strtab
 -23.9%     -17  [ = ]       0    [Unmapped]
  -0.0%    -132  -0.0%    -132    .text
  -0.0%    -193  [ = ]       0    .debug_loc
  +0.0% +1.27Ki  -0.0%    -100    TOTAL
use_rust/nrf52840_ble — 401.4 KiB → 401.5 KiB (+0.04% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 360256	   5200	  45728	 411184	  64630	rmk-nrf52840

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 360084	   5200	  45712	 410996	  64574	rmk-nrf52840

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +2.75Ki  [ = ]       0    .debug_info
  +0.2% +1.24Ki  [ = ]       0    .debug_loc
  +0.2%    +504  [ = ]       0    .debug_line
  +0.2%    +488  [ = ]       0    .debug_ranges
  +0.0%    +412  [ = ]       0    .debug_str
  +0.0%    +156  +0.0%    +156    .text
   +52%     +23  [ = ]       0    [Unmapped]
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  +0.0%     +16    .rodata
  -0.0%      -8  [ = ]       0    .debug_aranges
  -0.0%     -16  [ = ]       0    .debug_frame
  -0.0%     -30  [ = ]       0    .strtab
  -0.0%     -32  [ = ]       0    .symtab
  +0.1% +5.47Ki  +0.0%    +188    TOTAL
use_rust/nrf52840_ble_split (central) — 490.4 KiB → 490.5 KiB (+0.02% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 443984	   6524	  51792	 502300	  7aa1c	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 443888	   6524	  51776	 502188	  7a9ac	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.4% +1.54Ki  [ = ]       0    .debug_line
  +0.0%     +94  [ = ]       0    .debug_info
  +0.0%     +80  +0.0%     +80    .text
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  +0.0%     +16    .rodata
  -0.0%      -8  [ = ]       0    .debug_aranges
  -0.0%     -12  [ = ]       0    .debug_frame
  -0.0%     -24  [ = ]       0    .strtab
  -0.0%     -32  [ = ]       0    .debug_loc
  -0.0%     -32  [ = ]       0    .symtab
  -0.0%     -64  [ = ]       0    .debug_ranges
  -0.0%    -474  [ = ]       0    .debug_str
  +0.0% +1.09Ki  +0.0%    +112    TOTAL
use_rust/nrf52840_ble_split (peripheral) — 304.4 KiB → 304.5 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 281148	   5328	  25288	 311764	  4c1d4	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 281136	   5328	  25288	 311752	  4c1c8	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%     +30  [ = ]       0    .debug_loc
  +0.0%     +28  [ = ]       0    .debug_line
   +40%     +19  [ = ]       0    [Unmapped]
  +0.0%     +16  [ = ]       0    .debug_ranges
  +0.0%     +12  +0.0%     +12    .text
  +0.0%      +4  [ = ]       0    .debug_frame
  -0.0%     -66  [ = ]       0    .debug_info
  -0.0%    -403  [ = ]       0    .debug_str
  -0.0%    -360  +0.0%     +12    TOTAL
use_rust/pi_pico_w_ble — 640.6 KiB → 640.8 KiB (+0.02% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 601380	      0	  54776	 656156	  a031c	rmk-pi-pico-w

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 601236	      0	  54760	 655996	  a027c	rmk-pi-pico-w

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.92Ki  [ = ]       0    .debug_str
  +0.1% +1.14Ki  [ = ]       0    .debug_loc
  +0.0%    +397  [ = ]       0    .debug_info
  +0.2%    +352  [ = ]       0    .debug_ranges
  +0.0%    +128  +0.0%    +128    .text
  +0.0%     +97  [ = ]       0    .debug_line
  [ = ]       0  +0.0%     +16    .bss
  +0.0%     +16  +0.0%     +16    .rodata
  -0.0%      -8  [ = ]       0    .strtab
 -22.6%     -14  [ = ]       0    [Unmapped]
  -0.1%     -48  [ = ]       0    .symtab
  +0.0% +3.96Ki  +0.0%    +160    TOTAL
use_rust/rp2040 — 146.3 KiB → 146.4 KiB (+0.08% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 134800	      0	  15124	 149924	  249a4	rmk-rp2040

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 134696	      0	  15108	 149804	  2492c	rmk-rp2040

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.22Ki  [ = ]       0    .debug_info
  +0.3%    +730  [ = ]       0    .debug_loc
  +0.0%    +640  [ = ]       0    .debug_str
  +0.5%    +400  [ = ]       0    .debug_ranges
  +0.2%    +269  [ = ]       0    .debug_line
  +0.1%     +88  +0.1%     +88    .text
   +51%     +22  [ = ]       0    [Unmapped]
  [ = ]       0  +0.1%     +16    .bss
  +0.1%     +16  +0.1%     +16    .rodata
  -0.0%      -7  [ = ]       0    .strtab
  -0.1%     -48  [ = ]       0    .symtab
  +0.1% +3.28Ki  +0.1%    +120    TOTAL
use_rust/rp2040_split (central) — 157.7 KiB → 157.7 KiB (+0.00% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 145656	      0	  15788	 161444	  276a4	central

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 145664	      0	  15772	 161436	  2769c	central

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.58Ki  [ = ]       0    .debug_str
  +0.1% +1.16Ki  [ = ]       0    .debug_info
  +0.3%    +844  [ = ]       0    .debug_loc
  +0.2%    +152  [ = ]       0    .debug_ranges
  +0.1%    +142  [ = ]       0    .debug_line
  [ = ]       0  +0.1%     +16    .bss
  +0.1%     +16  +0.1%     +16    .rodata
   +21%     +10  [ = ]       0    [Unmapped]
  -0.0%     -24  -0.0%     -24    .text
  -0.0%     -28  [ = ]       0    .strtab
  -0.5%    -160  [ = ]       0    .symtab
  +0.1% +3.67Ki  +0.0%      +8    TOTAL
use_rust/rp2040_split (peripheral) — 26.4 KiB → 26.4 KiB (+0.00%)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  24316	     56	   2676	  27048	   69a8	peripheral

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  24316	     56	   2676	  27048	   69a8	peripheral

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.0%      +1  [ = ]       0    .strtab
  -4.9%      -3  [ = ]       0    [Unmapped]
  -0.0%     -14  [ = ]       0    .debug_str
  -0.0%     -16  [ = ]       0    TOTAL
use_rust/stm32f1 — 61.7 KiB → 61.8 KiB (+0.11% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
  55848	     28	   7408	  63284	   f734	rmk-stm32f1

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
  55792	     28	   7392	  63212	   f6ec	rmk-stm32f1

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1%    +632  [ = ]       0    .debug_info
  +0.0%    +333  [ = ]       0    .debug_str
  +0.1%     +68  [ = ]       0    .debug_line
  +0.1%     +56  +0.1%     +56    .text
  [ = ]       0  +0.2%     +16    .bss
 -36.2%     -25  [ = ]       0    [Unmapped]
  -0.2%     -64  [ = ]       0    .debug_ranges
  -0.1%     -84  [ = ]       0    .debug_loc
  +0.1%    +916  +0.1%     +72    TOTAL
use_rust/stm32h7 — 120.7 KiB → 120.8 KiB (+0.10% ⬆️)

cargo size (PR):

   text	   data	    bss	    dec	    hex	filename
 107972	    324	  15452	 123748	  1e364	rmk-stm32h7

cargo size (main):

   text	   data	    bss	    dec	    hex	filename
 107856	    324	  15436	 123616	  1e2e0	rmk-stm32h7

Bloaty diff (PR vs main):

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  +0.1% +1.02Ki  [ = ]       0    .debug_info
  +0.0%    +730  [ = ]       0    .debug_str
  +0.2%    +259  [ = ]       0    .debug_line
  +0.1%    +116  +0.1%    +116    .text
  +0.1%    +104  [ = ]       0    .debug_ranges
  +0.1%     +32  [ = ]       0    .symtab
  [ = ]       0  +0.1%     +16    .bss
  -0.0%      -8  [ = ]       0    .debug_aranges
  -0.1%     -12  [ = ]       0    .debug_frame
  -0.0%     -16  [ = ]       0    .strtab
 -36.1%     -22  [ = ]       0    [Unmapped]
  -0.0%     -83  [ = ]       0    .debug_loc
  +0.1% +2.09Ki  +0.1%    +132    TOTAL

Added a configurable cooldown window to prevent accidental combo
triggers during fast typing (rollover). When configured, combo
recording is skipped for the specified duration after any key press.
Keys during the cooldown window still dispatch normally.

Equivalent to ZMK's `require-prior-idle-ms` combo behavior.

Changes:
- rmk-config: add require_prior_idle_ms to TOML CombosConfig
- rmk-config: add field to resolved behavior struct
- rmk-macro: codegen for require_prior_idle_ms field
- rmk: add require_prior_idle_ms to CombosConfig struct
- rmk: add combo_require_prior_idle accessor in keymap
- rmk: skip combo recording during idle cooldown window
- rmk: update all test CombosConfig constructions
@yekingyan yekingyan force-pushed the feat/osm-and-combo-enhancements branch from c79f6ae to b69d978 Compare May 6, 2026 15:56
@HaoboGu
Copy link
Copy Markdown
Owner

HaoboGu commented May 8, 2026

Did you try prior_idle_time?

If prior_idle_time doesn't work for combo, please rename combo.require_prior_idle_ms to combo.prior_idle_time. Or just use prior_idle_time in combo as well? Removing an extra param is great if possible.

Align naming with the existing morse prior_idle_time convention.
The toml field now accepts DurationMillis format (e.g. "130ms").
@yekingyan
Copy link
Copy Markdown
Contributor Author

Did you try prior_idle_time?

If prior_idle_time doesn't work for combo, please rename combo.require_prior_idle_ms to combo.prior_idle_time. Or just use prior_idle_time in combo as well? Removing an extra param is great if possible.

Thanks for the suggestion! I checked the existing prior_idle_time and confirmed in the code — it's only used in the morse flow tap path (keyboard.rs:648), gated by enable_flow_tap and key_action.is_morse(). It detects fast typing to resolve morse keys as tap immediately, which is the opposite direction of what combo needs (suppress combo during fast typing). I also tested it on hardware and confirmed it has no effect on combo behavior.
So reusing the same param isn't feasible, but I've renamed combo.require_prior_idle_ms to combo.prior_idle_time to keep naming consistent.

@yekingyan yekingyan changed the title feat: add combo require-prior-idle-ms cooldown window feat: add combo.prior_idle_time cooldown window May 9, 2026
@HaoboGu
Copy link
Copy Markdown
Owner

HaoboGu commented May 9, 2026

Thanks!

@HaoboGu HaoboGu merged commit dc07a00 into HaoboGu:main May 9, 2026
44 checks passed
@HaoboGu
Copy link
Copy Markdown
Owner

HaoboGu commented May 9, 2026

And it would be great if you can add some document.

HaoboGu pushed a commit that referenced this pull request May 10, 2026
Document the optional prior_idle_time parameter for combo configuration
in behavior.md and appendix.md, matching the renamed field from PR #834.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants