agausmann / polybius

Keyboard firmware experiments on the bleeding edge of Rust's const-eval.
Other
6 stars 0 forks source link

Keys on a layer aren't released properly if the layer is deactivated first #4

Closed agausmann closed 2 years ago

agausmann commented 2 years ago

For example, with a momentary-layer key, you can reproduce by pressing/releasing in this order:

It will work correctly when the following order is respected:

These two orderings should have the same behavior. Fixing this isn't trivial; keeping track of pressed keys in different layers could use a lot of RAM. Probably best to see what QMK does to solve this.

agausmann commented 2 years ago

Implemented a clear-keyboard API that keymaps can use to force-release all pressed keys. A more fine-grained approach might be useful in the future, but this is good enough for now.