diff --git a/apps/apps_container.cpp b/apps/apps_container.cpp index 1bb917ddc..abb0c0a88 100644 --- a/apps/apps_container.cpp +++ b/apps/apps_container.cpp @@ -243,15 +243,18 @@ bool AppsContainer::processEvent(Ion::Events::Event event) { } return true; } + // If key home or key back is pressed, we switch to the home app. if (event == Ion::Events::Home || event == Ion::Events::Back) { switchTo(appSnapshotAtIndex(0)); return true; } + // If shift + Home are pressed, we switch to the first app. if (event == Ion::Events::ShiftHome) { switchTo(appSnapshotAtIndex(1)); return true; } + // Iterate through the switch events to find the one that matches the event, if one match, switch to the app at the index of the switch event. for(int i = 0; i < std::min((int) (sizeof(switch_events) / sizeof(Ion::Events::Event)), APPS_CONTAINER_SNAPSHOT_COUNT); i++) { if (event == switch_events[i]) { m_window.redraw(true); @@ -260,6 +263,12 @@ bool AppsContainer::processEvent(Ion::Events::Event event) { } } + // Add EE shortcut to go to the settings (app number 12) + if (event == Ion::Events::EE) { + switchTo(appSnapshotAtIndex(12)); + return true; + } + if (event == Ion::Events::OnOff) { suspend(true); return true; diff --git a/ion/include/ion/events.h b/ion/include/ion/events.h index 394271cf2..51c8da397 100644 --- a/ion/include/ion/events.h +++ b/ion/include/ion/events.h @@ -171,7 +171,7 @@ constexpr Event DoubleParenthesis = Event::ShiftKey(Keyboard::Key::LeftParenthes constexpr Event ShiftZero = Event::ShiftKey(Keyboard::Key::Zero); constexpr Event ShiftDot = Event::ShiftKey(Keyboard::Key::Dot); -constexpr Event ShiftEE = Event::PlainKey(Keyboard::Key::EE); +constexpr Event ShiftEE = Event::ShiftKey(Keyboard::Key::EE); constexpr Event ShiftOne = Event::ShiftKey(Keyboard::Key::One); constexpr Event ShiftTwo = Event::ShiftKey(Keyboard::Key::Two);