When configuring a KeyCommand, attempting to set the Keycode to ESCAPE causes the "New Command" window to close immediately.
The default UI behavior (Escape = Close Window) is in conflict with the input field's ability to capture that specific key.
To Reproduce Steps to reproduce the behavior:
- Open HASS.Agent and go to Commands.
- Click Add New.
- Select Key from the command type list.
- Click inside the Keycode text box.
- Press the ESCAPE key on your keyboard.
- The window closes instead of registering the key.
Expected behavior The Keycode field should capture the ESCAPE keypress and display it in the textbox without closing the configuration window.

When configuring a KeyCommand, attempting to set the Keycode to ESCAPE causes the "New Command" window to close immediately.
The default UI behavior (Escape = Close Window) is in conflict with the input field's ability to capture that specific key.
To Reproduce Steps to reproduce the behavior:
Expected behavior The Keycode field should capture the ESCAPE keypress and display it in the textbox without closing the configuration window.