@@ -0,0 +1,55 @@
2+ * Copyright (C) 2014 Canonical, Ltd.
5+ * Josh Arenson <joshua.arenson@canonical.com>
7+ * This program is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation; version 3.
11+ * This program is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ * GNU General Public License for more details.
16+ * You should have received a copy of the GNU General Public License
17+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
22+ \brief A filter for the physical keys on the device
24+ A filter to handle events triggered by pressing physical keys on a device.
30+ This allows for handling the following events
31+ * Volume Decreases/Increases
39+ signal volumeUpPressed()
40+ signal volumeDownPressed()
41+ signal screenshotPressed()
43+ property bool aVolumeKeyWasReleased: true
44+ property bool volumeDownKeyPressed: false
45+ property bool volumeUpKeyPressed: false
47+ function onKeyPressed(key) {
49+ case Qt.Key_VolumeDown:
50+ volumeDownKeyPressed = true;
51+ case Qt.Key_VolumeUp:
52+ volumeUpKeyPressed = true;