Request for LV_STATE_EDITED and LV_STATE_FOCUS_KEY in SLS

What do you want to achieve?

Be able to do two things:

  1. Set the style for the LV_STATE_EDITED style from within SLS. Add the EDITED state to the STYLE SETTINGS > STATE > drop-down menu, so code for the LV_STATE_EDITED will be generated.

  2. Preview the style for LV_STATE_EDITED and LV_STATE_FOCUS_KEY. Adding a checkbox in the States pane for Edited and Focus Key would be perfect. It does not matter that the “Play” mode in SLS will not cause FOCUS_KEY state to happen, just being able to preview it manually would be excellent.

Do you see alternative options and workaround to achieve it?

The only workaround is to manually set the EDITED style in code, which is problematic for obvious reasons. For FOCUS_KEY, we can set the style but we cannot preview it so we must either copy/paste every individual style value from FOCUS_KEY to some other state like USER_1, just to preview it. Or we must export the sources, compile code and flash to hardware or run it on our own simulator software. Either way, it’s time consuming, which a simple checkbox would work, like the USER states have.

Mention some use cases

Applications using Encoder input devices. Perhaps Keypad/button input devices (I haven’t tested this though)

For example, we have a set of red, blue, and orange buttons that we want a red, blue and orange outline for each to indicate focussed state. To do this, we have to use the workarounds above (which is a source of errors).

Hi, thank you for your feedback. we will think about the best solution to achieve this.