diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-08-21 13:35:47 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-08-21 13:35:47 +0800 |
| commit | b9d10b091d92300de26178474a09bfce4bee12e6 (patch) | |
| tree | c8225d582a460c3e221ba38c5c1d2b7323a936ac | |
| parent | 2e0e01821c36f72c42f454e12a4efe32a073147e (diff) | |
feat(Launcher): support home and end
| -rw-r--r-- | popups/launcher/Launcher.qml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/popups/launcher/Launcher.qml b/popups/launcher/Launcher.qml index 2d638e5..f6f4f0b 100644 --- a/popups/launcher/Launcher.qml +++ b/popups/launcher/Launcher.qml @@ -119,6 +119,16 @@ ILauncher { TextInput { id: textInput property bool pendingUpdate: false + Keys.onPressed: event => { + if (event.key === Qt.Key_End || event.key === Qt.Key_Home) { + if (event.key === Qt.Key_End) { + endShortcut.activated(); + } else if (event.key === Qt.Key_Home) { + homeShortcut.activated(); + } + event.accepted = true; + } + } Layout.fillHeight: true Layout.fillWidth: true @@ -339,6 +349,20 @@ ILauncher { context: Qt.ApplicationShortcut onActivated: changePos(20) } + + Shortcut { + id: homeShortcut + sequence: "Home" + context: Qt.ApplicationShortcut + onActivated: changePos(200) + } + + Shortcut { + id: endShortcut + sequence: StandardKey.MoveToEndOfDocument + context: Qt.ApplicationShortcut + onActivated: changePos(-200) + } } // 1 = left // -1 = right @@ -376,6 +400,14 @@ ILauncher { if (item.pgdn()) set = 1; break; + case 200: + if (item.home()) + set = -1; + break; + case -200: + if (item.end()) + set = 1; + break; } switch (set) { |
