Adafruit Industries
CircuitPython speedy keyswitch handling

CircuitPython speedy keyswitch handling

Adafruit Industries

0:50

About this episode

Dan just dropped a new PR with our event-based key switch vector/matrix handling all done in the CircuitPython core https://github.com/adafruit/circuitpython/pull/4891 which will make keyboard projects a lot easier and a TON faster. Matrix/vector scanning is now done in a background interrupt and can handle all the work for you and emit key press/release events. Here I've got it on our Macropad, which has 12 keys - one on each GPIO so its a 'vector' keypad. The code is now twice as fast since we're no longer spending 4ms just for checking whether switches are pressed!

#adafruit #circuitpython #keyboards

Visit the Adafruit shop online - http://www.adafruit.com

LIVE CHAT IS HERE! http://adafru.it/discord

Adafruit on Instagram: https://www.instagram.com/adafruit

Subscribe to Adafruit on YouTube: http://adafru.it/subscribe

New tutorials on the Adafruit Learning System: http://learn.adafruit.com/

More from Adafruit Industries

#newproducts JP’s Product Pick of the Week 11/24/26 LTC4316 I2C Address Translator https://www.adafruit.com/product/5914 Deep discount during livestream Visit the Adafruit shop online - http://www.ada…

21m

Visit the Adafruit shop online - http://www.adafruit.com ----------------------------------------- LIVE CHAT IS HERE! http://adafru.it/discord Subscribe to Adafruit on YouTube: http://adafru.it/subscr…

1m

Notes document is available here, with timecodes: https://github.com/adafruit/adafruit-circuitpython-weekly-meeting/blob/main/2026/2026-11-23.md Join here for the chat all week: http://adafru.it/disco…

36m

Learn how to send I2S audio over the LT8912B DSI to DVI converter here: https://learn.adafruit.com/adafruit-lt8912b-dsi-to-dvi-converter/i2s-audio Visit the Adafruit shop online - http://www.adafruit.…

0m