Begin scaffolding keyboard nav

This commit is contained in:
Luke Street
2026-04-29 15:19:15 -06:00
parent 3cb7fbd030
commit d92515f0d4
15 changed files with 409 additions and 90 deletions
+9
View File
@@ -24,6 +24,15 @@ Button::Button(Rml::Element* parent, ButtonProps props, const Rml::String& class
mProps.onPressed(event);
}
});
listen(mRoot, Rml::EventId::Keydown, [this](Rml::Event& event) {
const auto cmd = map_nav_event(event);
if (cmd == NavCommand::Confirm) {
if (mProps.onPressed) {
mProps.onPressed(event);
}
event.StopPropagation();
}
});
}
void Button::set_text(const Rml::String& text) {