From 75e57187555d85ce92c88ffa25ddfd5628c0a157 Mon Sep 17 00:00:00 2001 From: zhangyuanyuan1 Date: Tue, 2 Jun 2026 17:01:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=94=AE=E7=9B=98=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E5=9F=8B=E7=82=B9=E6=95=B0=E6=8D=AE=E5=A2=9E=E5=8A=A0=E5=9B=9E?= =?UTF-8?q?=E8=BD=A6=E9=94=AE(589535)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 埋点按键增加 Qt::Key_Enter、Qt::Key_Return Bug: #589535 From: kylin Severity: Moderate Changelog-Bug: #589535 【多任务视图】【埋点数据】键盘导航——回车键,不产生埋点 --- windowsview/qml/NewDesktopButton.qml | 3 +++ windowsview/qml/VirtualDesktopWindow.qml | 3 +++ .../ukui-window-switch-wlcom/multitaskviewmanagerbywlcom.cpp | 1 + 3 files changed, 7 insertions(+) diff --git a/windowsview/qml/NewDesktopButton.qml b/windowsview/qml/NewDesktopButton.qml index a82db47..06f3689 100644 --- a/windowsview/qml/NewDesktopButton.qml +++ b/windowsview/qml/NewDesktopButton.qml @@ -53,6 +53,9 @@ Item { } Keys.onPressed: { + if (rootWindow.isWlcom) { + multitaskViewManager.keyNavigationDataCollect(event.key) + } if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_Space) { newWorkspaceController.onWindowClicked() diff --git a/windowsview/qml/VirtualDesktopWindow.qml b/windowsview/qml/VirtualDesktopWindow.qml index 4b76243..acc9591 100644 --- a/windowsview/qml/VirtualDesktopWindow.qml +++ b/windowsview/qml/VirtualDesktopWindow.qml @@ -72,6 +72,9 @@ Item { ] Keys.onPressed: { + if (rootWindow.isWlcom) { + multitaskViewManager.keyNavigationDataCollect(event.key) + } if (event.key === Qt.Key_Return || event.key === Qt.Key_Enter || event.key === Qt.Key_Space) { controller.setCurrentDesktop(root.wid) controller.onWindowClicked(root.wid) diff --git a/windowsview/ukui-window-switch-wlcom/multitaskviewmanagerbywlcom.cpp b/windowsview/ukui-window-switch-wlcom/multitaskviewmanagerbywlcom.cpp index 6a168e9..d925b83 100644 --- a/windowsview/ukui-window-switch-wlcom/multitaskviewmanagerbywlcom.cpp +++ b/windowsview/ukui-window-switch-wlcom/multitaskviewmanagerbywlcom.cpp @@ -92,6 +92,7 @@ bool MultitaskViewManagerByWlcom::isCursorNavigationKey(const int &key) const key == Qt::Key_Right || key == Qt::Key_Up || key == Qt::Key_Down || key == Qt::Key_Home || key == Qt::Key_End || key == Qt::Key_PageUp || + key == Qt::Key_Enter || key == Qt::Key_Return || key == Qt::Key_PageDown) { return true; } -- Gitee