diff --git a/helper/shortcut.cpp b/helper/shortcut.cpp index 764957d..0e62b65 100644 --- a/helper/shortcut.cpp +++ b/helper/shortcut.cpp @@ -68,6 +68,8 @@ bool ShortCut::eventFilter(QObject *obj, QEvent *e) emit deleteFile(); } else if (keyEvent->key() == Qt::Key_F5) { emit refresh(); + } else if (keyEvent->key() == Qt::Key_H && keyEvent->modifiers() & Qt::ControlModifier) { + emit showHidden(); } else if (keyEvent->key() >= Qt::Key_A && keyEvent->key() <= Qt::Key_Z) { // Handle select // KeyboardSearchManager::self()->addKeys(keyEvent->text()); diff --git a/helper/shortcut.h b/helper/shortcut.h index 25b2713..6a24b96 100644 --- a/helper/shortcut.h +++ b/helper/shortcut.h @@ -44,6 +44,7 @@ signals: void selectAll(); void backspace(); void deleteFile(); + void showHidden(); void keyPressed(const QString &text); protected: diff --git a/qml/Desktop/Main.qml b/qml/Desktop/Main.qml index b5ad0e2..870d9ce 100644 --- a/qml/Desktop/Main.qml +++ b/qml/Desktop/Main.qml @@ -137,6 +137,9 @@ Item { onKeyPressed: { dirModel.keyboardSearch(text) } + onShowHidden: { + dirModel.showHiddenFiles = !dirModel.showHiddenFiles + } } Component { diff --git a/qml/FolderPage.qml b/qml/FolderPage.qml index 279fc2c..4adb789 100644 --- a/qml/FolderPage.qml +++ b/qml/FolderPage.qml @@ -397,6 +397,9 @@ Item { onKeyPressed: { dirModel.keyboardSearch(text) } + onShowHidden: { + dirModel.showHiddenFiles = !dirModel.showHiddenFiles + } } function openUrl(url) {