# How to close Soft Keyboard?

**URL:** https://forum.kirupa.com/t/how-to-close-soft-keyboard/331497
**Category:** flash
**Created:** [August 13, 2013, 1:45am UTC](https://forum.kirupa.com/t/how-to-close-soft-keyboard/331497 "2013-08-13T01:45:38Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kiwirob](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kiwirob/32/7153_2.png) [@kiwirob](https://forum.kirupa.com/u/kiwirob)
#### Post date: [August 13, 2013, 1:45am UTC](https://forum.kirupa.com/t/how-to-close-soft-keyboard/331497/1 "2013-08-13T01:45:38Z")

</div>

Hi

I’m developing an app on an Android phone phone which requires the soft keyboard. This works fine however closing the keyboard on pressing the enter key is proving to be problematic.

I’m using:

```php
stage.focus = null

```

to take the focus away from the text field which should work, however this crashes my app with the following error:

The application App (process air.myappname) has stopped unexpectedly. Please try again.

Does anyone have any ideas as to why this would be happening?  
Thanks.
