# Pressing a key while key38(down) is being held

**URL:** <https://forum.kirupa.com/t/pressing-a-key-while-key38-down-is-being-held/89044>\
**Category:** Uncategorized\
**Created:** [May 4, 2005, 3:37pm UTC](https://forum.kirupa.com/t/pressing-a-key-while-key38-down-is-being-held/89044 "2005-05-04T15:37:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![akademik](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@akademik](https://forum.kirupa.com/u/akademik)\
**Post date:** [May 4, 2005, 3:37pm UTC](https://forum.kirupa.com/t/pressing-a-key-while-key38-down-is-being-held/89044/1 "2005-05-04T15:37:31Z")

</div>

crouching = false  
wp = 65;  
MovieClip.prototype.key38 = function() { //down  
if (!this.crouching) { //if crouching is false  
if(???){//attack while in crouched state}  
}  
};

for the part that says “if(???)” i am trying to get it so if the user presses key+wp(key65) it does an event. how do i do it without having to put it inside onClipEvent
