skip to Main Content

Ubuntu – Unable to run a python script

I'm new to python+linux and somewhat stuck. I'm using Ubuntu 22.04 LTS, created this simplistic script: import pyautogui import keyboard def on_key_event(e): if e.name == '1': pyautogui.press('h') pyautogui.press('k') keyboard.hook(on_key_event) #should keep running untill I press "Esc" keyboard.wait('esc') keyboard.unhook_all() when i'm…

VIEW QUESTION
Back To Top
Search