Merge branch 'master' of https://github.com/86Box/86Box
This commit is contained in:
@@ -127,3 +127,9 @@ static std::array<uint32_t, 127> cocoa_keycodes = { /* key names in parentheses
|
||||
0x150, /* DownArrow */
|
||||
0x148, /* UpArrow */
|
||||
};
|
||||
|
||||
// https://developer.apple.com/documentation/appkit/nseventmodifierflags/
|
||||
qint32 NSEventModifierFlagCommand = 1 << 20;
|
||||
|
||||
qint32 nvk_Delete = 0x75;
|
||||
qint32 nvk_Insert = 0x72;
|
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user