Skip to content

Commit

Permalink
Add key-up event for Alt-Tab in Release keys
Browse files Browse the repository at this point in the history
If Alt-Tab to Release is enabled, force a key-up event on those keys during the release_keys() function
  • Loading branch information
midwan committed Oct 11, 2024
1 parent 8c65d69 commit fc4e40a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/osdep/amiberry_input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,13 @@ static void close_kb()

void release_keys(void)
{
// Special handling in case Alt-Tab was still stuck in pressed state
if (currprefs.alt_tab_release)
{
my_kbd_handler(0, SDL_SCANCODE_LALT, 0, true);
my_kbd_handler(0, SDL_SCANCODE_TAB, 0, true);
}

const Uint8* state = SDL_GetKeyboardState(NULL);
SDL_Event event;

Expand Down

0 comments on commit fc4e40a

Please sign in to comment.