Remove ctrl+shift+N shortcuts by default.

Those are used in some input methods, including Farsi.

You can always add such bindings in tdata/shortcuts-custom.json for
the "account1", "account2", etc commands.

Fixes #27334.
This commit is contained in:
John Preston 2024-01-16 13:03:44 +04:00
parent 3301d28615
commit ac7958f335
1 changed files with 15 additions and 3 deletions

View File

@ -410,9 +410,9 @@ void Manager::fillDefaults() {
kShowAccount,
ranges::views::ints(1, ranges::unreachable));
for (const auto &[command, index] : accounts) {
set(u"%1+shift+%2"_q.arg(ctrl).arg(index), command);
}
//for (const auto &[command, index] : accounts) {
// set(u"%1+shift+%2"_q.arg(ctrl).arg(index), command);
//}
set(u"%1+shift+down"_q.arg(ctrl), Command::FolderNext);
set(u"%1+shift+up"_q.arg(ctrl), Command::FolderPrevious);
@ -458,6 +458,18 @@ void Manager::writeDefaultFile() {
}
}
// Commands without a default value.
for (const auto command : kShowAccount) {
const auto j = CommandNames.find(command);
if (j != CommandNames.end()) {
QJsonObject entry;
entry.insert(u"keys"_q, QJsonValue());
entry.insert(u"command"_q, j->second);
shortcuts.append(entry);
}
}
auto document = QJsonDocument();
document.setArray(shortcuts);
file.write(document.toJson(QJsonDocument::Indented));