Skip to content

Fixes and improvements - #620

Open
KenVanHoeylandt wants to merge 9 commits into
mainfrom
develop
Open

Fixes and improvements#620
KenVanHoeylandt wants to merge 9 commits into
mainfrom
develop

Conversation

@KenVanHoeylandt

@KenVanHoeylandt KenVanHoeylandt commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • New Features

    • Standardized keyboard input using Unicode-based key codes across supported devices and the simulator.
    • Improved LVGL keyboard device management, including duplicate prevention and reliable reconnects.
    • Added safer file-mutex registration and cleanup behavior.
  • Bug Fixes

    • Corrected Enter and navigation key behavior across supported keyboards, buttons, and USB input.
    • Improved LVGL startup/shutdown stability and memory allocation reliability.
    • Increased simulator LVGL memory capacity and improved USB device-class handling.
  • Documentation

    • Added guidance for LVGL custom memory allocation and keyboard input encoding.

- custom lvgl alloc
- keyboard drivers now uses codepoints only (no more hardwired LV_KEY_*)
- fix lvgl file lock when lvgl is stopped
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c3603419-2acc-4ef8-9241-ca3611d67ab1

📥 Commits

Reviewing files that changed from the base of the PR and between dc81063 and 850f982.

📒 Files selected for processing (2)
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp
  • Platforms/platform-esp32/source/drivers/usb/esp32_usb_device_controller.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The change standardizes keyboard input around Unicode codepoints and adds LVGL translation at the input boundary. Device keymaps and keyboard drivers update Enter, navigation, and control mappings. LVGL gains a custom memory backend with ESP32 fallback handling and whole-archive configuration. File-mutex registration now uses synchronized IDs with explicit cleanup. LVGL startup and shutdown manage mutex resources and keyboard devices. Statusbar subscription ordering changes, and one boot log message is removed.

Merge Risk: 🟠 High · up to 850f9

The PR changes keyboard input handling but still contains a build-blocking codepoint mismatch and can mis-handle Enter, navigation, and modifier-based keys, while a statusbar update may remain stale in a creation race. These issues should be fixed before merging.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title is generic and does not identify the main changes, which include keyboard codepoint migration, LVGL allocator updates, and mutex lifecycle changes. Replace the title with a specific summary of the primary changes, such as “Migrate keyboard input to Unicode codepoints and improve LVGL memory and mutex handling.”
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed Docstring check was indeterminate for this PR — some files could not be analyzed in time. Not blocking.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 6


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7c220b4e-a7ab-40c4-944b-8f8083854484

📥 Commits

Reviewing files that changed from the base of the PR and between 4fea48f and 5707c27.

📒 Files selected for processing (30)
  • Buildscripts/module.cmake
  • Buildscripts/sdkconfig/default.properties
  • Devices/cl32/cl32.dts
  • Devices/lilygo-tdeck-max/lilygo,tdeck-max.dts
  • Devices/lilygo-tdeck-pro/lilygo,tdeck-pro.dts
  • Devices/lilygo-tlora-pager/lilygo,tlora-pager.dts
  • Devices/m5stack-tab5/Source/devices/tab5_keyboard.cpp
  • Devices/simulator/Source/drivers/sdl_input.cpp
  • Drivers/button-control-module/source/button_control.cpp
  • Drivers/m5stack-module/source/cardputer_adv_keyboard.cpp
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp
  • Drivers/tca8418-module/bindings/ti,tca8418.yaml
  • Modules/lvgl-module/CMakeLists.txt
  • Modules/lvgl-module/README.md
  • Modules/lvgl-module/include/lvgl/devices/keyboard.h
  • Modules/lvgl-module/source/devices/keyboard.cpp
  • Modules/lvgl-module/source/lv_mem_custom.c
  • Platforms/platform-esp32/source/drivers/usb/esp32_usbhost_hid.cpp
  • Tactility/Source/Tactility.cpp
  • Tactility/Source/app/boot/Boot.cpp
  • Tactility/Source/file/FileMutexLvgl.cpp
  • Tactility/Source/lvgl/KeyboardDeviceListener.cpp
  • Tactility/Source/lvgl/Statusbar.cpp
  • TactilityKernel/include/tactility/drivers/keyboard.h
  • TactilityKernel/include/tactility/filesystem/file_mutex.h
  • TactilityKernel/source/filesystem/file_mutex.cpp
  • TactilityKernel/source/memory_esp32.cpp
  • TactilityKernel/source/symbols.c
  • TactilityKernel/tests/source/file_mutex_test.cpp
  • lv_conf.h
💤 Files with no reviewable changes (1)
  • Tactility/Source/app/boot/Boot.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Comment thread Drivers/tca8418-module/bindings/ti,tca8418.yaml Outdated
Comment thread Modules/lvgl-module/README.md Outdated
Comment thread Modules/lvgl-module/source/devices/keyboard.cpp
Comment thread Tactility/Source/lvgl/Statusbar.cpp
Comment thread TactilityKernel/include/tactility/drivers/keyboard.h
Comment thread TactilityKernel/include/tactility/drivers/keyboard.h Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Drivers/tca8418-module/bindings/ti,tca8418.yaml (1)

29-38: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Use a keymap element type that preserves full Unicode codepoints.

If keymap-* must carry all KeyboardKeyData::key values, uint8_t is too narrow. The project defines arrows as U+2190–U+2193 and Home/End as U+21F1–U+21F2. These values cannot survive an 8-bit binding. (raw.githubusercontent.com)

Change the binding and generated driver storage to a 32-bit element type. Otherwise, non-character keys will be truncated or rejected before LVGL translation.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 361903be-3641-4344-93aa-6bd8c0a4adf4

📥 Commits

Reviewing files that changed from the base of the PR and between 5707c27 and 0a2bab4.

📒 Files selected for processing (8)
  • Drivers/m5stack-module/source/cardputer_adv_keyboard.cpp
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp
  • Drivers/tca8418-module/bindings/ti,tca8418.yaml
  • Modules/lvgl-module/README.md
  • Modules/lvgl-module/include/lvgl/devices/keyboard.h
  • Modules/lvgl-module/source/devices/keyboard.cpp
  • Tactility/Source/lvgl/Statusbar.cpp
  • TactilityKernel/include/tactility/drivers/keyboard.h
🚧 Files skipped from review as they are similar to previous changes (2)
  • Modules/lvgl-module/README.md
  • TactilityKernel/include/tactility/drivers/keyboard.h

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread Drivers/m5stack-module/source/cardputer_adv_keyboard.cpp
Comment thread Drivers/m5stack-module/source/cardputer_keyboard.cpp Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Drivers/m5stack-module/source/cardputer_keyboard.cpp (1)

257-267: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Use focus-navigation codepoints for Fn group navigation.

CODEPOINT_ARROW_UP and CODEPOINT_ARROW_DOWN are translated by Modules/lvgl-module/source/devices/keyboard.cpp to LV_KEY_UP and LV_KEY_DOWN. Fn+; and Fn+. can therefore toggle widgets such as lv_switch, contrary to this comment’s stated focus-navigation behavior.

Return dedicated focus-navigation codepoints and translate them to the corresponding LVGL focus keys at the LVGL boundary.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4c923851-d3dd-4c1d-9b0d-350d5c863d5e

📥 Commits

Reviewing files that changed from the base of the PR and between 0a2bab4 and dc81063.

📒 Files selected for processing (1)
  • Drivers/m5stack-module/source/cardputer_keyboard.cpp

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.

Comment thread Drivers/m5stack-module/source/cardputer_keyboard.cpp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant