You basically just pull down and watch all rows, then set all columns high (or vice-versa). Then when a key is pressed down you see that a pin has changed state and at that point you scan to see what changed (and I guess maybe keep scanning until the key is released). That way you don't have to waste a bunch of power scanning - you know as soon as any key is pressed.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Wow, that's awesome! I love the two displays.
I'm not sure how the scanning is done, but there's a hack in the KeyPad module which (IMO) is quite nice: https://www.espruino.com/modules/KeyPad.js
You basically just pull down and watch all rows, then set all columns high (or vice-versa). Then when a key is pressed down you see that a pin has changed state and at that point you scan to see what changed (and I guess maybe keep scanning until the key is released). That way you don't have to waste a bunch of power scanning - you know as soon as any key is pressed.