Custom matrix scanners

- Introduce Scanner base class for MatrixScanner
- Create new Scanner using built-in keypad module
- Allow overriding the scanner used by KMKKeyboard
This commit is contained in:
Ellie
2021-10-04 01:40:18 +11:00
committed by Kyle Brown
parent e7d306cf30
commit 57ba0fe8b2
5 changed files with 153 additions and 7 deletions

12
kmk/scanners/__init__.py Normal file
View File

@@ -0,0 +1,12 @@
class Scanner:
'''
Base class for scanners.
'''
def scan_for_changes(self):
'''
Scan for key events and return a key report if an event exists.
The key report is a byte array with contents [row, col, True if pressed else False]
'''
pass