# lv_group.h (/api/core/lv_group_h)



<RelatedHeaders name="lv_group_private.h" isPrivate="false" />

<ApiSummary functions="30" enums="2" typedefs="2" />

Functions [#functions]

<ApiTabs items="[&#x22;Setters (8)&#x22;,&#x22;Getters (10)&#x22;,&#x22;Other (12)&#x22;]">
  <ApiTab value="Setters (8)">
    <ApiMember kind="function" name="lv_group_set_default" file="core/lv_group.h" line="73" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L73">
      lv_group_set_default [#lv_group_set_default]

      Set default group. New Widgets will be added to this group if it's enabled in their class with `add_to_def_group = true`.

      ```c title=" " lineNumbers=1
      void lv_group_set_default(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                        |
      | ------- | ---------------------------------------------------- | ---------------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group (can be `NULL`) |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_focus_cb" file="core/lv_group.h" line="145" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L145">
      lv_group_set_focus_cb [#lv_group_set_focus_cb]

      Set a function for a group which will be called when a new Widget has focus.

      ```c title=" " lineNumbers=1
      void lv_group_set_focus_cb(lv_group_t *group, lv_group_focus_cb_t focus_cb)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name       | Type                                                 | Description                              |
      | ---------- | ---------------------------------------------------- | ---------------------------------------- |
      | `group`    | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group                       |
      | `focus_cb` | <ApiLink name="lv_group_focus_cb_t" />               | the call back function or NULL if unused |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_edge_cb" file="core/lv_group.h" line="152" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L152">
      lv_group_set_edge_cb [#lv_group_set_edge_cb]

      Set a function for a group which will be called when a focus edge is reached

      ```c title=" " lineNumbers=1
      void lv_group_set_edge_cb(lv_group_t *group, lv_group_edge_cb_t edge_cb)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                                 | Description                              |
      | --------- | ---------------------------------------------------- | ---------------------------------------- |
      | `group`   | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group                       |
      | `edge_cb` | <ApiLink name="lv_group_edge_cb_t" />                | the call back function or NULL if unused |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_refocus_policy" file="core/lv_group.h" line="160" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L160">
      lv_group_set_refocus_policy [#lv_group_set_refocus_policy]

      Set whether the next or previous Widget in a group gets focus when Widget that has focus is deleted.

      ```c title=" " lineNumbers=1
      void lv_group_set_refocus_policy(lv_group_t *group, lv_group_refocus_policy_t policy)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name     | Type                                                 | Description             |
      | -------- | ---------------------------------------------------- | ----------------------- |
      | `group`  | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group      |
      | `policy` | <ApiLink name="lv_group_refocus_policy_t" />         | new refocus policy enum |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_editing" file="core/lv_group.h" line="167" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L167">
      lv_group_set_editing [#lv_group_set_editing]

      Manually set the current mode (edit or navigate).

      ```c title=" " lineNumbers=1
      void lv_group_set_editing(lv_group_t *group, bool edit)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                           |
      | ------- | ---------------------------------------------------- | ------------------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to group                      |
      | `edit`  | <ApiLink name="bool" />                              | true: edit mode; false: navigate mode |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_wrap" file="core/lv_group.h" line="175" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L175">
      lv_group_set_wrap [#lv_group_set_wrap]

      Set whether moving focus to next/previous Widget will allow wrapping from first->last or last->first Widget.

      ```c title=" " lineNumbers=1
      void lv_group_set_wrap(lv_group_t *group, bool en)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                                      |
      | ------- | ---------------------------------------------------- | ------------------------------------------------ |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to group                                 |
      | `en`    | <ApiLink name="bool" />                              | true: wrapping enabled; false: wrapping disabled |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_external_data" file="core/lv_group.h" line="253" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L253">
      lv_group_set_external_data [#lv_group_set_external_data]

      Attaches external user data and destructor callback to a group.

      Associates custom user data with an LVGL group and specifies a destructor function that will be automatically invoked when the group is deleted to properly clean up the associated resources.

      ```c title=" " lineNumbers=1
      void lv_group_set_external_data(lv_group_t *group, void *data, void(*free_cb)(void *data))
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name      | Type                                                 | Description                                                                                                                         |
      | --------- | ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
      | `group`   | <ApiLink name="lv_group_t" display="lv_group_t *" /> | Pointer to a group                                                                                                                  |
      | `data`    | `void *`                                             | User-defined data pointer to associate with a group                                                                                 |
      | `free_cb` | `void(*)(void *data)`                                | Callback function for cleaning up ext\_data when group is deleted. Receives ext\_data as parameter. NULL means no cleanup required. |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_set_user_data" file="core/lv_group.h" line="261" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L261">
      lv_group_set_user_data [#lv_group_set_user_data]

      Set user data to the group

      ```c title=" " lineNumbers=1
      void lv_group_set_user_data(lv_group_t *group, void *user_data)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name        | Type                                                 | Description          |
      | ----------- | ---------------------------------------------------- | -------------------- |
      | `group`     | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group   |
      | `user_data` | `void *`                                             | pointer to user data |
    </ApiMember>
  </ApiTab>

  <ApiTab value="Getters (10)">
    <ApiMember kind="function" name="lv_group_get_default" file="core/lv_group.h" line="79" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L79">
      lv_group_get_default [#lv_group_get_default]

      Get default group.

      ```c title=" " lineNumbers=1
      lv_group_t * lv_group_get_default(void)
      ```

      **Returns:** <ApiLink name="lv_group_t" display="lv_group_t *" /> — pointer to the default group
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_focused" file="core/lv_group.h" line="182" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L182">
      lv_group_get_focused [#lv_group_get_focused]

      Get Widget that has focus, or NULL if there isn't one.

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_group_get_focused(const lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                       | Description        |
      | ------- | ---------------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="const lv_group_t *" /> | pointer to a group |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to Widget with focus
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_focus_cb" file="core/lv_group.h" line="189" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L189">
      lv_group_get_focus_cb [#lv_group_get_focus_cb]

      Get focus callback function of a group.

      ```c title=" " lineNumbers=1
      lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                       | Description        |
      | ------- | ---------------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="const lv_group_t *" /> | pointer to a group |

      **Returns:** <ApiLink name="lv_group_focus_cb_t" /> — the call back function or NULL if not set
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_edge_cb" file="core/lv_group.h" line="196" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L196">
      lv_group_get_edge_cb [#lv_group_get_edge_cb]

      Get edge callback function of a group.

      ```c title=" " lineNumbers=1
      lv_group_edge_cb_t lv_group_get_edge_cb(const lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                       | Description        |
      | ------- | ---------------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="const lv_group_t *" /> | pointer to a group |

      **Returns:** <ApiLink name="lv_group_edge_cb_t" /> — the call back function or NULL if not set
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_editing" file="core/lv_group.h" line="203" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L203">
      lv_group_get_editing [#lv_group_get_editing]

      Get current mode (edit or navigate).

      ```c title=" " lineNumbers=1
      bool lv_group_get_editing(const lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                       | Description      |
      | ------- | ---------------------------------------------------------- | ---------------- |
      | `group` | <ApiLink name="lv_group_t" display="const lv_group_t *" /> | pointer to group |

      **Returns:** <ApiLink name="bool" /> — true: edit mode; false: navigate mode
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_wrap" file="core/lv_group.h" line="210" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L210">
      lv_group_get_wrap [#lv_group_get_wrap]

      Get whether moving focus to next/previous Widget will allow wrapping from first->last or last->first Widget.

      ```c title=" " lineNumbers=1
      bool lv_group_get_wrap(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description      |
      | ------- | ---------------------------------------------------- | ---------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to group |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_obj_count" file="core/lv_group.h" line="217" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L217">
      lv_group_get_obj_count [#lv_group_get_obj_count]

      Get number of Widgets in group.

      ```c title=" " lineNumbers=1
      uint32_t lv_group_get_obj_count(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description        |
      | ------- | ---------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group |

      **Returns:** <ApiLink name="uint32_t" /> — number of Widgets in the group
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_obj_by_index" file="core/lv_group.h" line="225" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L225">
      lv_group_get_obj_by_index [#lv_group_get_obj_by_index]

      Get nth Widget within group.

      ```c title=" " lineNumbers=1
      lv_obj_t * lv_group_get_obj_by_index(lv_group_t *group, uint32_t index)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                      |
      | ------- | ---------------------------------------------------- | -------------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group               |
      | `index` | <ApiLink name="uint32_t" />                          | index of Widget within the group |

      **Returns:** <ApiLink name="lv_obj_t" display="lv_obj_t *" /> — pointer to Widget
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_count" file="core/lv_group.h" line="231" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L231">
      lv_group_get_count [#lv_group_get_count]

      Get the number of groups.

      ```c title=" " lineNumbers=1
      uint32_t lv_group_get_count(void)
      ```

      **Returns:** <ApiLink name="uint32_t" /> — number of groups
    </ApiMember>

    <ApiMember kind="function" name="lv_group_get_user_data" file="core/lv_group.h" line="268" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L268">
      lv_group_get_user_data [#lv_group_get_user_data]

      Get a pointer to the user data of the group

      ```c title=" " lineNumbers=1
      void * lv_group_get_user_data(const lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                       |
      | ------- | ---------------------------------------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="const lv_group_t *" /> |

      **Returns:** `void *` — pointer to the user data or NULL if group is NULL
    </ApiMember>
  </ApiTab>

  <ApiTab value="Other (12)">
    <ApiMember kind="function" name="lv_group_create" file="core/lv_group.h" line="60" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L60">
      lv_group_create [#lv_group_create]

      Create new Widget group.

      ```c title=" " lineNumbers=1
      lv_group_t * lv_group_create(void)
      ```

      **Returns:** <ApiLink name="lv_group_t" display="lv_group_t *" /> — pointer to the new Widget group
    </ApiMember>

    <ApiMember kind="function" name="lv_group_delete" file="core/lv_group.h" line="66" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L66">
      lv_group_delete [#lv_group_delete]

      Delete group object.

      ```c title=" " lineNumbers=1
      void lv_group_delete(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description        |
      | ------- | ---------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_add_obj" file="core/lv_group.h" line="86" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L86">
      lv_group_add_obj [#lv_group_add_obj]

      Add an Widget to group.

      ```c title=" " lineNumbers=1
      void lv_group_add_obj(lv_group_t *group, lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                |
      | ------- | ---------------------------------------------------- | -------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group         |
      | `obj`   | <ApiLink name="lv_obj_t" display="lv_obj_t *" />     | pointer to a Widget to add |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_swap_obj" file="core/lv_group.h" line="93" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L93">
      lv_group_swap_obj [#lv_group_swap_obj]

      Swap 2 Widgets in group. Widgets must be in the same group.

      ```c title=" " lineNumbers=1
      void lv_group_swap_obj(lv_obj_t *obj1, lv_obj_t *obj2)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name   | Type                                             | Description               |
      | ------ | ------------------------------------------------ | ------------------------- |
      | `obj1` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to a Widget       |
      | `obj2` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to another Widget |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_remove_obj" file="core/lv_group.h" line="99" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L99">
      lv_group_remove_obj [#lv_group_remove_obj]

      Remove a Widget from its group.

      ```c title=" " lineNumbers=1
      void lv_group_remove_obj(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                 |
      | ----- | ------------------------------------------------ | --------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to Widget to remove |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_remove_all_objs" file="core/lv_group.h" line="105" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L105">
      lv_group_remove_all_objs [#lv_group_remove_all_objs]

      Remove all Widgets from a group.

      ```c title=" " lineNumbers=1
      void lv_group_remove_all_objs(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description        |
      | ------- | ---------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_focus_obj" file="core/lv_group.h" line="111" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L111">
      lv_group_focus_obj [#lv_group_focus_obj]

      Focus on a Widget (defocus the current).

      ```c title=" " lineNumbers=1
      void lv_group_focus_obj(lv_obj_t *obj)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name  | Type                                             | Description                   |
      | ----- | ------------------------------------------------ | ----------------------------- |
      | `obj` | <ApiLink name="lv_obj_t" display="lv_obj_t *" /> | pointer to Widget to focus on |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_focus_next" file="core/lv_group.h" line="117" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L117">
      lv_group_focus_next [#lv_group_focus_next]

      Focus on next Widget in a group (defocus the current).

      ```c title=" " lineNumbers=1
      void lv_group_focus_next(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description        |
      | ------- | ---------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_focus_prev" file="core/lv_group.h" line="123" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L123">
      lv_group_focus_prev [#lv_group_focus_prev]

      Focus on previous Widget in a group (defocus the current).

      ```c title=" " lineNumbers=1
      void lv_group_focus_prev(lv_group_t *group)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description        |
      | ------- | ---------------------------------------------------- | ------------------ |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_focus_freeze" file="core/lv_group.h" line="130" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L130">
      lv_group_focus_freeze [#lv_group_focus_freeze]

      Do not allow changing focus from current Widget.

      ```c title=" " lineNumbers=1
      void lv_group_focus_freeze(lv_group_t *group, bool en)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                                         |
      | ------- | ---------------------------------------------------- | --------------------------------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group                                  |
      | `en`    | <ApiLink name="bool" />                              | true: freeze, false: release freezing (normal mode) |
    </ApiMember>

    <ApiMember kind="function" name="lv_group_send_data" file="core/lv_group.h" line="138" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L138">
      lv_group_send_data [#lv_group_send_data]

      Send a control character to Widget that has focus in a group.

      ```c title=" " lineNumbers=1
      lv_result_t lv_group_send_data(lv_group_t *group, uint32_t c)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                                                 | Description                               |
      | ------- | ---------------------------------------------------- | ----------------------------------------- |
      | `group` | <ApiLink name="lv_group_t" display="lv_group_t *" /> | pointer to a group                        |
      | `c`     | <ApiLink name="uint32_t" />                          | a character (use LV\_KEY\_.. to navigate) |

      **Returns:** <ApiLink name="lv_result_t" /> — result of Widget with focus in group.
    </ApiMember>

    <ApiMember kind="function" name="lv_group_by_index" file="core/lv_group.h" line="238" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L238">
      lv_group_by_index [#lv_group_by_index]

      Get a group by its index.

      ```c title=" " lineNumbers=1
      lv_group_t * lv_group_by_index(uint32_t index)
      ```

      <span className="sr-only">
        Parameters
      </span>

      | Name    | Type                        | Description        |
      | ------- | --------------------------- | ------------------ |
      | `index` | <ApiLink name="uint32_t" /> | index of the group |

      **Returns:** <ApiLink name="lv_group_t" display="lv_group_t *" /> — pointer to the group
    </ApiMember>
  </ApiTab>
</ApiTabs>

Enums [#enums]

<ApiMember kind="enum" name="lv_key_t" file="core/lv_group.h" line="25" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L25">
  lv_key_t [#lv_key_t]

  Predefined keys to control which Widget has focus via lv\_group\_send(group, c)

  | Name               | Value |
  | ------------------ | ----- |
  | `LV_KEY_UP`        | `17`  |
  | `LV_KEY_DOWN`      | `18`  |
  | `LV_KEY_RIGHT`     | `19`  |
  | `LV_KEY_LEFT`      | `20`  |
  | `LV_KEY_ESC`       | `27`  |
  | `LV_KEY_DEL`       | `127` |
  | `LV_KEY_BACKSPACE` | `8`   |
  | `LV_KEY_ENTER`     | `10`  |
  | `LV_KEY_NEXT`      | `9`   |
  | `LV_KEY_PREV`      | `11`  |
  | `LV_KEY_HOME`      | `2`   |
  | `LV_KEY_END`       | `3`   |
</ApiMember>

<ApiMember kind="enum" name="lv_group_refocus_policy_t" file="core/lv_group.h" line="47" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L47">
  lv_group_refocus_policy_t [#lv_group_refocus_policy_t]

  | Name                           | Value |
  | ------------------------------ | ----- |
  | `LV_GROUP_REFOCUS_POLICY_NEXT` | `0`   |
  | `LV_GROUP_REFOCUS_POLICY_PREV` | `1`   |
</ApiMember>

<TypeUsedBy name="lv_group_refocus_policy_t" count="1">
  * `lv_group_set_refocus_policy` — param `policy`
</TypeUsedBy>

Typedefs [#typedefs]

<ApiMember kind="typedef" name="lv_group_focus_cb_t" file="core/lv_group.h" line="44" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L44">
  lv_group_focus_cb_t [#lv_group_focus_cb_t]

  ```c title=" " lineNumbers=1
  typedef void(* lv_group_focus_cb_t) (lv_group_t *)
  ```
</ApiMember>

<TypeUsedBy name="lv_group_focus_cb_t" count="1">
  * `lv_group_set_focus_cb` — param `focus_cb`
</TypeUsedBy>

<ApiMember kind="typedef" name="lv_group_edge_cb_t" file="core/lv_group.h" line="45" url="https://github.com/lvgl/lvgl/tree/a7b95c5b0839ce901c09c205610bc2c77cc3345d/src/core/lv_group.h#L45">
  lv_group_edge_cb_t [#lv_group_edge_cb_t]

  ```c title=" " lineNumbers=1
  typedef void(* lv_group_edge_cb_t) (lv_group_t *, bool)
  ```
</ApiMember>

<TypeUsedBy name="lv_group_edge_cb_t" count="1">
  * `lv_group_set_edge_cb` — param `edge_cb`
</TypeUsedBy>

Dependencies [#dependencies]

<FileIncludes includes="[&#x22;lv_conf_internal.h&#x22;, &#x22;lv_types.h&#x22;, &#x22;lv_ll.h&#x22;]" includedBy="[&#x22;lv_group_private.h&#x22;, &#x22;lv_obj.h&#x22;, &#x22;lv_indev.h&#x22;]" transitiveIncludes="[&#x22;lv_conf_kconfig.h&#x22;]" />
