Skip to content

Comments

feat(color): key shortcuts and quick menu favorites can be set to run stand alone Lua tools#7083

Merged
pfeerick merged 11 commits intomainfrom
philmoz/lua-tool-quick-access
Feb 20, 2026
Merged

feat(color): key shortcuts and quick menu favorites can be set to run stand alone Lua tools#7083
pfeerick merged 11 commits intomainfrom
philmoz/lua-tool-quick-access

Conversation

@philmoz
Copy link
Collaborator

@philmoz philmoz commented Feb 8, 2026

Allow key shortcuts and quick menu favorites to be set to Lua stand alone scripts.

Todo:

  • Companion support - read / write radio.yaml
  • Companion support - key shortcuts and favorites editing
screenshot_tx15_26-02-08_12-27-13 screenshot_tx15_26-02-08_12-27-43 screenshot_tx15_26-02-08_12-28-11

@philmoz philmoz added this to the 3.0 milestone Feb 8, 2026
@philmoz philmoz added enhancement ✨ New feature or request color Related generally to color LCD radios UX-UI Related to user experience (UX) or user interface (UI) behaviour labels Feb 8, 2026
@philmoz
Copy link
Collaborator Author

philmoz commented Feb 8, 2026

Added filter buttons to the shortcut / favorite picker as the menu is getting long.

screenshot_tx15_26-02-08_19-25-16 screenshot_tx15_26-02-08_19-25-26

@philmoz
Copy link
Collaborator Author

philmoz commented Feb 8, 2026

@elecpower - I've done the yaml read/write changes for this; but I could use your expertise for the shortcut and favorite editing.

I'm thinking that if the shortcut/favorite is set to QM_APP then show a file selector next to it with the Lua script tool name (like what is done for Lua Script SF/GF editing).

It's further complicated because the Lua script name may not be the file name - it could be the name embedded in the script file (see radio/src/gui/colorlcd/radio/radio_tools.cpp loadLuaTools() function).

@philmoz philmoz force-pushed the philmoz/lua-tool-quick-access branch from 8517949 to 5cd4169 Compare February 9, 2026 03:32
@elecpower
Copy link
Collaborator

And guess what happens when std::string is added to a struct (again!)? Clue the simulation poops its pants during to initialisation in GeneralSettings copy operator. Found with GX12 in Linux.

@philmoz
Copy link
Collaborator Author

philmoz commented Feb 9, 2026

And guess what happens when std::string is added to a struct (again!)? Clue the simulation poops its pants during to initialisation in GeneralSettings copy operator. Found with GX12 in Linux.

Replaceswith char pointers and dynamic allocation.

@philmoz philmoz force-pushed the philmoz/lua-tool-quick-access branch from e7f8030 to 4eb1286 Compare February 11, 2026 05:15
@elecpower
Copy link
Collaborator

@philmoz I've started working on this

@philmoz
Copy link
Collaborator Author

philmoz commented Feb 14, 2026

@philmoz I've started working on this

Looks good. I made one change to use the folder name as the default for folder based tools.

@elecpower
Copy link
Collaborator

elecpower commented Feb 14, 2026

I know yes to this question creates more work for us but should the lua tools dropdowns be mutually exclusive?

@philmoz
Copy link
Collaborator Author

philmoz commented Feb 14, 2026

I know yes to this question creates more work for us but should the lua tools dropdowns be mutually exclusive?

Not sure what you mean?

@elecpower
Copy link
Collaborator

Not sure what you mean?

What is the likelihood the same lua script would need to be assigned to multiple favourites or shortcuts?

Mutually exclusive within each category.

@philmoz
Copy link
Collaborator Author

philmoz commented Feb 14, 2026

What is the likelihood the same lua script would need to be assigned to multiple favourites or shortcuts?

Mutually exclusive within each category.

Probably overkill.

@elecpower
Copy link
Collaborator

Your feature. Just thought I would ask.

@pfeerick
Copy link
Member

