onKeyPress(key: Key | Key[], action: (key: Key)=>void): KEventController
Register an event that runs when user presses certain keys.// .jump() once when "space" is just being pressed onKeyPress("space", () => { bean.jump() }); onKeyPress(["up", "space"], () => { bean.jump() });
since
v2000.1