def kbd_work(): while 1: if py8042.more_chars(): ch = keyb.translate_scancode(py8042.get_scancode()) if ch: stack.swap(ch) else: stack.swap(None, idl_task)
def kbd_isr(): while py8042.more_chars(): ch = keyb.translate_scancode(py8042.get_scancode()) if ch: prch(ch, '\015')