Keyboard events can't work in the various games, SendInput requires to be changed or to have more than one variant to call, more then just KeyTap. The problem description and solution are there: https://www.autohotkey.com/boards/viewtopic.php?t=38118&p=175275