# Simulate a "button press" event using the enter key, no matter what is in focus

**URL:** <https://forum.inductiveautomation.com/t/simulate-a-button-press-event-using-the-enter-key-no-matter-what-is-in-focus/80462>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [October 13, 2023, 4:44pm UTC](https://forum.inductiveautomation.com/t/simulate-a-button-press-event-using-the-enter-key-no-matter-what-is-in-focus/80462 "2023-10-13T16:44:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![franklepkowski](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/franklepkowski/32/4808_2.png) [@franklepkowski](https://forum.inductiveautomation.com/u/franklepkowski)\
**Post date:** [October 13, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/simulate-a-button-press-event-using-the-enter-key-no-matter-what-is-in-focus/80462/2 "2023-10-13T16:50:56Z")

</div>

Have a look at this.

> [@Identifier for 'Enter' with onKeyPress event for v8.1.5](https://forum.inductiveautomation.com/t/identifier-for-enter-with-onkeypress-event-for-v8-1-5/48853):
>
> I am trying to change some parameters using the onKeyPress event with a text field using the enter key as the trigger to make the updates. This worked fine in v8.0.xx. After updating to 8.1.5, it appears that when enter is pressed it returns an empty string or at least that is what it looks like. Below are the if statements that I have attempted to return True for but have not been able to. if event.key == 'Enter' or event.Key == 'enter': if event.key == '': if event.key == ' ': Example output…

---

_[View the full topic](https://forum.inductiveautomation.com/t/simulate-a-button-press-event-using-the-enter-key-no-matter-what-is-in-focus/80462)._
