mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
feat(dankdash): add vim keybindings (hjkl) to wallpaper picker navigation (#903)
This commit is contained in:
committed by
GitHub
parent
f6821f80e1
commit
705a84051d
@@ -94,7 +94,7 @@ Item {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.key === Qt.Key_Right) {
|
if (event.key === Qt.Key_Right || event.key === Qt.Key_L) {
|
||||||
if (gridIndex + 1 < visibleCount) {
|
if (gridIndex + 1 < visibleCount) {
|
||||||
gridIndex++;
|
gridIndex++;
|
||||||
} else if (currentPage < totalPages - 1) {
|
} else if (currentPage < totalPages - 1) {
|
||||||
@@ -104,7 +104,7 @@ Item {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.key === Qt.Key_Left) {
|
if (event.key === Qt.Key_Left || event.key === Qt.Key_H) {
|
||||||
if (gridIndex > 0) {
|
if (gridIndex > 0) {
|
||||||
gridIndex--;
|
gridIndex--;
|
||||||
} else if (currentPage > 0) {
|
} else if (currentPage > 0) {
|
||||||
@@ -115,7 +115,7 @@ Item {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.key === Qt.Key_Down) {
|
if (event.key === Qt.Key_Down || event.key === Qt.Key_J) {
|
||||||
if (gridIndex + columns < visibleCount) {
|
if (gridIndex + columns < visibleCount) {
|
||||||
gridIndex += columns;
|
gridIndex += columns;
|
||||||
} else if (currentPage < totalPages - 1) {
|
} else if (currentPage < totalPages - 1) {
|
||||||
@@ -125,7 +125,7 @@ Item {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.key === Qt.Key_Up) {
|
if (event.key === Qt.Key_Up || event.key === Qt.Key_K) {
|
||||||
if (gridIndex >= columns) {
|
if (gridIndex >= columns) {
|
||||||
gridIndex -= columns;
|
gridIndex -= columns;
|
||||||
} else if (currentPage > 0) {
|
} else if (currentPage > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user