Re: [hatari-devel] Keyup bug in SDL GUI |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Keyup bug in SDL GUI
- From: Andreas Grabher <andreas_g86@xxxxxxxxxx>
- Date: Tue, 29 Nov 2022 15:14:38 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1669731282; bh=m4hp/ltVSOpjnr4Oa/u6b9xuBRsRIqoQRQ5Dt9FOvT8=; h=Content-Type:From:Mime-Version:Subject:Date:Message-Id:To; b=HJMx2jhGtNfSYadJeTi8FsUVM8wnPkEFjpPvXLJexpR68i3HBaVCd7R5KQ/+xWOYh 0c43JXEKPO+CYLjrs6UyJkqHPiYXZYtN4AU8JPxP4oVBqQ3QoY1slV0ikMmmNNZzUw U9JqUX8RV4KWiIUxqe9V1Nkmh4XTy3fyy3DOX3/s8gpT3ogrP5+khUrCQ3C4LwwYzb FrOT2QY+ywrz9iaUqdWJQ1tFTb9tFC5JC1t+UMDnE/EG71jFBsbQEAaO0/6GkEZD02 FUTm61UmDIyk5cpoRDde5UCmMfEOogUsV41xFcP4n2KjJZmoVfaGpFob0owpqhjhPl Kx+Lu5m9qNbSA==
> Am 29.11.2022 um 14:14 schrieb Thorsten Otto <admin@xxxxxxxxxxx>:
>
>
> On Dienstag, 29. November 2022 11:21:21 CET Andreas Grabher wrote:
> > I have some more keyboard issues. Calling host routines can cause stuck
> > keys, especially stuck modifiers. Not sure how this can be fixed.
>
> That can easily happen with most of the keys that are handled by the window manager. Eg. when pressing alt-tab:
>
> - you press alt. This is seen by Hatari.
> - you press Tab. This is not seen by Hatari, and another window gets the focus.
> - you release alt/tab. Only seen by the foreign application, if at all.
> - you activate Hatari again by clicking on the window title. Hatari still thinks that Alt is pressed.
>
> That is common to most emulators. Unless you do some kind of hard-grab, thus preventing those global keyboard shortcuts (imho a bad idea), there is not much you can do about that. Best workaround might be to refresh at least the state of the modifiers when the window gets focus.
>
Probably the best idea. If the window gets focus release all modifiers and maybe all other keys that where down at the time we lost focus (the latter might be possible with SDL_ResetKeyboard()).