Software keyboard refactored (#594)

Removed software keyboard in Tactility subproject (GuiService, Lvgl.cpp) and re-implemented it in TactilityKernel.
This commit is contained in:
Ken Van Hoeylandt
2026-07-28 00:04:09 +02:00
committed by GitHub
parent 58a529cc44
commit e6e1dcd0ca
18 changed files with 391 additions and 309 deletions
@@ -10,7 +10,7 @@
#include <tactility/concurrent/dispatcher.h>
#include <lvgl.h>
#include <lvgl/devices/keyboard.h>
namespace tt::service::gui {
@@ -47,8 +47,7 @@ class GuiService final : public Service {
// App-specific
std::shared_ptr<app::AppInstance> appToRender = nullptr;
lv_obj_t* keyboard = nullptr;
lv_group_t* keyboardGroup = nullptr;
LvglSoftwareKeyboard software_keyboard = {};
bool isStarted = false;
@@ -92,6 +91,8 @@ public:
*/
void softwareKeyboardHide();
void keyboardAddTextArea(lv_obj_t* textarea);
/**
* The on-screen keyboard is only shown when both of these conditions are true:
* - there is no hardware keyboard
@@ -99,15 +100,6 @@ public:
* @return if we should show a on-screen keyboard for text input inside our apps
*/
bool softwareKeyboardIsEnabled();
/**
* Glue code for the on-screen keyboard and the hardware keyboard:
* - Attach automatic hide/show parameters for the on-screen keyboard.
* - Registers the textarea to the default lv_group_t for hardware keyboards.
* @param[in] textarea
*/
void keyboardAddTextArea(lv_obj_t* textarea);
};
std::shared_ptr<GuiService> findService();