Close languages box by Escape key.

This commit is contained in:
John Preston 2018-11-07 14:03:50 +04:00
parent d0e48a02a1
commit d485287a59

View file

@ -1070,6 +1070,10 @@ void LanguageBox::prepare() {
void LanguageBox::keyPressEvent(QKeyEvent *e) {
const auto key = e->key();
if (key == Qt::Key_Escape) {
closeBox();
return;
}
const auto selected = [&] {
if (key == Qt::Key_Up) {
return _jump(-1);