# Simple question: How to get keycodes?

**URL:** https://forum.kirupa.com/t/simple-question-how-to-get-keycodes/232748
**Category:** flash
**Created:** [July 17, 2007, 2:02pm UTC](https://forum.kirupa.com/t/simple-question-how-to-get-keycodes/232748 "2007-07-17T14:02:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![contrast](https://avatars.discourse-cdn.com/v4/letter/c/f05b48/32.png) [@contrast](https://forum.kirupa.com/u/contrast)
#### Post date: [July 17, 2007, 2:02pm UTC](https://forum.kirupa.com/t/simple-question-how-to-get-keycodes/232748/1 "2007-07-17T14:02:57Z")

</div>

I started to use Senocular’s “KeyObject” class so I can detect multiple key presses. I can detect the named keys just fine using (in this example using the LEFT key):

```auto
if (key.isDown(Keyboard.LEFT))

```

or

```auto
if (key.isDown(key.LEFT))

```

But how do I detect the “w” key for instance? I know I would need to get the keycode for it, but I can’t find the simple function call that returns the keycode for a given key.

Thanks for any help, I am going crazy trying to find the solution for this seemingly simple problem.
