This script is able to detect different gestures and then I used pyautogui to automate keyboard and miouse presses, each game has different control so user can change keys and mouse press location according to game buttons using pyautogui.click() and pyautogui.press().