Issue 746: escape the comma in KeySequence

This commit is contained in:
VE3NEA 2020-06-11 13:09:00 -04:00
parent 515805fc1a
commit d0d01f2671
1 changed files with 4 additions and 0 deletions

View File

@ -211,6 +211,10 @@ QString KeySequence::keyToString(int key)
// treat key pad like normal keys (FIXME: we should have another lookup table for keypad keys instead)
key &= ~Qt::KeypadModifier;
//escape comma
if (key == ',')
return QString("\\u%1").arg(QChar(key).toLower().unicode(), 4, 16, QChar('0'));
// a printable 7 bit character?
if (key < 0x80 && key != Qt::Key_Space)
return QChar(key & 0x7f).toLower();