Skip to content

OnScreenKeyboard Improvement with Joystick and UpDown Encoder#8379

Merged
thebentern merged 15 commits into
meshtastic:developfrom
mtoolstec:msg-popup-on-keyboard
Dec 8, 2025
Merged

OnScreenKeyboard Improvement with Joystick and UpDown Encoder#8379
thebentern merged 15 commits into
meshtastic:developfrom
mtoolstec:msg-popup-on-keyboard

Conversation

@whywilson

@whywilson whywilson commented Oct 17, 2025

Copy link
Copy Markdown
Contributor

Features

  • Reflacter OnScreenKeyboard Module and do less effection on NotificationRender.
  • Show message popup for 3s when Keyboard active.
  • Long press scrolling on JoyStick and upDownEncoder.
IMG_6878.mp4

Attestations

  • I have tested that my proposed changes behave as described.
  • I have tested that my proposed changes do not cause any obvious regressions on the following devices:
    • Meshtiny
    • GAT562 PRO
    • Heltec T114
    • Wio Tracker L1 Pro

@ford-jones ford-jones added enhancement New feature or request baseui Issues directly related to BaseUI labels Oct 19, 2025
@HarukiToreda

Copy link
Copy Markdown
Contributor

I have confirmed this PR works with rocker rotary encoder on both V3 and V4. No regressions found on normal encoder.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 OnScreenKeyboardModule as 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.

Comment thread src/graphics/draw/MenuHandler.cpp Outdated
Comment thread src/modules/OnScreenKeyboardModule.h Outdated
Comment thread src/modules/OnScreenKeyboardModule.cpp Outdated
Comment thread src/input/TrackballInterruptBase.cpp Outdated
Comment thread src/input/TrackballInterruptBase.cpp Outdated
Comment thread src/graphics/draw/NotificationRenderer.cpp
Comment thread src/graphics/draw/NotificationRenderer.cpp
@HarukiToreda HarukiToreda self-requested a review December 8, 2025 03:18
@HarukiToreda

Copy link
Copy Markdown
Contributor

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

@thebentern thebentern merged commit eb08784 into meshtastic:develop Dec 8, 2025
78 checks passed
ponzano pushed a commit to Meshlink-Team/meshlink-firmware that referenced this pull request Dec 8, 2025
…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>
scobert969 pushed a commit to zeropt/meshtastic-firmware that referenced this pull request Dec 22, 2025
…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>
jeek pushed a commit to jeek/Meshtastic-Exploiteers-Hacker-Pager that referenced this pull request Jun 30, 2026
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

baseui Issues directly related to BaseUI enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants