it should be break & long, not only break
This commit is contained in:
@@ -169,13 +169,17 @@ void TabsGroup::onEvent(event_t event)
|
||||
{
|
||||
TRACE_WINDOWS("%s received event 0x%X", getWindowDebugString().c_str(), event);
|
||||
|
||||
#if defined(KEYS_GPIO_REG_DGUP)
|
||||
if (event == EVT_KEY_BREAK(KEY_PGDN) || event == EVT_KEY_LONG(KEY_PGDN)) {
|
||||
#else
|
||||
if (event == EVT_KEY_BREAK(KEY_PGDN)) {
|
||||
#endif
|
||||
killEvents(event);
|
||||
uint8_t current = header.carousel.getCurrentIndex() + 1;
|
||||
setCurrentTab(current >= tabs.size() ? 0 : current);
|
||||
}
|
||||
#if defined(KEYS_GPIO_REG_DGUP)
|
||||
else if (event == EVT_KEY_BREAK(KEY_PGUP)) {
|
||||
else if (event == EVT_KEY_BREAK(KEY_PGUP) || event == EVT_KEY_LONG(KEY_PGUP)) {
|
||||
#else
|
||||
else if (event == EVT_KEY_LONG(KEY_PGDN)) {
|
||||
#endif
|
||||
|
||||
@@ -278,6 +278,9 @@ void ViewMain::onEvent(event_t event)
|
||||
break;
|
||||
|
||||
case EVT_KEY_BREAK(KEY_PGDN):
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
case EVT_KEY_LONG(KEY_PGDN):
|
||||
#endif
|
||||
killEvents(event);
|
||||
nextMainView();
|
||||
break;
|
||||
@@ -286,6 +289,7 @@ void ViewMain::onEvent(event_t event)
|
||||
// -> board code should map the keys as required
|
||||
#if defined(KEYS_GPIO_REG_PGUP)
|
||||
case EVT_KEY_BREAK(KEY_PGUP):
|
||||
case EVT_KEY_LONG(KEY_PGUP):
|
||||
#else
|
||||
case EVT_KEY_LONG(KEY_PGDN):
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user