E is to open inventory and X is to close inventory
I had the idea to make this for people who were having trouble making games. So I hope this helps!