# \[QoL request\] don't close component scripting windows when pressing enter

**URL:** <https://forum.inductiveautomation.com/t/qol-request-dont-close-component-scripting-windows-when-pressing-enter/79220>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [September 15, 2023, 3:39pm UTC](https://forum.inductiveautomation.com/t/qol-request-dont-close-component-scripting-windows-when-pressing-enter/79220 "2023-09-15T15:39:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 15, 2023, 3:39pm UTC](https://forum.inductiveautomation.com/t/qol-request-dont-close-component-scripting-windows-when-pressing-enter/79220/1 "2023-09-15T15:39:10Z")

</div>

Hello folks, dear IA wizards.

This is driving me nuts.  
When you create a new method/message handler on a component, and you press enter... it closes the window. I do it EVERY DAMN TIME.

Please make it stop.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [September 15, 2023, 4:17pm UTC](https://forum.inductiveautomation.com/t/qol-request-dont-close-component-scripting-windows-when-pressing-enter/79220/2 "2023-09-15T16:17:34Z")

</div>

Hmm. The 'Enter' key is used as the confirm for the 'default button' state, which is marked as the OK button. In theory, you could tell the system not to use Enter as the 'default button' submit key, with sufficient hacking of Swing internals (see `AppContext`, `DefaultLookup`; I couldn't get a quick test to work). Probably a non-starter.

As for 'fixing' it first party - you're honestly the first person I've heard complain about it, so we'd probably want to collect more feedback before we did change anything.

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 15, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/qol-request-dont-close-component-scripting-windows-when-pressing-enter/79220/3 "2023-09-15T16:50:28Z")

</div>

I should mention I'm talking about pressing enter after entering the name of the method/handler.  
It's such a reflex from me to press enter after entering text like this that I have to reopen the window every time...
