zmkfirmware / zmk

ZMK Firmware Repository
https://zmk.dev/
MIT License
2.82k stars 2.85k forks source link

feat: Added `toggle-mode`, allowing toggle-on and toggle-off #2555

Open Nick-Munnich opened 1 month ago

Nick-Munnich commented 1 month ago

Added toggle-mode flag to both the key toggle and toggle layer behaviors. Toggle mode can be set to

Tested locally with basic functionality. I don't see an edge case where this might cause issues.

Note that if key toggle on is spammed, it will repeatedly send over the "press" code.

Resolves #2523.

Nick-Munnich commented 1 month ago

Can we please add some tests that exercise this new functionality?

Yeah, I was just thinking that. Going to do so (and fix an oopsie I noticed) and then undraft.