-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implement keypad scanning #4877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/
Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/
Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/
Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/
Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/
keypad.Buttons and keypad.State Buttons -> Keys; further work wip wip wip: compiles about to try keypad.Keys working
keypad.Buttons and keypad.State Buttons -> Keys; further work wip wip wip: compiles about to try keypad.Keys working
…python into keypad-scanning
Some more comments, added to continue some internal discussions we have had internally: This works rather differently than
Case 1 is what all the keyboard platforms like QMK, KMK, etc., and also x0xb0x, etc, do. There's a big loop, and they call scan() when they're ready and then act on it. So they are getting real-time info, unlike case 2, which returns historical info. |
Module doc as of this comment (this HTML rendering came out better than I expected; it's just part of the raw HTML from the readthedocs page):
|
Some API naming and details discussion
|
Closing this because I have a Better Idea of how to do background scanning and represent scan results independent of scan method. |
Draft PR (for now) with simple keypad scanning for comments on API. Works. Documentation in
shared-bindings/keypad/*.c
is complete. This implements only single-pin-per-key, but the API for matrix keypads and shift-register will be similar, with the ability to convert from row/col to key number in the matrix API.Sample code, tested with a Feather RP2040 and a NeoKey 2 FeatherWing:
Sample output: