# Key Movement

**URL:** <https://forum.kirupa.com/t/key-movement/141970>\
**Category:** Uncategorized\
**Created:** [March 24, 2005, 4:29pm UTC](https://forum.kirupa.com/t/key-movement/141970 "2005-03-24T16:29:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sepremier22](https://avatars.discourse-cdn.com/v4/letter/s/4af34b/32.png) [@sepremier22](https://forum.kirupa.com/u/sepremier22)\
**Post date:** [March 24, 2005, 4:29pm UTC](https://forum.kirupa.com/t/key-movement/141970/1 "2005-03-24T16:29:41Z")

</div>

I am looking for the AS for moving an abject with WASD. I had it working with Key.Left, Key.Right, Key.Up, and Key.Down but I want to change them to WASD. If anyone knows how to or can point me to a tutorial, please do. thanks in advance.

```auto

if (Key.isDown(Key.LEFT)) {
  this._x+=moveSpeed;
 } else if (Key.isDown(Key.RIGHT)) {
  this._x-=moveSpeed;
 }
if (Key.isDown(Key.DOWN)) {
  this._y+=moveSpeed;
 } else if (Key.isDown(Key.UP)) {
  this._y-=moveSpeed;
 } 
}

```
