OnScreenKeyboard Improvement with Joystick and UpDown Encoder#8379
Conversation
|
I have confirmed this PR works with rocker rotary encoder on both V3 and V4. No regressions found on normal encoder. |
There was a problem hiding this comment.
Pull request overview
This PR refactors the on-screen keyboard functionality into a dedicated OnScreenKeyboardModule to reduce coupling with NotificationRenderer, and adds enhanced input handling features including message popups during keyboard use and long-press scrolling support for joystick and encoder inputs.
Key Changes:
- Introduced
OnScreenKeyboardModuleas a singleton to manage virtual keyboard lifecycle and popup overlays - Added long-press repeat functionality for trackball/joystick direction inputs with configurable intervals
- Implemented transient popup notifications that appear over the active keyboard when messages are received
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/modules/OnScreenKeyboardModule.h |
New header defining the keyboard module interface with popup management methods |
src/modules/OnScreenKeyboardModule.cpp |
Implementation of keyboard lifecycle, input handling, and popup rendering with text wrapping |
src/modules/CannedMessageModule.cpp |
Updated to use OnScreenKeyboardModule::stop() instead of direct cleanup |
src/input/TrackballInterruptBase.h |
Added direction detection state variables for long-press support |
src/input/TrackballInterruptBase.cpp |
Implemented long-press repeat logic for directional inputs |
src/graphics/draw/NotificationRenderer.h |
Added showKeyboardMessagePopupWithTitle() method for popup display |
src/graphics/draw/NotificationRenderer.cpp |
Integrated popup overlay rendering and added long-press navigation support |
src/graphics/draw/MenuHandler.cpp |
Added include for mesh/Default.h (appears duplicated) |
src/graphics/Screen.cpp |
Refactored to use OnScreenKeyboardModule and show popups when messages arrive during text input |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ging the T_LORA_PAGER
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
I tested this PR on both L1 and Meshtiny. This PR makes the input for both joystick and encoders much faster and snappier. No conflits with normal one button operation or full keyboard devices like the Tdeck and carkb devices like the NRF-TXT |
…stic#8379) * Add mesh/Default.h include. * Reflacter OnScreenKeyBoard Module, do not interrupt keyboard when new message comes. * feat: Add long press scrolling for Joystick and upDown Encoder on baseUI frames and menus. * refactor: Clean up code formatting and improve readability in Screen and OnScreenKeyboardModule * Fix navigation on UpDownEncoder, default was RotaryEncoder while bringing the T_LORA_PAGER * Update src/graphics/draw/MenuHandler.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/OnScreenKeyboardModule.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/graphics/draw/NotificationRenderer.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Optimize the detection logic for repeated events of the arrow keys. * Fixed parameter names in the OnScreenKeyboardModule::start * Trunk fix * Reflator OnScreenKeyboard Input checking, make it simple * Simplify long press logic in OnScreenKeyboardModule. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…stic#8379) * Add mesh/Default.h include. * Reflacter OnScreenKeyBoard Module, do not interrupt keyboard when new message comes. * feat: Add long press scrolling for Joystick and upDown Encoder on baseUI frames and menus. * refactor: Clean up code formatting and improve readability in Screen and OnScreenKeyboardModule * Fix navigation on UpDownEncoder, default was RotaryEncoder while bringing the T_LORA_PAGER * Update src/graphics/draw/MenuHandler.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/OnScreenKeyboardModule.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/graphics/draw/NotificationRenderer.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Optimize the detection logic for repeated events of the arrow keys. * Fixed parameter names in the OnScreenKeyboardModule::start * Trunk fix * Reflator OnScreenKeyboard Input checking, make it simple * Simplify long press logic in OnScreenKeyboardModule. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…stic#8379) * Add mesh/Default.h include. * Reflacter OnScreenKeyBoard Module, do not interrupt keyboard when new message comes. * feat: Add long press scrolling for Joystick and upDown Encoder on baseUI frames and menus. * refactor: Clean up code formatting and improve readability in Screen and OnScreenKeyboardModule * Fix navigation on UpDownEncoder, default was RotaryEncoder while bringing the T_LORA_PAGER * Update src/graphics/draw/MenuHandler.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/modules/OnScreenKeyboardModule.h Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update src/graphics/draw/NotificationRenderer.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Optimize the detection logic for repeated events of the arrow keys. * Fixed parameter names in the OnScreenKeyboardModule::start * Trunk fix * Reflator OnScreenKeyboard Input checking, make it simple * Simplify long press logic in OnScreenKeyboardModule. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Features
IMG_6878.mp4
Attestations