diff --git a/src/widgets/Notebook.cpp b/src/widgets/Notebook.cpp index 237e3e9c8..ca81a9353 100644 --- a/src/widgets/Notebook.cpp +++ b/src/widgets/Notebook.cpp @@ -34,14 +34,6 @@ Notebook::Notebook(QWidget *parent) this->addButton_->setIcon(NotebookButton::Icon::Plus); this->addButton_->setHidden(true); - - auto *shortcut_next = new QShortcut(QKeySequence("Ctrl+Tab"), this); - QObject::connect(shortcut_next, &QShortcut::activated, - [this] { this->selectNextTab(); }); - - auto *shortcut_prev = new QShortcut(QKeySequence("Ctrl+Shift+Tab"), this); - QObject::connect(shortcut_prev, &QShortcut::activated, - [this] { this->selectPreviousTab(); }); } NotebookTab *Notebook::addPage(QWidget *page, QString title, bool select) diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index 113a43d79..66af5d500 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -282,6 +282,11 @@ void Window::addShortcuts() createWindowShortcut(this, "CTRL+9", [this] { this->notebook_->selectLastTab(); }); + createWindowShortcut(this, "CTRL+TAB", + [this] { this->notebook_->selectNextTab(); }); + createWindowShortcut(this, "CTRL+SHIFT+TAB", + [this] { this->notebook_->selectPreviousTab(); }); + // Zoom in { auto s = new QShortcut(QKeySequence::ZoomIn, this); diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index df6982616..be9dc88c4 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -400,32 +400,6 @@ void SplitInput::installKeyPressedEvent() } } } - else if (event->key() == Qt::Key_Tab) - { - if (event->modifiers() == Qt::ControlModifier) - { - SplitContainer *page = - static_cast(this->split_->parentWidget()); - - Notebook *notebook = - static_cast(page->parentWidget()); - - notebook->selectNextTab(); - } - } - else if (event->key() == Qt::Key_Backtab) - { - if (event->modifiers() == (Qt::ControlModifier | Qt::ShiftModifier)) - { - SplitContainer *page = - static_cast(this->split_->parentWidget()); - - Notebook *notebook = - static_cast(page->parentWidget()); - - notebook->selectPreviousTab(); - } - } else if (event->key() == Qt::Key_C && event->modifiers() == Qt::ControlModifier) {