Last active
April 19, 2016 02:14
-
-
Save ruby0x1/480825c46a186467e65b to your computer and use it in GitHub Desktop.
Prevent the space key from scrolling the page with luxe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import luxe.Input; | |
class Main extends luxe.Game { | |
override function config(config:luxe.AppConfig) { | |
config.web.prevent_default_keys.push(Key.space); | |
return config; | |
} //config | |
override function ready() { | |
} //ready | |
override function onkeyup( e:KeyEvent ) { | |
if(e.keycode == Key.escape) { | |
Luxe.shutdown(); | |
} | |
} //onkeyup | |
override function update(dt:Float) { | |
} //update | |
} //Main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment