misinterpretation in KeyPress::createFromDescription


“ö” which is in textual description “#f6” is interpreted as function-key F6
It should be first checked if its a hex code, or just use do a whole string comparsion and not containsWholeWordIgnoreCase

[code] // see if it’s a function key…
for (int i = 1; i <= 12; ++i)
if (desc.containsWholeWordIgnoreCase (“f” + String (i))) //!!! “#f6” will interpreted as f6
key = F1Key + i - 1;

        if (key == 0)
            // give up and use the hex code..
            const int hexCode = desc.fromFirstOccurrenceOf ("#", false, false)
                                    .retainCharacters ("0123456789abcdef")



ah! Yes, thanks for spotting that!


i’m a little bit confused, whats the easiest way transforming a “#f6” into a UTF8 “ö” ?
Any help is appreciated?

this does not work:

[code]int hexCode =k.fromFirstOccurrenceOf ("#", false, false)
.retainCharacters (“0123456789abcdef”)



Just use String::charToString()