<div dir="ltr"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The behavior on Windows is all over the place for different<br>applications.? I tested a few I've got running:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Notepad, Notepad++, Eclipse:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">- Alt-down: Shows mnemonics on menu bar<br>- Alt-up: Highlights file menu on alt release<br>- Alt-tab: Shows mnemonics but doesn't highlight menu when it loses<br>focus; when returning, mnemonics still highlighted, but doesn't act on<br>them as menu not selected</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-> Looks buggy</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thunderbird / Opera / Firefox:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">- Alt-down: nothing<br>- Alt-up: shows menu bar (it is hidden normally)<br>- Alt-tab: works as expected, no highlighting</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-> Looks well behaved</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Explorer / Excel / Wordpad:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">- Alt-down: nothing<br>- Alt-up: shows mnemonics<br>- Alt-tab: works as expected, no highlighting</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-> Looks well behaved</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Visual Studio Code:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">- Alt-down: Shows mnemonics on menu bar<br>- Alt-up: Highlights file menu on alt release<br>- Alt-tab: Shows mnemonics, but hides them once it loses focus; on<br>return doesn't show mnemonics</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-> Looks well behaved</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Chrome / IntelliJ:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">-> Looks well behaved, doesn't react to alt presses in any way</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">None of the applications tested reacted on a mnemonic key after<br>regaining focus however, even though they may have them still<br>highlighted (which I think is a bug).</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">In my opinion, the behavior of notepad/notepad++/eclipse is incorrect<br>(they need to hide the mnemonics on focus lost, like Visual Studio Code<br>does, but they don't).</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">There seems to be two correct ways of handling mnemonics in applications<br>that use them, either:</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">a) shows mnemonics immediately on alt-down, but hide them on focus lost<br>(if the alt-down becomes an alt-tab, or probably any other alt combination)</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">b) only show mnemonics on a naked alt-up</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Ticket JDK-8090647 mentions a spec that has been updated, but I can't<br>find it.? It also mentions that the behavior for JavaFX should be what I<br>described in a), so I think this is a bug that can simply be fixed.</blockquote><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">--John</blockquote><div><br></div><div><br></div><div>Yap, there's quite different behaviors across apps. If you test on windows 11 you'll get yet another set of different behaviors.</div><div><br></div><div>But all in all, if you: alt+tab (without release) and alt+tab again so your app regains focus, you'll have the mnemonic still activated, which, as you say, sounds like a bug no matter the difference in behaviors across apps. <br><br>I agree with your suggestion: "a".<br><br>My client was quite disappointed and started to rant about javafx. It didn't help that we were hit by a couple other bugs (perhaps bad luck).  The fact that the bug was filed on 2013 (10 years later) and is still happening can be quite problematic. <br>Perhaps it would make sense to review all bugs filed, giving highest priority to the bugs that were submitted longer ago?<br><br>Thanks!</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Pedro Duque Vieira - <a href="https://www.pixelduke.com" target="_blank">https://www.pixelduke.com</a></div></div></div></div>