KMKfw / kmk_firmware

Clackety Keyboards Powered by Python
https://kmkfw.zulipchat.com
Other
1.32k stars 458 forks source link

[BUG] Reviung default coords mappings seems wrong #945

Open bvelado opened 3 months ago

bvelado commented 3 months ago

Decription

Using a fresh clone of this repository, I uploaded both kb.py and main.py from boards/gtips/reviung41 on my keyboard, a reviung41 using a boardsource blok controller.

I found out that coord_mapping were not consistent with key mappings in main.py, and also not consistent with the way they were organised to match the actual keyboard shape.

I tried to change it by mapping rows for the left part first, then for the right part and finally for the bottom row, which worked perfectly (w/o changing main.py).

TLDR: Rows in default coord_mapping are mapped as if they were wired for a 3X12 keyboard, while they are actually wired on the keyboard like a split 3X6, starting left hand then right hand.

See https://reviung.com/wp-content/uploads/2020/01/reviung41-pcb-2.jpg

To Reproduce

Steps to reproduce the behavior:

  1. Copy boards/gtips/reviung41 files on your CircuitPython micro controller, powering a rev1.2 Reviung41 PCB

Expected behavior

Default mapping should match what is defined in main.py (alphas for exemple should match a qwerty alphas layout)

Solution (that worked in my case)

In order to have main.py mappings match the actual keyboard layout, I changed coord_mapping to

    coord_mapping = [
              0,  1,  2,  3,  4,  5,    18, 19, 20, 21, 22, 23,
            6,  7,  8,  9, 10, 11,        24, 25, 26, 27, 28, 29,
          12, 13, 14, 15, 16, 17,           30, 31, 32, 33, 34, 35,
                         36,   37,  38,  39,   40,  
    ]

Additional context

I am pretty new to custom keyboards, and even newer to KMK so please be kind, I tried to understand what could have gone wrong before opening this issue!