Hybrid device: keypad+encoder

I recently bought an i2c driven navkey. That is a key pad with up, down left, right and center keys associated with an encoder wheel. for lvgl it will be two input devices: a keypad and an encoder. I am conflicted as to what to do wtih the center key.

  • Consider it part of the keypad and sending LV_KEY_ENTER.
  • Consider it part of the encoder and its being pressed equating the encoder button being pressed.
  • Both of the above.

You can even combine them to one input device but it depends on your application. The question is what would be the purpose of the keys.

You can for example use the left, right arrows to navigate among the objects (LV_KEY_NEXT/PREV) and the center key as LV_KEY_ENTER. By turning the encoder you can send LV_KEY_LEFT/RIGHT to change the values of the object.