There isn’t, but I have a workaround for you:
Create an ingame macro with only the following line and put it on your hotbar.
/shutdown
The following scenario code piece should close the game. Place it at any point you want the game to shut down.
sendKey( Your Macro's Hotkey )
sendKey( Move Cursor/Target Cursor Left Key )
sendKey( Move Cursor/Target Cursor Left Key )
sendKey( Confirm Key )
You just have to change the keys to your keybinds and you’re good to go.
What the /shutdown macro does should be obvious: It opens the exit game window. Then the second line of the macro tries to press the menu navigation left key, but it only spawns the cursor, which normally isn’t displayed by default. Then it presses the key again to move the cursor left to the confirm button and then presses confirm, essentially logging you out of the game.
In case for some reason in your scenario the cursor is already visible when it tries to press the shutdown macro, just remove one of the move cursor lines.