For the favourites/shortcuts it's pretty harmless also... so what if you set them all to MPM Config or whatever!?

@elecpower
Copy link
Collaborator

For the favourites/shortcuts it's pretty harmless also... so what if you set them all to MPM Config or whatever!?

If you set them all the same maybe you should seek medical advice and not operate flying objects or heavy machinery.

@philmoz philmoz force-pushed the philmoz/lua-tool-quick-access branch 2 times, most recently from 5b1b1cf to 71ce4ca Compare February 17, 2026 05:49
@pfeerick
Copy link
Member

This really does look and work great. Two minor niggles, and one somewhat major issue...

Configuring the favourites thus (on handset):
screen-2026-02-18-152020

... resulted in the mangled titles for the two Lua Apps...
screen-2026-02-18-151939

on T15, with the PR firmware. The titles are clearly fine though

screen-2026-02-18-152037

and it is fine when loaded on Companion simulator

image

Companion side seems fine and looks good - read and write cycle was ok:
image

The minor niggles:

  • simply that if you have a favourite set to "NONE", it is effectively ignored. i.e. you can't use it to add a gap to seperate icons. Not sure if that is a good or bad thing... just wondering if it will confuse. I initially set slot 3 to NONE thinking I would get a gap between the apps and the "settings". 🤷
  • if it is possible, it would be nice if when editing a favourite, it at least jumps back the same filter group the current entry is in (if not even highlighting the selected line also)...

On a unrelated note... the ability to remap the keys is a godsend... especially when you so are used to the RM layout and the Jumper one keeps tripping you up... just move that TELE key and made it MDL (i.e. on T15)! 🤣 ❤️

@philmoz
Copy link
Collaborator Author

philmoz commented Feb 18, 2026

Fixed the name issue on radio hardware.

When editing an existing favorite / key shortcut it should select the existing value in the popup list.
However I had previously implemented filtering on the list to prevent duplicate selections; but this then prevented the list showing the current value. It also broke (badly) when apps are selected so I have removed the filtering for now.

Gaps in the favorites list might be tricky.

@pfeerick
Copy link
Member

pfeerick commented Feb 18, 2026

Gaps in the favorites list might be tricky.

That is more just a "if possible"... it is certainly not a blocker. I was initially thinking it could simply add "blank" icons that would probably look just as odd.

Yes, that seems to be working just fine now - and I see what you mean... didn't even notice it was selecting the current entry for the apps but not the settings.

so I have removed the filtering for now.

So you want to re-add it later? Companion currently still does this, but unless you change the value it will preserve duplicates from the radio, so won't need changing to match if this is the case.

@pfeerick pfeerick changed the title feat(color): key shortcuts and quick menu favorites can be set to run stand alone Lua tools. feat(color): key shortcuts and quick menu favorites can be set to run stand alone Lua tools Feb 18, 2026
@philmoz
Copy link
Collaborator Author

philmoz commented Feb 18, 2026

So you want to re-add it later? Companion currently still does this, but unless you change the value it will preserve duplicates from the radio, so won't need changing to match if this is the case.

Filtering fixed to work with both menu items and apps.
For the currently selected favorite or key shortcut the selected value is not excluded so it is automatically highlighted in the popup menu.

@philmoz philmoz force-pushed the philmoz/lua-tool-quick-access branch from b8eb714 to 7103739 Compare February 18, 2026 23:25
@pfeerick pfeerick merged commit 044c2a0 into main Feb 20, 2026
53 checks passed
@pfeerick pfeerick deleted the philmoz/lua-tool-quick-access branch February 20, 2026 03:53
@3DRacer
Copy link

3DRacer commented Feb 22, 2026

Excellent work. Is work already underway on translating the quick menu? In my case, German would be preferable.

@pfeerick
Copy link
Member

If there isn't an open PR, likely not. If German is what you want, you can look over these two that were opened 5-8 hours ago and give feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

color Related generally to color LCD radios enhancement ✨ New feature or request UX-UI Related to user experience (UX) or user interface (UI) behaviour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants