from pynput.keyboard import Key from pynput.mouse import Button button_code_lookup = [ Button.left, Button.right ] keyboard_lookup = { "{space}": Key.space, "{ent}": Key.enter, "{backspace}": Key.backspace }