Single watch triggers a 'complete' scan to multiplex drive/sense the key
Decide valid key (combination press) and perform action based on key
Set all driving pins to same state
Set all sensing pins in state with single watch on opposite edge
Single watch triggers return to original state (1 and 2).
If you want to have a repeat on holding a key longer than a configurable time, you need to modify 4 a bit and have a logical loop (timout before you check again with a scan), then move on.
For sure fall NOT into the arduino trap. (Check out the similarly structured approach I took with the touch screen and its application with a UI...).
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.
You go down a different route...
If you want to have a repeat on holding a key longer than a configurable time, you need to modify 4 a bit and have a logical loop (timout before you check again with a scan), then move on.
For sure fall NOT into the arduino trap. (Check out the similarly structured approach I took with the touch screen and its application with a UI...).