summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crash-popup/src/crash-popup.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/crash-popup/src/crash-popup.c b/crash-popup/src/crash-popup.c
index e169849..c917f63 100644
--- a/crash-popup/src/crash-popup.c
+++ b/crash-popup/src/crash-popup.c
@@ -30,6 +30,8 @@
#include "util_log.h"
#include "crash-popup.h"
+#define KEY_ESC_ON_KEYBOARD "Escape"
+
/**
* callback function of ECORE_EVENT_KEY_DOWN
*/
@@ -37,8 +39,15 @@ static Eina_Bool _ecore_event_key_down_cb(void *data, int type, void *event_info
{
Ecore_Event_Key * kd = (Ecore_Event_Key *) event_info;
- if (0 == strcmp(kd->keyname, KEY_HOME))
- _D("HOME key pressed");
+ _D("%s key pressed", kd->keyname);
+
+ if (0 == strcmp(kd->keyname, KEY_HOME)
+ || 0 == strcmp(kd->keyname, KEY_ESC_ON_KEYBOARD)
+ || 0 == strcmp(kd->keyname, KEY_BACK)) {
+ elm_exit();
+ return EINA_FALSE;
+ }
+
return EINA_TRUE;
}
static void _keygrab(void *data)