qmk / qmk_configurator

The QMK Configurator
http://config.qmk.fm
689 stars 343 forks source link

Add support for layout aliases #895

Closed skullydazed closed 3 years ago

skullydazed commented 3 years ago

There is a new field in the keyboard JSON- layout_aliases. This is a mapping of alias -> LAYOUT_macro. For example you can find this in the clueboard/66/rev3 JSON:

"layout_aliases": {
    "KEYMAP":"LAYOUT_all",
    "LAYOUT":"LAYOUT_all"
}

Configurator should use this information at keymap import time to select the correct LAYOUT.

yanfali commented 3 years ago

Side convo. Configurator default keymap JSON files contains both a keymap and layout key. As the info.json files evolve and layouts and keymaps get renamed, legacy configurator json files can be left behind and made non-functional by normal maintenance and evolution. Using this new data structure, remappings can be done automatically by the UI so the legacy files continue to work when users attempt to use the old layouts.