mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
shortcuts: translate Ctrl to Meta on macOS in default config
This commit is contained in:
parent
86b9a2e93f
commit
5cd114e549
@ -1035,6 +1035,13 @@ void VConfigManager::readShortcutsFromSettings()
|
|||||||
m_shortcuts.clear();
|
m_shortcuts.clear();
|
||||||
m_shortcuts = readShortcutsFromSettings(defaultSettings, group);
|
m_shortcuts = readShortcutsFromSettings(defaultSettings, group);
|
||||||
|
|
||||||
|
#if defined(Q_OS_MACOS) || defined(Q_OS_MAC)
|
||||||
|
// Translate Ctrl to Meta on macOS.
|
||||||
|
for (auto it = m_shortcuts.begin(); it != m_shortcuts.end(); ++it) {
|
||||||
|
it.value().replace("Ctrl", "Meta", Qt::CaseInsensitive);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Update default settings according to user settings.
|
// Update default settings according to user settings.
|
||||||
QHash<QString, QString> userShortcuts = readShortcutsFromSettings(userSettings,
|
QHash<QString, QString> userShortcuts = readShortcutsFromSettings(userSettings,
|
||||||
group);
|
group);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user