Added Ctrl+1/2/3/... shortcuts to Emote Popup (#2263)

This commit is contained in:
Paweł
2020-12-12 14:58:59 +01:00
committed by GitHub
parent eb8eecdfed
commit dcebcd4456
3 changed files with 19 additions and 3 deletions
+2 -3
View File
@@ -305,12 +305,11 @@ void Window::addShortcuts()
// CTRL + 1-8 to open corresponding tab.
for (auto i = 0; i < 8; i++)
{
char hotkey[7];
std::sprintf(hotkey, "CTRL+%d", i + 1);
const auto openTab = [this, i] {
this->notebook_->selectIndex(i);
};
createWindowShortcut(this, hotkey, openTab);
createWindowShortcut(this, QString("CTRL+%1").arg(i + 1).toUtf8(),
openTab);
}
createWindowShortcut(this, "CTRL+9", [this] {