mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02: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:
parent
3301d28615
commit
ac7958f335
1 changed files with 15 additions and 3 deletions
|
@ -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));
|
||||||
|
|
Loading…
Add table
Reference in a new issue