mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +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,
|
||||
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));
|
||||
|
|
Loading…
Add table
Reference in a new issue