How can I capture QKeySequence from QKeyEvent depending on current keyboard layout?
I need to do this for configuring my application. I have QLineEdit field with reimplemented keyPressEvent method. QKeyEvent *ke = ... QString txt; if(ke->modifiers() & Qt::ControlModifier) txt += "Ctrl+"; if(ke->modifiers() & Qt::AltModifier) txt += "Alt+"; if(ke->modifiers() & Qt::ShiftModifier) txt += "Shift+"; if(ke->key() >= Qt::Key_0 && ke->key() <= Qt::Key_9) txt += ('0' + ke->key() - Qt::Key_0); else if(ke->key() >= Qt::Key_A && ke->key() <= Qt::Key_Z) txt += ('A' + ke->key() - Qt::Key_A); ui->hotkeyEdit->setText(txt); But this solution can create shortcuts only with english chars. For