3
0
replicant-device_samsung_ga.../recovery/recovery_keys.c

46 lines
1.0 KiB
C
Raw Normal View History

2012-07-25 02:32:16 +00:00
#include <linux/input.h>
#include "recovery_ui.h"
#include "common.h"
#include "extendedcommands.h"
int device_handle_key(int key_code, int visible) {
if (visible) {
switch (key_code) {
case KEY_CAPSLOCK:
case KEY_DOWN:
case KEY_VOLUMEDOWN:
return HIGHLIGHT_DOWN;
2012-07-25 02:32:16 +00:00
case KEY_MENU:
return NO_ACTION;
2012-07-25 02:32:16 +00:00
case KEY_LEFTSHIFT:
case KEY_UP:
case KEY_VOLUMEUP:
return HIGHLIGHT_UP;
2012-07-25 02:32:16 +00:00
case KEY_HOMEPAGE:
case KEY_HOME:
2012-07-25 02:32:16 +00:00
case KEY_POWER:
case KEY_LEFTBRACE:
case KEY_ENTER:
case BTN_MOUSE:
case KEY_CAMERA:
case KEY_F21:
case KEY_SEND:
return SELECT_ITEM;
2012-07-25 02:32:16 +00:00
case KEY_END:
case KEY_BACKSPACE:
case KEY_SEARCH:
case KEY_BACK:
if (!ui_root_menu) {
return GO_BACK;
}
2012-07-25 02:32:16 +00:00
}
}
return NO_ACTION;
}