# If(Key.isDown(Key.getAscii() == 65)) not working (checking for letter "A") if pressed

**URL:** https://forum.kirupa.com/t/if-key-isdown-key-getascii-65-not-working-checking-for-letter-a-if-pressed/222611
**Category:** Uncategorized
**Created:** [April 15, 2007, 9:29am UTC](https://forum.kirupa.com/t/if-key-isdown-key-getascii-65-not-working-checking-for-letter-a-if-pressed/222611 "2007-04-15T09:29:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mythic\_Fr0st](https://avatars.discourse-cdn.com/v4/letter/m/4da419/32.png) [@Mythic\_Fr0st](https://forum.kirupa.com/u/Mythic_Fr0st)
#### Post date: [April 15, 2007, 9:29am UTC](https://forum.kirupa.com/t/if-key-isdown-key-getascii-65-not-working-checking-for-letter-a-if-pressed/222611/1 "2007-04-15T09:29:09Z")

</div>

I am trying to figure out how to check when the key “A - Z” is pressed…

How can I use ASCII characters to check this?, or even if I check something like this

if(Key.isDown(Key(“A”)))

I’d appreciate if someone could tell me how to check when keys A-Z are pressed…

preferably something like this

onKeyPress(“A”) = function()  
{  
“run code”  
}

anyway to do this?

basically hotkeys, press “s” to call a line of function that will save the game… etc…
