onKeyDown method
void
onKeyDown(
- dynamic event
Implementation
void onKeyDown(event) {
switch ( event.keyId ) {
case 4294968068: /*up*/
case 119: /*W*/ this.moveForward = true; break;
case 4294968066: /*left*/
case 97: /*A*/ this.moveLeft = true; break;
case 4294968065: /*down*/
case 115: /*S*/ this.moveBackward = true; break;
case 4294968067: /*right*/
case 100: /*D*/ this.moveRight = true; break;
case 114: /*R*/ this.moveUp = true; break;
case 102: /*F*/ this.moveDown = true; break;
}
}