on xenial help sign in
merge prereq
faa5c78Michael Zanetti
qml/Components/PhysicalKeysMapper.qml+3−1
@@ -104,7 +104,9 @@ Item {
104 }
104 }
105 } else if (event.key == Qt.Key_Alt || (root.controlInsteadOfAlt && event.key == Qt.Key_Control)) {
105 } else if (event.key == Qt.Key_Alt || (root.controlInsteadOfAlt && event.key == Qt.Key_Control)) {
106 d.altPressed = true;
106 d.altPressed = true;
107+ } else if (((event.key == Qt.Key_Super_L || event.key == Qt.Key_Super_R) && event.modifiers === Qt.MetaModifier)
107− } else if (event.key == Qt.Key_Super_L || event.key == Qt.Key_Super_R || (root.controlInsteadOfSuper && event.key == Qt.Key_Control)) {
108+ || (root.controlInsteadOfSuper && event.key == Qt.Key_Control)
109+ ) {
108 d.superPressed = true;
110 d.superPressed = true;
109 } else if (event.key == Qt.Key_Tab) {
111 } else if (event.key == Qt.Key_Tab) {
110 if (d.altPressed && !d.altTabPressed) {
112 if (d.altPressed && !d.altTabPressed) {
tests/qmltests/tst_Shell.qml+7−6
@@ -2018,24 +2018,25 @@ Rectangle {
2018 compare(launcherPanel.highlightIndex, -2);
2018 compare(launcherPanel.highlightIndex, -2);
2019 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
2019 compare(ApplicationManager.focusedApplicationId, "unity8-dash");
2020
2020
2021+ wait(2000)
2021 // Use Super + Tab Tab to cycle to the first entry in the launcher
2022 // Use Super + Tab Tab to cycle to the first entry in the launcher
2022− keyPress(Qt.Key_Super_L);
2023+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2023 keyClick(Qt.Key_Tab);
2024 keyClick(Qt.Key_Tab);
2024 tryCompare(launcher, "state", "visible");
2025 tryCompare(launcher, "state", "visible");
2025 tryCompare(launcherPanel, "highlightIndex", -1);
2026 tryCompare(launcherPanel, "highlightIndex", -1);
2026 keyClick(Qt.Key_Tab);
2027 keyClick(Qt.Key_Tab);
2027 tryCompare(launcherPanel, "highlightIndex", 0);
2028 tryCompare(launcherPanel, "highlightIndex", 0);
2028− keyRelease(Qt.Key_Super_L);
2029+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2029 tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2030 tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2030 tryCompare(launcherPanel, "highlightIndex", -2);
2031 tryCompare(launcherPanel, "highlightIndex", -2);
2031 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
2032 tryCompare(ApplicationManager, "focusedApplicationId", firstAppInLauncher);
2032
2033
2033 // No go back to the dash
2034 // No go back to the dash
2034− keyPress(Qt.Key_Super_L);
2035+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2035 keyClick(Qt.Key_Tab);
2036 keyClick(Qt.Key_Tab);
2036 tryCompare(launcher, "state", "visible");
2037 tryCompare(launcher, "state", "visible");
2037 tryCompare(launcherPanel, "highlightIndex", -1);
2038 tryCompare(launcherPanel, "highlightIndex", -1);
2038− keyRelease(Qt.Key_Super_L);
2039+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2039 tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2040 tryCompare(launcher, "state", data.launcherLocked ? "visible" : "");
2040 tryCompare(launcherPanel, "highlightIndex", -2);
2041 tryCompare(launcherPanel, "highlightIndex", -2);
2041 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
2042 tryCompare(ApplicationManager, "focusedApplicationId", "unity8-dash");
@@ -2047,11 +2048,11 @@ Rectangle {
2047 var shortcutHint = findChild(findChild(launcher, "launcherDelegate0"), "shortcutHint")
2048 var shortcutHint = findChild(findChild(launcher, "launcherDelegate0"), "shortcutHint")
2048
2049
2049 compare(launcher.state, "");
2050 compare(launcher.state, "");
2050− keyPress(Qt.Key_Super_L);
2051+ keyPress(Qt.Key_Super_L, Qt.MetaModifier);
2051 tryCompare(launcher, "state", "visible");
2052 tryCompare(launcher, "state", "visible");
2052 tryCompare(shortcutHint, "visible", true);
2053 tryCompare(shortcutHint, "visible", true);
2053
2054
2054− keyRelease(Qt.Key_Super_L);
2055+ keyRelease(Qt.Key_Super_L, Qt.MetaModifier);
2055 tryCompare(launcher, "state", "");
2056 tryCompare(launcher, "state", "");
2056 tryCompare(shortcutHint, "visible", false);
2057 tryCompare(shortcutHint, "visible", false);
2057 }
2058 }