# How to change keyboard keys using senoculars class

**URL:** <https://forum.kirupa.com/t/how-to-change-keyboard-keys-using-senoculars-class/283633>\
**Category:** flash\
**Created:** [March 9, 2009, 1:14pm UTC](https://forum.kirupa.com/t/how-to-change-keyboard-keys-using-senoculars-class/283633 "2009-03-09T13:14:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![farban](https://avatars.discourse-cdn.com/v4/letter/f/d07c76/32.png) [@farban](https://forum.kirupa.com/u/farban)\
**Post date:** [March 9, 2009, 1:14pm UTC](https://forum.kirupa.com/t/how-to-change-keyboard-keys-using-senoculars-class/283633/1 "2009-03-09T13:14:46Z")

</div>

in my player.as file i have used senocular utili class to create movement using arrow up down left and right. and firebullet using space button.

how can i change this so the player moves to the A, S, D, W keys instead and fire using R

here is the current code i want to change in my player.as class

```auto
public function loop(e:Event) : void
        {
            if (key.isDown(Keyboard.LEFT))
                x -= speed;
            else if (key.isDown(Keyboard.RIGHT))
                x += speed;
 
            if (key.isDown(Keyboard.UP))
                y -= speed;
            else if (key.isDown(Keyboard.DOWN))
                y += speed;
                
            if (key.isDown(Keyboard.SPACE))
                fireBullet();

```
