on xenial help sign in
Remove eventAccepted from PhysicalKeysMapper
commit16ab87b5ae615c54d96c7f12b61fb562c4e447e8 authorJosh Arenson <joshua.arenson@canonical.com> dateThu 11 Dec 2014, 13:00 (12 years ago) parentd2abe97
1 file changed−12
qml/Components/PhysicalKeysMapper.qml−12
qml/Components/PhysicalKeysMapper.qml−12
@@ -39,8 +39,6 @@ QtObject {
3939 signal volumeDownPressed();
4040 signal volumeUpPressed();
4141
42− property bool eventAccepted: false
43−
4442 property bool aPowerKeyWasReleased: true
4543 property bool powerKeyPressed: false
4644
@@ -67,13 +65,10 @@ QtObject {
6765 if (!powerKeyLongPressTimer.running) {
6866 powerKeyLongPressTimer.restart();
6967 }
70− eventAccepted = true;
7168 powerKeyPressed = true;
7269 } else if (key == Qt.Key_VolumeDown) {
73− eventAccepted = true;
7470 volumeDownKeyPressed = true;
7571 } else if (key == Qt.Key_VolumeUp) {
76− eventAccepted = true;
7772 volumeUpKeyPressed = true;
7873 }
7974
@@ -94,26 +89,19 @@ QtObject {
9489 } else if (volumeUpKeyPressed) {
9590 volumeUpPressed();
9691 }
97−
98− return eventAccepted;
9992 }
10093
10194 function onKeyReleased(key) {
10295 if (key == Qt.Key_PowerDown || key == Qt.Key_PowerOff) {
10396 powerKeyLongPressTimer.stop();
104− eventAccepted = true;
10597 powerKeyPressed = false;
10698 aPowerKeyWasReleased = true;
10799 } else if (key == Qt.Key_VolumeDown) {
108− eventAccepted = true;
109100 volumeDownKeyPressed = false;
110101 aVolumeKeyWasReleased = false;
111102 } else if (key == Qt.Key_VolumeUp) {
112− eventAccepted = true;
113103 volumeUpKeyPressed = false;
114104 aVolumeKeyWasReleased = true;
115105 }
116−
117− return eventAccepted;
118106 }
119107}