remap-keys / remap

Keymap Customization Web app for your keyboard.
https://remap-keys.app
Other
227 stars 27 forks source link

Support Custom Keycodes. #735

Closed yoichiro closed 2 years ago

yoichiro commented 2 years ago

Fix #729 and #707

This pull request adds a new feature to support the "Custom Keycodes`. This custom keycodes are defined in the VIA JSON file, and it provides custom label, short name and description for each USER** keys.

When there is no custom keycodes in VIA JSON file, USER** keys are displayed with default names.

Screenshot_20220912_144639

In the other hand, if a VIA JSON file has a custom keycodes definition like the following:

"customKeycodes": [
    { "name": "A_CW", "title": "A_CW", "shortName": "A_CW" },
    { "name": "A_CCW", "title": "A_CCW", "shortName": "A_CC" },
    { "name": "B_CW", "title": "B_CW", "shortName": "B_CW" },
    { "name": "B_CCW", "title": "B_CCW", "shortName": "B_CC" },
    { "name": "C_CW", "title": "C_CW", "shortName": "C_CW" },
    { "name": "C_CCW", "title": "C_CCW", "shortName": "C_CC" },
    { "name": "D_CW", "title": "D_CW", "shortName": "D_CW" },
    { "name": "D_CCW", "title": "D_CCW", "shortName": "D_CC" },
    { "name": "E_CW", "title": "E_CW", "shortName": "E_CW" },
    { "name": "E_CCW", "title": "E_CCW", "shortName": "E_CC" },
    { "name": "F_CW", "title": "F_CW", "shortName": "F_CW" },
    { "name": "F_CCW", "title": "F_CCW", "shortName": "F_CC" },
    { "name": "A_X", "title": "A_X", "shortName": "A_X" },
    { "name": "B_X", "title": "B_X", "shortName": "B_X" },
    { "name": "C_X", "title": "C_X", "shortName": "C_X" },
    { "name": "D_X", "title": "D_X", "shortName": "D_X" }
]

Each USER** key label is changed with their definitions like the following:

Screenshot_20220912_144709