Browse Source

Fixed KeyPress::createFromDescription when using this for function keys > F12

tags/2021-05-28
hogliux 8 years ago
parent
commit
ebdbc29176
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      modules/juce_gui_basics/keyboard/juce_KeyPress.cpp

+ 10
- 2
modules/juce_gui_basics/keyboard/juce_KeyPress.cpp View File

@@ -226,9 +226,17 @@ KeyPress KeyPress::createFromDescription (const String& desc)
{
// see if it's a function key..
if (! desc.containsChar ('#')) // avoid mistaking hex-codes like "#f1"
for (int i = 1; i <= 12; ++i)
{
for (int i = 1; i <= 35; ++i)
{
if (desc.containsWholeWordIgnoreCase ("f" + String (i)))
key = F1Key + i - 1;
{
if (i <= 16) key = F1Key + i - 1;
else if (i <= 24) key = F17Key + i - 17;
else if (i <= 35) key = F25Key + i - 25;
}
}
}
if (key == 0)
{


Loading…
Cancel
Save