markcellis / X-KeyPad

2 stars 0 forks source link

Default prefix for keys and encoders #94

Closed sanderdatema closed 3 weeks ago

sanderdatema commented 3 months ago

A good habit for people creating keys and encoders is to prefix them with both the creator's id and the aircraft's id. To facilitate that, please add the option the set a prefix.

This prefix should only be added to new keys (in case a key was imported from another profile, it should not be changed).

If a key is duplicated, a regex should check if the prefix is already in place to avoid repeating prefixes.

The prefix should only have the scope of the profile we're working on, not plugin wide.

In my case a prefix could be passengerflying.a319. for the ToLiss A319 profile. Resulting keys would have names like passengerflying.a319.autopilot.master_caution.button.

GladYouAsked commented 1 month ago

I support this request. Even though most key/encoder-names will be unique, it is likely that there will be some identical names in different profiles. And these special cases are then not easy to spot & fix.

So we need: A field to define that prefix. Assumption: when modifying the prefix this will impact all names immediately (at least all names that had that prefix before). . An optional function to apply the prefix to ALL names in the current profile (to update a profile that did not have a prefix before).

A Checkbox per name to apply the prefix: . default:= true for new items. . default:= false for existing/old items. But you can easily update by checking the box. [Maybe a better place for this is on the "Definition List" and not per single definition as shown in my example below].

A "Copy (Complete) Name" button to copy the name incl. prefix to paste it in the Stream Deck Software image

I am just asking myself if this prefix-concept needs to be extended to Expressive Commands? Or even global formulas?

markcellis commented 3 weeks ago

This will be available in 1.6.1 Beta 6 but it needs a lot of testing.