Skip to content

Commit

Permalink
Fix: pressing escape while Alt-Tabbing (thus cancelling Alt-Tabbing) …
Browse files Browse the repository at this point in the history
…hiding Hass.Agent Window. (#161)

* Fixes pressing escape while Alt-Tabbing (thus cancelling Alt-Tabbing) hiding Hass.Agent Window.
Issue #157
  • Loading branch information
denisabt authored Oct 23, 2024
1 parent 2803f8a commit c07d212
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/HASS.Agent/HASS.Agent/Forms/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,10 @@ private void Main_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode != Keys.Escape)
return;

// Escape Pressed, but make sure it's not escape while alt-tabbing
if (e.Alt) return;

Hide();
}

Expand Down

0 comments on commit c07d212

Please sign in to comment.