diff --git a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm index 3aec5dff6e..4afa9cd801 100644 --- a/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm +++ b/modules/juce_gui_basics/native/juce_mac_NSViewComponentPeer.mm @@ -958,7 +958,9 @@ void NSViewComponentPeer::updateKeysDown (NSEvent* ev, bool isKeyDown) ModifierKeys ModifierKeys::getCurrentModifiersRealtime() noexcept { - NSViewComponentPeer::updateModifiers ([NSEvent modifierFlags]); + if ([NSEvent respondsToSelector: @selector (modifierFlags)]) + NSViewComponentPeer::updateModifiers ([NSEvent modifierFlags]); + return NSViewComponentPeer::currentModifiers; }