#Solved: Handwired hardwired (non split, sort of) build issue

1 messages · Page 1 of 1 (latest)

fierce jetty
#

Repo: https://github.com/Endracion/zmk-config-klorhand
The physical setup is based on the Klor, but it's all hardwired and handwired, so the two halves are all on one board.

I'm getting this error: devicetree error: /tmp/zmk-config/config/boards/shields/klorhand/klorhand.keymap:55 (column 83): parse error: expected number or parenthesized expression
Which leads to the keymap file, right where the break between the two "virtual halves" are. I've set it up in a way that each half just has a different set of pins in the matrix, in this arrangement:

#
//              ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// 0            │    Q    │    W    │    F    │    P    │    G    │
//    ┌─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
// 1  │   TAB   │    A    │    R    │    S    │    T    │    D    │
//    ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤
// 2  │   DEL   │    Z    │    X    │    C    │    V    │    B    │
//    └─────────┴─────────┴─────────┴─────────┼─────────┼─────────┼─────────┬─────────┐
// 3                                          │  CTRL   │  LOWER  │  SPACE  │   ALT   │
//                                            └─────────┴─────────┴─────────┴─────────┘
//        8         9        10        11        12        13        14        15
//                       ┌─────────┬─────────┬─────────┬─────────┬─────────┐
// 4                     │    J    │    L    │    U    │    Y    │    ;    │   
//                       ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┐                                       
// 5                     │    H    │    N    │    E    │    I    │    O    │    "    │                                       
//                       ├─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤                                       
// 6                     │    K    │    M    │    ,    │    .    │    /    │    \    │                                       
//    ┌────────┬─────────┼─────────┼─────────┼─────────┴─────────┴─────────┴─────────┘                                       
// 7  │CMD/WIN │  ENTER  │  RAISE  │  BSPCE  │                                         
//    └────────┴─────────┴─────────┴─────────┘    ```
#

And basically the error shows up in these bindings, where the LEFT_ALT ends, I'm not sure why.

              &kp Q     &kp W     &kp F     &kp P     &kp G               
    &kp TAB   &kp A     &kp R     &kp S   &hm LSHFT T &kp D              
    &kp DEL   &kp Z     &kp X     &kp C     &kp V     &kp B              
                                            &kp LCTRL &mo LOWER &kp SPACE &kp LEFT_ALT
                        &kp J     &kp L     &kp U     &kp Y     &kp SEMI
                        &kp H   &hm RSHFT N &kp E     &kp I     &kp O     &kp SQT
                        &kp K     &kp M     &kp COMMA &kp DOT   &kp FSLH  &kp BSLH
    &kp LGUI  &kp RET   &mo RAISE &kp BSPC
                        >;```
#

I've defined 8 rows and 16 columns (4 and 8 per side, but combined)

#

This is how I broke down the GPIOs:

            = <&gpio0 0 GPIO_ACTIVE_HIGH>
            , <&gpio0 1 GPIO_ACTIVE_HIGH>
            , <&gpio0 2 GPIO_ACTIVE_HIGH>
            , <&gpio0 3 GPIO_ACTIVE_HIGH>
            , <&gpio0 16 GPIO_ACTIVE_HIGH>
            , <&gpio0 17 GPIO_ACTIVE_HIGH>
            , <&gpio0 18 GPIO_ACTIVE_HIGH>
            , <&gpio0 19 GPIO_ACTIVE_HIGH>
            ;

        row-gpios
            = <&gpio0 4 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 6 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 7 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 8 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 9 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 10 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 11 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 20 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 21 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 22 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 26 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 27 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 28 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 29 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            , <&gpio0 23 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>
            ;```
#

0-3 and 4-11 for the left side and then 16-19 and 20-29 for the right (they're ordered different to follow the physical board numbers)

glad estuary
#

You aren't defining LOWER anywhere -- you need to either have a #define LOWER 1 or directly use 1 instead (assuming you'll add such a layer later)

fierce jetty
#

ohh ok

glad estuary
#

The matrix transform seems weirder than it needs to be, why don't you put the halves side by side?

fierce jetty
glad estuary
#

No, you can put the items wherever you want in the matrix transform. That is its purpose

fierce jetty
#

I was trying to just make sense of it physically with where the wires go

glad estuary
#

The transform provides the abstraction between how you wired and how the keymap keys are arranged

#

If you like you can keep them that way, but there is no need to

fierce jetty
#

do the spaces in the matrix matter?

#

if not, it does just help me visualize it as a grid

glad estuary
#

No, but the order of the items determines how you order them in the keymap

fierce jetty
#

ok yeah, I'll double check that it's indeed in the same order, I tried to space them out the same too

glad estuary
#

They seem to be similar at least. I think I am not describing my point

#

All I mean is you can do this if you want, both in the matrix transform and in the keymap

#

That is usually a more intuitive for split keyboards

#

There is nothing wrong with e.g. RC(4, 10) coming after RC(0, 5)

fierce jetty
#

ah yeah I see what you mean

#

so the bindings take a look at the matrix_transform to make sense of the order, right? I'll put them back all in one block, but I'm not sure why the error is always the same at that specific point, I must still be missing something

glad estuary
#

Yep

fierce jetty
#

right, forgot :S

glad estuary
#

That's the error

fierce jetty
#

so the error points to the end of the line, but it's somewhere in that line ultimately and in this case, it was LOWER not being defined

#

thanks for your help 😄

glad estuary
#

Regarding the column number