mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-01 07:05:13 +00:00
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:
@@ -410,9 +410,9 @@ void Manager::fillDefaults() {
|
|||||||
kShowAccount,
|
kShowAccount,
|
||||||
ranges::views::ints(1, ranges::unreachable));
|
ranges::views::ints(1, ranges::unreachable));
|
||||||
|
|
||||||
for (const auto &[command, index] : accounts) {
|
//for (const auto &[command, index] : accounts) {
|
||||||
set(u"%1+shift+%2"_q.arg(ctrl).arg(index), command);
|
// 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+down"_q.arg(ctrl), Command::FolderNext);
|
||||||
set(u"%1+shift+up"_q.arg(ctrl), Command::FolderPrevious);
|
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();
|
auto document = QJsonDocument();
|
||||||
document.setArray(shortcuts);
|
document.setArray(shortcuts);
|
||||||
file.write(document.toJson(QJsonDocument::Indented));
|
file.write(document.toJson(QJsonDocument::Indented));
|
||||||
|
Reference in New Issue
Block a user