# Fatal

**URL:** https://forum.kirupa.com/t/fatal/23527
**Category:** Uncategorized
**Created:** [June 19, 2003, 2:55am UTC](https://forum.kirupa.com/t/fatal/23527 "2003-06-19T02:55:14Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![fatalnegativ3](https://avatars.discourse-cdn.com/v4/letter/f/c67d28/32.png) [@fatalnegativ3](https://forum.kirupa.com/u/fatalnegativ3)
#### Post date: [June 19, 2003, 2:55am UTC](https://forum.kirupa.com/t/fatal/23527/1 "2003-06-19T02:55:14Z")

</div>

Does anyone know how to disable buttons after a certain action is performed? like if a button is clicked or is triggered by a key it is instantly disabled for further use after it performs the action that is intended to be done? thx in advance.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 19, 2003, 2:57am UTC](https://forum.kirupa.com/t/fatal/23527/2 "2003-06-19T02:57:11Z")

</div>

on(release) {  
this.enabled = false  
}

that does it i think… this question’s been asked here before… a couple of time actually 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 4:47am UTC](https://forum.kirupa.com/t/fatal/23527/3 "2003-06-20T04:47:44Z")

</div>

the code only works if u click on a button, im trying to get it disabled when i press a button say like the left arrow key, is there a way to do that?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [June 20, 2003, 4:58am UTC](https://forum.kirupa.com/t/fatal/23527/4 "2003-06-20T04:58:32Z")

</div>

actually the button itself is disabled it can no longer be clicked on once i press the trigger key, however it still performs the action the trigger key makes it perform, is there a way to disable key pressing along with button disabling at the same time once the trigger key is pressed for the first time?
