# \[BUG\] macOS native MenuBar doesn't flash on keypress

**URL:** <https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688>\
**Category:** General JUCE discussion\
**Created:** [January 25, 2023, 10:34am UTC](https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688 "2023-01-25T10:34:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mqtthiqs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mqtthiqs/32/14729_2.png) [@mqtthiqs](https://forum.juce.com/u/mqtthiqs)\
**Post date:** [January 25, 2023, 10:34am UTC](https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688/1 "2023-01-25T10:34:50Z")

</div>

Hi,  
Noticed something fishy with macOS native MenuBar.  
Steps to reproduce: launch `DemoRunner/GUI/MenusDemo.h`, hit a menu keyboard shortcut (command-R for instance); the JUCE MenuBar flashes, indicating the menu it triggered. Now hit Menu Position → Global menu (i.e., native menubar), hit the same keyboard shortcut, **the menu bar doesn’t flash**.

I’ve tracked down the problem to this inexplicable conditional in `juce_mac_MainMenu.mm`:

```auto
    void menuCommandInvoked (MenuBarModel*, const ApplicationCommandTarget::InvocationInfo& info) override
    {
        if ((info.commandFlags & ApplicationCommandInfo::dontTriggerVisualFeedback) == 0
              && info.invocationMethod != ApplicationCommandTarget::InvocationInfo::fromKeyPress)
            if (auto* item = findMenuItemWithCommandID (getMainMenuBar(), info.commandID))
                flashMenuBar ([item menu]);
    }

```

If I remove the condition `info.invocationMethod != ApplicationCommandTarget::InvocationInfo::fromKeyPress`, it flashes again and doesn’t seem to have any detrimental side-effects. Why would you prevent flashing the menu on keypresses? It seems like the whole point of flashing…

---

<div class="post-metadata">

**Author:** ![stephenk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/stephenk/32/15198_2.png) [@stephenk](https://forum.juce.com/u/stephenk)\
**Post date:** [January 25, 2023, 2:54pm UTC](https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688/2 "2023-01-25T14:54:15Z")

</div>

I came to a similar conclusion 4 or 5 months ago, posted about it, got no response.

> [@BUG: Once a component is focused, Mac global Menubar won’t flash in response to KeyShortcut](https://forum.juce.com/t/bug-once-a-component-is-focused-mac-global-menubar-won-t-flash-in-response-to-keyshortcut/52589):
>
> This seems a bug to me. Or I would love to know a solution or workaround. I have created a simple project to demonstrate this. It is the MenusDemo from DemoRunner, with a couple buttons. JUCE 7.0.0. MacOS 10.14.6 if it makes any difference. [MenusDemoFlash.zip](https://forum.juce.com/uploads/short-url/e16zX5dlti1hF1we9H4ShE62YSA.zip) (18.5 KB) Compile and launch the project. Without doing anything else, use Command+R and Command+G to change the colors. The MacMenuBar flashes in response. Click anywhere in the content of the window. Now try those commands a…

In any case, I have removed that condition you reference in my projects and it works as expected.

---

<div class="post-metadata">

**Author:** ![mqtthiqs](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/mqtthiqs/32/14729_2.png) [@mqtthiqs](https://forum.juce.com/u/mqtthiqs)\
**Post date:** [January 25, 2023, 7:21pm UTC](https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688/3 "2023-01-25T19:21:03Z")

</div>

Ah thanks for the confirmation and the link. Hopefully it won’t go unnoticed this time 🙏

---

<div class="post-metadata">

**Author:** ![PierreGuillot](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/pierreguillot/32/11653_2.png) [@PierreGuillot](https://forum.juce.com/u/PierreGuillot)\
**Post date:** [June 12, 2025, 8:22am UTC](https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688/4 "2025-06-12T08:22:15Z")

</div>

This behaviour is still present; I tested it on Sequoia 15.5 and the develop branch (af256aa). I don’t understand the reason for this behaviour either…

---

<div class="post-metadata">

**Author:** ![stephenk](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/stephenk/32/15198_2.png) [@stephenk](https://forum.juce.com/u/stephenk)\
**Post date:** [June 12, 2025, 2:14pm UTC](https://forum.juce.com/t/bug-macos-native-menubar-doesnt-flash-on-keypress/54688/5 "2025-06-12T14:14:22Z")

</div>

Apparently, it’s one of those issues that isn’t important enough to look at. 😉
