Skip to content

[Fix] : VIA custom keycodes index misalignment - display names don't match actual functions #41

Open

Description

@AhaYue

Describe the Bug bridge75 shortcut_bridge75_ansi_via.json

VIA Custom Keycode Mapping Mismatch

Description

In the VIA web configuration tool, custom keycodes (BT1 / BT2 / BT3 / 2.4G / USB) have mismatched display names and actual functionality.

For example:

  • Clicking KC_BT4 actually triggers USB switching
  • Other BT / 2.4G / USB keycodes are also offset and do not match their intended behavior

Root Cause

In VIA, customKeycodes are mapped by array index, not by keycode name.

Therefore, the order of the customKeycodes array in the VIA JSON must exactly match the order of the keycodes array in the firmware info.json.

Any mismatch in ordering will result in a shifted/offset mapping.


Current Mapping (Incorrect)

Firmware info.json keycodes order:

Index 0: BT_HOST1
Index 1: BT_HOST2
Index 2: BT_HOST3
Index 3: BT_2_4G
Index 4: BT_USB

Current VIA JSON:

Index 0: KC_USB → actually triggers BT_HOST1
Index 1: KC_BT1 → actually triggers BT_HOST2
Index 2: KC_BT2 → actually triggers BT_HOST3
Index 3: KC_BT3 → actually triggers BT_2_4G
Index 4: KC_BT4 → actually triggers BT_USB (incorrect)


Expected Mapping (Correct)

Fixed VIA JSON:

Index 0: KC_BT1 → BT_HOST1 ✓
Index 1: KC_BT2 → BT_HOST2 ✓
Index 2: KC_BT3 → BT_HOST3 ✓
Index 3: KC_2G4 → BT_2_4G ✓
Index 4: KC_USB → BT_USB ✓

"customKeycodes": [
{"name": "KC_BT1","title": "BT 1","shortName": "KC_BT1"},
{"name": "KC_BT2","title": "BT 2","shortName": "KC_BT2"},
{"name": "KC_BT3","title": "BT 3","shortName": "KC_BT3"},
{"name": "KC_2G4","title": "2.4G","shortName": "KC_2G4"},
{"name": "KC_USB","title": "USB","shortName": "KC_USB"}
],

Activity

  1. added
    bugSomething isn't working
    help wantedExtra attention is needed
    on Mar 18, 2026
  2. emolitor commented on May 9, 2026

    @emolitor
    Owner

    I will take a look at this next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions