Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Combos for ZMK #1

Open
auipga opened this issue Mar 20, 2023 · 0 comments
Open

Combos for ZMK #1

auipga opened this issue Mar 20, 2023 · 0 comments

Comments

@auipga
Copy link

auipga commented Mar 20, 2023

I recently "translated" your awesome combo work to ZMK.
I'm using this keymap-german-rev3.h file because I set my OS's input method to German. One could easily reverse that.

If somebody wants to use this and a base, here's my code:

#define COMBO(KP, KEYPOS, NAME) \
    combo_##NAME { \
        timeout-ms = <40>; \
        key-positions = <KEYPOS>; \
        layers = <0>; \
        bindings = <&kp KP>; \
    };
combos {
    compatible = "zmk,combos";

    // key numbers
    //       0   1   2   3   4   5                      6   7   8   9  10  11
    //      12 [13][14][15][16] 17                     18 [19][20][21][22] 23
    //      24  25  26  27  28  29  30             31  32  33  34  35  36  37
    //      38  39  40      41  42  43  44     45  46  47  48      49  50  51

    //<editor-fold desc="Kombol Layout 1.1">
    // see https://github.com/skychil/kombol

    // row 0                          []                                                          ()
    COMBO(DE______,  1  2, _1_2  ) /* free                   */ COMBO(DE______,  6  7, _6_7  ) // free
    COMBO(DE_LBRC ,  2  3, LBRC  ) /* [                      */ COMBO(DE_LPAR ,  7  8, LPAR  ) // (
    COMBO(DE_RBKT ,  3  4, RBKT  ) /* ]                      */ COMBO(DE_RPAR ,  8  9, RPAR  ) // )
    COMBO(DE______,  4  5, _4_5  ) /* free                   */ COMBO(DE______,  9 10, _9_10 ) // free
    COMBO(DE_TODO_,  2  4, _2_4  ) /* [] <-                  */ COMBO(DE_TODO_,  7  9, _7_9  ) // () <-

    // row 1                          -=+                                                         |"'
    COMBO(DE______, 13 14, _13_14) /* free                   */ COMBO(DE_PIPE , 18 19, PIPE  ) // |
    COMBO(DE_MINUS, 14 15, MINUS ) /* -                      */ COMBO(DE_DQT  , 19 20, DQT   ) // "
    COMBO(DE_EQUAL, 15 16, EQUAL ) /* =                      */ COMBO(DE_SQT  , 20 21, SQT   ) // '
    COMBO(DE_PLUS , 16 17, PLUS  ) /* +                      */ COMBO(DE______, 21 22, _21_22) // free
    COMBO(S(INS)  , 14 16, S_INS ) /* Shift+Ins              */ COMBO(DE______, 19 21, _19_21) // free

    // row 2                          {}                                                          <>
    COMBO(DE_LBRC , 26 27, LBRC  ) /* {                      */ COMBO(DE______, 32 33, _32_33) // free
    COMBO(DE_RBRC , 27 28, RBRC  ) /* }                      */ COMBO(DE_LT   , 33 34, LT    ) // <
    COMBO(DE______, 28 29, _28_29) /* free                   */ COMBO(DE_GT   , 34 35, GT    ) // >
    COMBO(DE_TODO_, 26 28, _26_28) /* {} <-                  */ COMBO(DE_TODO_, 33 35, _33_35) // <> <-

    // row 0/1                        @#$%                                                        ^&*\
    COMBO(DE______,  1 13, _1_13 ) /* free                   */ COMBO(DE_CARET,  6 18, CARET ) // ^ todo*
    COMBO(DE_AT   ,  2 14, AT    ) /* @                      */ COMBO(DE_AMPS ,  7 19, AMPS  ) // &
    COMBO(DE_HASH ,  3 15, HASH  ) /* #                      */ COMBO(DE_STAR ,  8 20, STAR  ) // *
    COMBO(DE_DLLR ,  4 16, DLLR  ) /* $                      */ COMBO(DE_BSLH ,  9 21, BSLH  ) // \
    COMBO(DE_PRCNT,  5 17, PRCNT ) /* %                      */ COMBO(DE______, 10 22, _10_22) // free todo*

    // row 1+2                        ``~                                                         "'
    COMBO(DE_TODO_, 14 26, _14_26) /* `` <-                  */ COMBO(DE______, 18 32, _18_32) // free
    COMBO(DE_GRAVE, 15 27, GRAVE ) /* `                      */ COMBO(DE_TODO_, 19 33, _19_33) // "" <-
    COMBO(DE_TILDE, 16 28, TILDE ) /* ~                      */ COMBO(DE_TODO_, 20 34, _20_34) // '' <-
    COMBO(DE______, 17 29, _17_29) /* free                   */ COMBO(DE______, 21 35, _21_35) // free

    // row 0+1 diagonal               !                                                           ?
    COMBO(DE______, 14  3, _14_3 ) /* free                   */ COMBO(DE______, 18  7, _18_7 ) // free
    COMBO(DE_EXCL ,  3 16, EXCL  ) /* !                      */ COMBO(DE_QMARK, 19  8, QMARK ) // ? todo*
    COMBO(DE______,  4 17, _4_17 ) /* free                   */ COMBO(DE______,  8 21, _8_21 ) // free todo*

    // row 1+2 diagonal               _                                                           :
    COMBO(DE______, 26 15, _26_15) /* free                   */ COMBO(DE______, 32 19, _32_19) // free todo*
    COMBO(DE_UNDER, 15 28, UNDER ) /* _                      */ COMBO(DE_COLON, 33 20, COLON ) // :
    COMBO(DE______, 16 28, _16_28) /* free                   */ COMBO(DE______, 20 35, _20_35) // free todo*
    //</editor-fold>
};

Notes:

  • I use the awesome hillside52 keyboard. You need to adjust the key numbers when using a different keyboard.
  • todo* means, they are not working (I don't know why).
  • the left hand is untested (keys not yet delivered ^^)
  • This isn't an issue as an issue used to be, rather than a sharing source code.
  • I'm posting this because I think your combos are great! I hope - if someone needs it - it will save some time.
  • DE______ and DE_TODO_ are mapped to SPACE. You could just remove all of them.
  • ocurrances of DE_TODO_ would become macros. Since I don't use them I just didn't do it. Feel free to complement and share.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant