These are some of useful keyboard functions to automate the key pressing.
typewrite('') #this will type the string on the screen where current window has focused.
typewrite(['a','b','left','left','X','Y'])
pyautogui.KEYBOARD_KEYS #get the list of all the keyboard_keys.
pyautogui.hotkey('ctrl','o') #for the combination of keys to enter.