replaced engine.keyboard.get_keyNumber() with engine.keyboard.get_keyCode()