mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Fixed KeyPress::createFromDescription when using this for function keys > F12
This commit is contained in:
parent
f9d6955c7c
commit
ebdbc29176
1 changed files with 10 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue