Exit game without using the Esc key


(S_W) #1

Hi everybody!
Does anybody know how to exit a game without using the Esc key.
For example, if you press a key, a python script is called and this exits the game.
Thanks! :slight_smile:


(Ben) #2

import sys
sys.exit()


(S_W) #3

Thank you!


(gorgan_almi) #4

On the same note, is it possible to stop blender from ending the game when the ESC key is pressed? say if you want to use the ESC key for another purpose in the game.