Here's what I've done so far:
keyboard.send_keys("<ctrl>+<f4>")
, workskeyboard.send_keys("<alt>+<f4>")
, workskeyboard.send_keys("<ctrl>+<alt>+<f4>")
, doesn't workIncidentally, keyboard.send_key("<super>")
doesn't work either. Not sure if that is related to the original issue or not.
Solution provided by xircon on Github
import pyautogui
pyautogui.hotkey('ctrl', 'alt', 'F4')