diff options
author | Steve Kondik <shade@chemlab.org> | 2013-12-09 00:33:52 -0800 |
---|---|---|
committer | Tom Marshall <tdm@cyngn.com> | 2015-11-20 15:46:40 -0800 |
commit | 06d6208a29c845983832351c6a651329ecb30a9f (patch) | |
tree | f67ddc1944768628735f0bdbd7fb0cfb194aac56 /device.cpp | |
parent | c00a32f061458e996d1acaa147736a7ed055ce73 (diff) | |
download | bootable_recovery-06d6208a29c845983832351c6a651329ecb30a9f.zip bootable_recovery-06d6208a29c845983832351c6a651329ecb30a9f.tar.gz bootable_recovery-06d6208a29c845983832351c6a651329ecb30a9f.tar.bz2 |
Add back and home key handling.
Change-Id: I5abac0f1b59d480b859f77ce16126f13fccd440b
Diffstat (limited to 'device.cpp')
-rw-r--r-- | device.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -29,6 +29,8 @@ static const char* MENU_ITEMS[] = { NULL }; +extern int ui_root_menu; + const char* const* Device::GetMenuItems() { return MENU_ITEMS; } @@ -54,18 +56,31 @@ int Device::HandleMenuKey(int key, int visible) { } switch (key) { + case KEY_RIGHTSHIFT: case KEY_DOWN: case KEY_VOLUMEDOWN: + case KEY_MENU: return kHighlightDown; + case KEY_LEFTSHIFT: case KEY_UP: case KEY_VOLUMEUP: + case KEY_SEARCH: return kHighlightUp; case KEY_ENTER: case KEY_POWER: + case BTN_MOUSE: + case KEY_HOME: + case KEY_HOMEPAGE: + case KEY_SEND: return kInvokeItem; + case KEY_BACKSPACE: + case KEY_BACK: + if (!ui_root_menu) + return kGoBack; + default: // If you have all of the above buttons, any other buttons // are ignored. Otherwise, any button cycles the highlight. |