diff --git a/ui/mainwindow.cpp b/ui/mainwindow.cpp
index e1c504c..af7c9f4 100644
--- a/ui/mainwindow.cpp
+++ b/ui/mainwindow.cpp
@@ -86,6 +86,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
ui->tabWidget->installEventFilter(this);
//
RegisterHotkey(false);
+ RegisterShortcuts();
//
auto last_size = NekoGui::dataStore->mw_size.split("x");
if (last_size.length() == 2) {
@@ -1722,6 +1723,14 @@ void MainWindow::RegisterHotkey(bool unregister) {
}
}
+void MainWindow::RegisterShortcuts() {
+ for (const auto &action: ui->menuHidden_menu->actions()) {
+ new QShortcut(action->shortcut(), this, [=](){
+ action->trigger();
+ });
+ }
+}
+
void MainWindow::HotkeyEvent(const QString &key) {
if (key.isEmpty()) return;
runOnUiThread([=] {
diff --git a/ui/mainwindow.h b/ui/mainwindow.h
index 296f767..f150398 100644
--- a/ui/mainwindow.h
+++ b/ui/mainwindow.h
@@ -192,6 +192,8 @@ private:
void HotkeyEvent(const QString &key);
+ void RegisterShortcuts();
+
// grpc
static void setup_grpc();
diff --git a/ui/mainwindow.ui b/ui/mainwindow.ui
index a5aa8e1..2337fd3 100644
--- a/ui/mainwindow.ui
+++ b/ui/mainwindow.ui
@@ -419,9 +419,22 @@
+
+
@@ -701,6 +714,9 @@
Ctrl+U
+
+ true
+