From 0d37bd808850466c1b9d0761d085caa64c0b206d Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 25 Oct 2019 16:00:07 +0100 Subject: [PATCH] iOS: Support option and cmd keys in KeyPress::getTextDescription() and ::getTextDescriptionWithIcons() --- modules/juce_gui_basics/keyboard/juce_KeyPress.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp index ae1707d83a..e5f8a0f6b6 100644 --- a/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp +++ b/modules/juce_gui_basics/keyboard/juce_KeyPress.cpp @@ -146,7 +146,7 @@ namespace KeyPressHelpers return 0; } - #if JUCE_MAC + #if JUCE_MAC || JUCE_IOS struct OSXSymbolReplacement { const char* text; @@ -241,7 +241,7 @@ String KeyPress::getTextDescription() const if (mods.isCtrlDown()) desc << "ctrl + "; if (mods.isShiftDown()) desc << "shift + "; - #if JUCE_MAC + #if JUCE_MAC || JUCE_IOS if (mods.isAltDown()) desc << "option + "; if (mods.isCommandDown()) desc << "command + "; #else @@ -274,7 +274,7 @@ String KeyPress::getTextDescription() const String KeyPress::getTextDescriptionWithIcons() const { - #if JUCE_MAC + #if JUCE_MAC || JUCE_IOS auto s = getTextDescription(); for (int i = 0; i < numElementsInArray (KeyPressHelpers::osxSymbols); ++i)