Add CTRL+SHIFT+T and CTRL+SHIFT+W to Open and Close tabs

Fixes #21
This commit is contained in:
Rasmus Karlsson
2018-01-06 20:58:56 +01:00
parent 29046b3aa1
commit 26170e4fdb
4 changed files with 34 additions and 10 deletions
+8
View File
@@ -14,5 +14,13 @@ inline void CreateShortcut(WidgetType *w, const char *key, Func func)
QObject::connect(s, &QShortcut::activated, w, func);
}
template <typename WidgetType, typename Func>
inline void CreateWindowShortcut(WidgetType *w, const char *key, Func func)
{
auto s = new QShortcut(QKeySequence(key), w);
s->setContext(Qt::WindowShortcut);
QObject::connect(s, &QShortcut::activated, w, func);
}
} // namespace widgets
} // namespace chatterino