summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--liveview/liveview.cpp15
-rw-r--r--liveview/liveview.h6
-rw-r--r--nekowatchlet/liveview.qml2
3 files changed, 22 insertions, 1 deletions
diff --git a/liveview/liveview.cpp b/liveview/liveview.cpp
index 58bfb83..f293bd9 100644
--- a/liveview/liveview.cpp
+++ b/liveview/liveview.cpp
@@ -418,6 +418,21 @@ void LiveView::handleNavigation(const Message &msg)
qDebug() << "navigation" << event << item_id << menu_id;
switch (event) {
+ case UpPress:
+ emit buttonPressed(1);
+ break;
+ case DownPress:
+ emit buttonPressed(2);
+ break;
+ case LeftPress:
+ emit buttonPressed(3);
+ break;
+ case RightPress:
+ emit buttonPressed(4);
+ break;
+ case SelectPress:
+ emit buttonPressed(0);
+ break;
case SelectLongPress:
if (_mode == ApplicationMode) {
sendResponse(NavigationResponse, ResponseCancel);
diff --git a/liveview/liveview.h b/liveview/liveview.h
index 4df7f10..aba5b32 100644
--- a/liveview/liveview.h
+++ b/liveview/liveview.h
@@ -51,7 +51,7 @@ public:
void clear();
protected:
- static const int DelayBetweenMessages = 5;
+ static const int DelayBetweenMessages = 10;
enum MessageType {
NoMessage = 0,
@@ -106,6 +106,10 @@ protected:
};
enum NavigationEvent {
+ UpPress = 1,
+ DownPress = 4,
+ LeftPress = 7,
+ RightPress = 10,
SelectPress = 13,
SelectLongPress = 14,
SelectDoublePress = 15,
diff --git a/nekowatchlet/liveview.qml b/nekowatchlet/liveview.qml
index fcfb5ff..c1afdbc 100644
--- a/nekowatchlet/liveview.qml
+++ b/nekowatchlet/liveview.qml
@@ -43,6 +43,8 @@ Rectangle {
switch (button) {
case 1:
case 2:
+ case 3:
+ case 4:
goToRandomPosition();
break;
}