┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views
diff options
context:
space:
mode:
Diffstat (limited to 'src/views')
-rw-r--r--src/views/dolphinview.cpp9
-rw-r--r--src/views/dolphinview.h5
2 files changed, 14 insertions, 0 deletions
diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp
index a737dd0a6..4105628ee 100644
--- a/src/views/dolphinview.cpp
+++ b/src/views/dolphinview.cpp
@@ -724,6 +724,15 @@ void DolphinView::stopLoading()
bool DolphinView::eventFilter(QObject* watched, QEvent* event)
{
switch (event->type()) {
+ case QEvent::KeyPress:
+ if (GeneralSettings::useTabForSwitchingSplitView()) {
+ QKeyEvent* keyEvent = static_cast<QKeyEvent*>(event);
+ if (keyEvent->key() == Qt::Key_Tab && keyEvent->modifiers() == Qt::NoModifier) {
+ toggleActiveViewRequested();
+ return true;
+ }
+ }
+ break;
case QEvent::FocusIn:
if (watched == m_container) {
setActive(true);
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index d1a5d5005..0b0d8196d 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -546,6 +546,11 @@ signals:
*/
void goForwardRequested();
+ /**
+ * Is emitted when the user wants to move the focus to another view.
+ */
+ void toggleActiveViewRequested();
+
protected:
/** Changes the zoom level if Control is pressed during a wheel event. */
virtual void wheelEvent(QWheelEvent* event) Q_DECL_OVERRIDE;