macos: Add special mapping for insert key

This commit is contained in:
cold-brewed
2023-07-11 16:49:14 -04:00
parent 6b6ca9844b
commit 72483a5dea
2 changed files with 11 additions and 0 deletions

View File

@@ -1092,6 +1092,11 @@ MainWindow::processMacKeyboardInput(bool down, const QKeyEvent *event)
if (mac_iso_swap)
nvk = (nvk == 0x0a) ? 0x32 : 0x0a;
}
// Special case for command + forward delete to send insert.
if ((event->nativeModifiers() & NSEventModifierFlagCommand) &&
((event->nativeVirtualKey() == nvk_Delete) || event->key() == Qt::Key_Delete)) {
nvk = nvk_Insert; // Qt::Key_Help according to event->key()
}
processKeyboardInput(down, nvk);
}