mirror of
https://github.com/zmkfirmware/zmk.git
synced 2026-03-20 04:55:20 -05:00
fix: Optimize layout changes by doing runtime mapping
* To avoid tons of migration, extra flash writes, etc, we keep the keymaps and settings using a key position index that's tied to the stock layout, and at runtime mapping key positions as needed.
This commit is contained in:
committed by
Pete Johanson
parent
a6d09f8c00
commit
ea1a09bf99
@@ -49,3 +49,12 @@ int zmk_physical_layouts_revert_selected(void);
|
||||
|
||||
int zmk_physical_layouts_get_position_map(uint8_t source, uint8_t dest, size_t map_size,
|
||||
uint32_t map[map_size]);
|
||||
|
||||
/**
|
||||
* @brief Get a pointer to a position map array for mapping a key position in the selected
|
||||
* physical layout to the stock/chosen physical layout
|
||||
*
|
||||
* @retval a negative errno value in the case of errors
|
||||
* @retval a positive length of the position map array that map is updated to point to.
|
||||
*/
|
||||
int zmk_physical_layouts_get_selected_to_stock_position_map(uint32_t const **map);
|
||||
Reference in New Issue
Block a user