# Virtual keyboard ENTER button

**URL:** <https://forum.inductiveautomation.com/t/virtual-keyboard-enter-button/9970>\
**Category:** Ignition\
**Created:** [April 29, 2015, 8:15pm UTC](https://forum.inductiveautomation.com/t/virtual-keyboard-enter-button/9970 "2015-04-29T20:15:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ovendenk](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ovendenk](https://forum.inductiveautomation.com/u/ovendenk)\
**Post date:** [April 29, 2015, 8:15pm UTC](https://forum.inductiveautomation.com/t/virtual-keyboard-enter-button/9970/1 "2015-04-29T20:15:48Z")

</div>

Hey guys. Building a touchscreen HMI that has a password field input. I was using the keyPressed function scripting with the VK\_ENTER keyCode to swap windows once the right value is entered. It works great with a physical keyboard, but not with the virtual keyboard that pops up. Any suggestions? Thanks in advance

---

<div class="post-metadata">

**Author:** ![JordanCClark](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jordancclark/32/83362_2.png) [@JordanCClark](https://forum.inductiveautomation.com/u/JordanCClark)\
**Post date:** [April 29, 2015, 8:50pm UTC](https://forum.inductiveautomation.com/t/virtual-keyboard-enter-button/9970/2 "2015-04-29T20:50:46Z")

</div>

The keypress listener requires a hardware device. You would need something like this in the propertyChange handler:

`if event.propertyName == "text" and event.source.text=="CorrectPassword":
  DoSomeStuff()
else:
  DoSomeOtherStuff()`

---

<div class="post-metadata">

**Author:** ![ovendenk](https://avatars.discourse-cdn.com/v4/letter/o/f14d63/32.png) [@ovendenk](https://forum.inductiveautomation.com/u/ovendenk)\
**Post date:** [May 13, 2015, 7:55am UTC](https://forum.inductiveautomation.com/t/virtual-keyboard-enter-button/9970/3 "2015-05-13T07:55:05Z")

</div>

Wow, sorry for not replying sooner. Never got notified, thought I checked for replies.

Anyways, worked like a charm!!! THANK YOU very much. Cleans up my HMI and scripting a lot.
