Skip to content

Add keyboard wrapper library (Refactor for Onion#1318)#10

Open
Infernoss2 wants to merge 5 commits intoOnionUI:mainfrom
Infernoss2:feat/keyboard-lib-refactor-1318
Open

Add keyboard wrapper library (Refactor for Onion#1318)#10
Infernoss2 wants to merge 5 commits intoOnionUI:mainfrom
Infernoss2:feat/keyboard-lib-refactor-1318

Conversation

@Infernoss2
Copy link

This PR implements the keyboard wrapper library needed for global GUI support (resolves OnionUI/Onion#1318), building on @XK9274's initial work.
Changes:

  • Extracted launch_keyboard from main.cpp into a dedicated keyboard_lib.cpp.

  • Added extern "C" linkage in keyboard.h for compatibility with Onion's C codebase.

  • Implemented dup_cstr to safely allocate strings (ownership transferred to the C caller).

@XK9274
Copy link
Member

XK9274 commented Mar 6, 2026

Checked the changes, looks good.

What's your testing checklist look like for this change ? Happy to review and merge now if it's tested fully 👍

@Infernoss2
Copy link
Author

Unfortunately I dont have the physical Miyoo Mini device, so I cannot test the graphical UI execution.

Here is what I have could check:

  • Verified the project compiles successfully without errors using the updated code.
  • Code review: Verified extern "C" linkage is correctly set up for Onion's C codebase.
  • Code review: Verified memory allocation (dup_cstr with malloc) properly transfers ownership to the C caller to prevent memory leaks.

If there is anything else you want me to check/do pls tell me.

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.

Push back keyboard library modification to search filter repo

2 participants