# Keyboard key

**URL:** <https://forum.kirupa.com/t/keyboard-key/319318>\
**Category:** Uncategorized\
**Created:** [February 16, 2011, 6:51am UTC](https://forum.kirupa.com/t/keyboard-key/319318 "2011-02-16T06:51:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ohya](https://avatars.discourse-cdn.com/v4/letter/o/fbc32d/32.png) [@ohya](https://forum.kirupa.com/u/ohya)\
**Post date:** [February 16, 2011, 6:51am UTC](https://forum.kirupa.com/t/keyboard-key/319318/1 "2011-02-16T06:51:45Z")

</div>

I attach a button (btn) the following script:

on (press, keyPress “\<Enter\>”) {b.\_visible=1;}  
If I want such as follow:  
btn.onPress, keyPress “\<Enter\>”=function(){b.\_visible=1;}  
either press the button or enter key will enable mc b to appear.  
Please correct the error. Thanks.
