diff --git a/CARDPUTER CircuitPython/keyboard.py b/CARDPUTER CircuitPython/keyboard.py index fdaad6e..e28490e 100644 --- a/CARDPUTER CircuitPython/keyboard.py +++ b/CARDPUTER CircuitPython/keyboard.py @@ -20,7 +20,7 @@ class Keyboard: } self.special={ "0xa":"\n", "0x8":"BACKSP", "0x20":" ", "0x3b":"UP", "0x2e":"DOWN", "0x2c":"LEFT", "0x2f":"RIGHT", "0x10d":"OPTD", - "0x4":"CTRLD", "0x13":"CTRLS", "0x9":" ", "0x60":"ESC" + "0x4":"CTRLD", "0x13":"CTRLS", "0x9":" ", "0x60":"ESC", "0xf":"CTRLO" } def scan(self): @@ -42,4 +42,10 @@ class Keyboard: if key: return key else: - return "UNKNOWN "+code \ No newline at end of file + return "UNKNOWN "+code + + def is_alphanumeric(self, key): + if key in self.special.values() or key in self.chars.values(): + return False + else: + return True \ No newline at end of file