on xenial help sign in
Do not emit volumeDown when taking a screenshot
commit363bfef5bc7c23fab01c4e81c51e852a70d05b75 authorJosh Arenson <joshua.arenson@canonical.com> dateMon 8 Dec 2014, 18:32 (12 years ago) parentac73c26
2 files changed+4−5
qml/Components/PhysicalKeysFilter.qml+3−4 qml/Shell.qml+1−1
qml/Components/PhysicalKeysFilter.qml+3−4
@@ -48,7 +48,6 @@ QtObject {
4848
4949 function onKeyPressed(key) {
5050 if (key == Qt.Key_PowerDown || key == Qt.Key_PowerOff) {
51− console.log("JOSH: Pressed power key");
5251 powerKeyPressed = true;
5352 }
5453 else if (key == Qt.Key_VolumeDown) {
@@ -65,11 +64,11 @@ QtObject {
6564 aVolumeKeyWasReleased = false;
6665 }
6766 else if (volumeDownKeyPressed) {
68− console.log("JOSH: VolumeDown!");
6967 if (powerKeyPressed) {
70− console.log("JOSH: TAKE A SCREENSHOT");
68+ screenshotPressed();
69+ } else {
70+ volumeDownPressed();
7171 }
72− volumeDownPressed();
7372 }
7473 else if (volumeUpKeyPressed) {
7574 volumeUpPressed();
qml/Shell.qml+1−1
@@ -159,7 +159,7 @@ Item {
159159
160160 onVolumeDownPressed: volumeControl.volumeDown()
161161 onVolumeUpPressed: volumeControl.volumeUp()
162− //onBothVolumeKeysPressed: screenGrabber.capture()
162+ onScreenshotPressed: screenGrabber.capture()
163163 }
164164
165165 ScreenGrabber {