#Is it possible to turn the keyboard off while a gpio pin is either high or low?

1 messages · Page 1 of 1 (latest)

true notch
#

Basically I want to build a split keyboard where the two halves snap together (to act as a built-in carrying case) and I realized it'd be neat to have a reed switch to turn the keyboard off when closed up. I still want it to charge in this state, so the ideal option IMO would be to use the soft off feature. Would it be possible to keep the keyboard in that state while the GPIO pin is high and only reset when it goes low (or vice versa)?

fluid light
#

You could probably use a direct GPIO kscan driver with a sideband behavior for this. (Not currently documented yet, but see https://github.com/zmkfirmware/zmk/pull/2330 for work in progress on documenting it, and see https://github.com/zmkfirmware/zmk/blob/main/app/boards/shields/zmk_uno/zmk_uno.overlay#L41 for an example using it.)

GitHub

Minor improvements to resolve some questions that appeared on Discord. Also made a note of the soft-off/deep-sleep wakeup-sources issue, since I couldn't find that documented anywhere.

GitHub

ZMK Firmware Repository. Contribute to zmkfirmware/zmk development by creating an account on GitHub.