Skip to content

Commit

Permalink
TODO Sqash
Browse files Browse the repository at this point in the history
  • Loading branch information
unusedaccount committed Oct 2, 2020
1 parent 8c53ad7 commit 3f61273
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/tst_input_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,18 @@ void TestInputWin32::SpecialKeys() noexcept
const QMap<int, QString>& specialKeys { NeovimQt::Input::GetSpecialKeysMap() };

for (const auto k : specialKeys.keys()) {
// Key_Space events send with text=" "
QString text;
if (k == Qt::Key_Space) {
text = QStringLiteral(" ");
}

// On Mac Meta is the Control key, treated as C-.
QList<QPair<QKeyEvent, QString>> keyEventList{
{ { QEvent::KeyPress, k, Qt::NoModifier, {} }, "<%1>" },
{ { QEvent::KeyPress, k, Qt::ControlModifier, {} }, "<C-%1>" },
{ { QEvent::KeyPress, k, Qt::AltModifier, {} }, "<A-%1>" },
{ { QEvent::KeyPress, k, Qt::MetaModifier, {} }, "<%1>" },
{ { QEvent::KeyPress, k, Qt::NoModifier, text }, "<%1>" },
{ { QEvent::KeyPress, k, Qt::ControlModifier, text }, "<C-%1>" },
{ { QEvent::KeyPress, k, Qt::AltModifier, text }, "<A-%1>" },
{ { QEvent::KeyPress, k, Qt::MetaModifier, text }, "<%1>" },
};

for (const auto& keyEvent : keyEventList) {
Expand Down

0 comments on commit 3f61273

Please sign in to comment.