QUOTE: Be your own kind of beautiful.

claw-sweeper

A QMK keymap layout for the Ferris Sweep split-keyboard

keymap.c (18752B)


      1 #include QMK_KEYBOARD_H
      2 
      3 // ################
      4 // # claw-sweeper #
      5 // ################
      6 
      7 // layers
      8 #define BSE 0
      9 #define NUM 1
     10 #define SYM 2
     11 #define NAV 3
     12 #define MUL 4
     13 #define FUN 5
     14 #define GMN 6
     15 
     16 // hold layer
     17 #define KC_TAL1 LT(NUM, KC_TAB)
     18 #define KC_BSL2 LT(SYM, KC_BSPC)
     19 #define KC_ENL4 LT(MUL, KC_ENT)
     20 #define KC_SPL3 LT(NAV, KC_SPC)
     21 
     22 // toggle layer
     23 #define KC_TG5 TG(FUN)
     24 #define KC_TG6 TG(GMN)
     25 
     26 // home rows left
     27 #define KC_CTA LCTL_T(KC_A)
     28 #define KC_ALS LALT_T(KC_S)
     29 #define KC_GUD LGUI_T(KC_D)
     30 #define KC_SHF LSFT_T(KC_F)
     31 
     32 // home rows right
     33 #define KC_SHJ LSFT_T(KC_J)
     34 #define KC_GUK LGUI_T(KC_K)
     35 #define KC_ALL LALT_T(KC_L)
     36 #define KC_CTSC LCTL_T(KC_SCLN)
     37 
     38 // parentheses
     39 #define KC_LBRR LSFT(KC_9)
     40 #define KC_RBRR LSFT(KC_0)
     41 
     42 // braces
     43 #define KC_LBRS LSFT(KC_LBRC)
     44 #define KC_RBRS LSFT(KC_RBRC)
     45 
     46 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     47 
     48   // --- 0: BSE LAYER -------------------------------------------------------------------------------
     49   //
     50   //                 +-------+                                              +-------+
     51   //         +-------+       +-------+                              +-------+       +-------+
     52   //         |       |   E   |       +-------+              +-------+       |   I   |       |
     53   //         |   W   |       |   R   |       |              |       |   U   |       |   O   |
     54   // +-------+       +-------+       |   T   |              |   Y   |       +-------+       +-------+
     55   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
     56   // |   Q   |       |   D   |       +-------+              +-------+       |   K   |       |   P   |
     57   // |       |   S   |       |   F   |       |              |       |   J   |       |   L   |       |
     58   // +-------+       +-------+       |   G   |              |   H   |       +-------+       +-------+
     59   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
     60   // |   A   |       |   C   |       +-------+              +-------+       |  < ,  |       |  : ;  |
     61   // |       |   X   |       |   V   |       |              |       |   M   |       |  > .  |       |
     62   // +-------+       +-------+       |   B   |              |   N   |       +-------+       +-------+
     63   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
     64   // |   Z   |                       +-------+              +-------+                       |  ? /  |
     65   // |       |                   +-------+                      +-------+                   |       |
     66   // +-------+                   |       +-------+      +-------+       |                   +-------+
     67   //                      +---   |  TAB  |       |      |       |  BSP  |   ---+
     68   //                      |      |       |  SPC  |      |  ENT  |       |      |
     69   //                  [HOLD]     +-------+       |      |       +-------+     [HOLD]
     70   //               NUM LAYER             +-------+      +-------+             SYM LAYER
     71   // 
     72   //                                         |              |
     73   //                                     [HOLD]            [HOLD]
     74   //                                  NAV LAYER            MUL LAYER
     75 
     76   [BSE] = LAYOUT(
     77     KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,         KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,
     78     KC_CTA,  KC_ALS,  KC_GUD,  KC_SHF,  KC_G,         KC_H,    KC_SHJ,  KC_GUK,  KC_ALL,  KC_CTSC,
     79     KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,         KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH,
     80                                KC_TAL1, KC_SPL3,      KC_ENL4, KC_BSL2
     81   ),
     82 
     83   // --- 1: NUM LAYER -------------------------------------------------------------------------------
     84   //
     85   //                 +-------+                                              +-------+
     86   //         +-------+       +-------+                              +-------+       +-------+
     87   //         |       |  ...  |       +-------+              +-------+       |   8   |       |
     88   //         |  ...  |       |  ...  |       |              |       |   7   |       |   9   |
     89   // +-------+       +-------+       |  ...  |              |   /   |       +-------+       +-------+
     90   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
     91   // |  ...  |       |  ...  |       +-------+              +-------+       |   5   |       |   +   |
     92   // |       |  ...  |       |  ...  |       |              |       |   4   |       |   6   |       |
     93   // +-------+       +-------+       |  ...  |              |   =   |       +-------+       +-------+
     94   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
     95   // |  ...  |       |  ...  |       +-------+              +-------+       |   2   |       |   -   |
     96   // |       |  ...  |       |  ...  |       |              |       |   1   |       |   3   |       |
     97   // +-------+       +-------+       |  ...  |              |   0   |       +-------+       +-------+
     98   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
     99   // |  ...  |                       +-------+              +-------+                       |   *   |
    100   // |       |                   +-------+                      +-------+                   |       |
    101   // +-------+                   |       +-------+      +-------+       |                   +-------+
    102   //                             |  ...  |       |      |       |  ...  |
    103   //                             |       |  ...  |      |  ...  |       |
    104   //                             +-------+       |      |       +-------+
    105   //                                     +-------+      +-------+
    106 
    107   [NUM] = LAYOUT(
    108     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_PSLS, KC_7,    KC_8,    KC_9,    KC_PPLS,
    109     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_EQL,  KC_4,    KC_5,    KC_6,    KC_PMNS,
    110     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_0,    KC_1,    KC_2,    KC_3,    KC_PAST,
    111                                KC_TRNS, KC_TRNS,      KC_TRNS, KC_TRNS
    112   ),
    113 
    114   // --- 2: SYM LAYER -------------------------------------------------------------------------------
    115   //
    116   //                 +-------+                                              +-------+
    117   //         +-------+       +-------+                              +-------+       +-------+
    118   //         |       |   (   |       +-------+              +-------+       |  ...  |       |
    119   //         |   !   |       |   )   |       |              |       |  ...  |       |  ...  |
    120   // +-------+       +-------+       |   @   |              |  ...  |       +-------+       +-------+
    121   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    122   // |  ~ `  |       |   {   |       +-------+              +-------+       |  ...  |       |  ...  |
    123   // |       |   &   |       |   }   |       |              |       |  ...  |       |  ...  |       |
    124   // +-------+       +-------+       |  | \  |              |  ...  |       +-------+       +-------+
    125   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    126   // |  " '  |       |   [   |       +-------+              +-------+       |  ...  |       |  ...  |
    127   // |       |   %   |       |   ]   |       |              |       |  ...  |       |  ...  |       |
    128   // +-------+       +-------+       |   #   |              |  ...  |       +-------+       +-------+
    129   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    130   // |  _ -  |                       +-------+              +-------+                       |  ...  |
    131   // |       |                   +-------+                      +-------+                   |       |
    132   // +-------+                   |       +-------+      +-------+       |                   +-------+
    133   //                             |   ^   |       |      |       |  ...  |
    134   //                             |       |   $   |      |  ...  |       |
    135   //                             +-------+       |      |       +-------+
    136   //                                     +-------+      +-------+
    137 
    138   [SYM] = LAYOUT(
    139     KC_GRV,  KC_EXLM, KC_LBRR, KC_RBRR, KC_AT,        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    140     KC_QUOT, KC_AMPR, KC_LBRS, KC_RBRS, KC_BSLS,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    141     KC_MINS, KC_PERC, KC_LBRC, KC_RBRC, KC_HASH,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    142                                KC_CIRC, KC_DLR,       KC_TRNS, KC_TRNS
    143   ),
    144 
    145   // --- 3: NAV LAYER -------------------------------------------------------------------------------
    146   //
    147   //                 +-------+                                              +-------+
    148   //         +-------+       +-------+                              +-------+       +-------+
    149   //         |       |  ...  |       +-------+              +-------+       |  NEX  |       |
    150   //         |  ...  |       |  ...  |       |              |       |  PRV  |       | VOLUP |
    151   // +-------+       +-------+       |  ...  |              |  MPY  |       +-------+       +-------+
    152   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    153   // |  ...  |       |  ...  |       +-------+              +-------+       |  UP   |       | VOLDW |
    154   // |       |  ...  |       |  ...  |       |              |       |  DWN  |       |  RGT  |       |
    155   // +-------+       +-------+       |  ...  |              |  LFT  |       +-------+       +-------+
    156   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    157   // |  ...  |       |  ...  |       +-------+              +-------+       |  PUP  |       |  INS  |
    158   // |       |  ...  |       |  ...  |       |              |       |  PDW  |       |  HOM  |       |
    159   // +-------+       +-------+       |  ...  |              |  PRT  |       +-------+       +-------+
    160   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    161   // |  ...  |                       +-------+              +-------+                       |  END  |
    162   // |       |                   +-------+                      +-------+                   |       |
    163   // +-------+                   |       +-------+      +-------+       |                   +-------+
    164   //                             |  ...  |       |      |       |  DEL  |
    165   //                             |       |  ...  |      |  ESC  |       |
    166   //                             +-------+       |      |       +-------+
    167   //                                     +-------+      +-------+
    168 
    169   [NAV] = LAYOUT(
    170     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLU, KC_VOLD,
    171     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_LEFT, KC_DOWN, KC_UP,   KC_RGHT, KC_INS,
    172     KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,      KC_PSCR, KC_PGDN, KC_PGUP, KC_HOME, KC_END,
    173                                KC_TRNS, KC_TRNS,      KC_ESC,  KC_DEL
    174   ),
    175 
    176   // --- 4: MUL LAYER -------------------------------------------------------------------------------
    177   //
    178   //                 +-------+                                              +-------+
    179   //         +-------+       +-------+                              +-------+       +-------+
    180   //         |       |       |       +-------+              +-------+       |  ...  |       |
    181   //         |       |       |       |       |              |       |  ...  |       |  ...  |
    182   // +-------+       +-------+       |  TG5  |              |  ...  |       +-------+       +-------+
    183   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    184   // |       |       |       |       +-------+              +-------+       |  ...  |       |  ...  |
    185   // |       |       |       |       |       |              |       |  ...  |       |  ...  |       |
    186   // +-------+       +-------+       |  TG6  |              |  ...  |       +-------+       +-------+
    187   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    188   // |       |       |       |       +-------+              +-------+       |  ...  |       |  ...  |
    189   // |       |       |       |       |       |              |       |  ...  |       |  ...  |       |
    190   // +-------+       +-------+       |       |              |  ...  |       +-------+       +-------+
    191   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    192   // |       |                       +-------+              +-------+                       |  ...  |
    193   // |       |                   +-------+                      +-------+                   |       |
    194   // +-------+                   |       +-------+      +-------+       |                   +-------+
    195   //                             |       |       |      |       |  ...  |
    196   //                             |       |       |      |  ...  |       |
    197   //                             +-------+       |      |       +-------+
    198   //                                     +-------+      +-------+
    199 
    200   [MUL] = LAYOUT(
    201     XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TG5,       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    202     XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TG6,       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    203     XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    204                                XXXXXXX, XXXXXXX,      KC_TRNS, KC_TRNS
    205   ),
    206 
    207   // --- 5: FUN LAYER -------------------------------------------------------------------------------
    208   //
    209   //                 +-------+                                              +-------+
    210   //         +-------+       +-------+                              +-------+       +-------+
    211   //         |       |  F3   |       +-------+              +-------+       |  ...  |       |
    212   //         |  F2   |       |  F4   |       |              |       |  ...  |       |  ...  |
    213   // +-------+       +-------+       |  F5   |              |  ...  |       +-------+       +-------+
    214   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    215   // |  F1   |       |  F8   |       +-------+              +-------+       |  ...  |       |  ...  |
    216   // |       |  F7   |       |  F9   |       |              |       |  ...  |       |  ...  |       |
    217   // +-------+       +-------+       |  F10  |              |  ...  |       +-------+       +-------+
    218   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    219   // |  F6   |       |       |       +-------+              +-------+       |  ...  |       |  ...  |
    220   // |       |  F12  |       |       |       |              |       |  ...  |       |  ...  |       |
    221   // +-------+       +-------+       |       |              |  ...  |       +-------+       +-------+
    222   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    223   // |  F11  |                       +-------+              +-------+                       |  ...  |
    224   // |       |                   +-------+                      +-------+                   |       |
    225   // +-------+                   |       +-------+      +-------+       |                   +-------+
    226   //                             |       |       |      |       |  ...  |
    227   //                             |       |       |      |  TG5  |       |
    228   //                             +-------+       |      |       +-------+
    229   //                                     +-------+      +-------+
    230 
    231   [FUN] = LAYOUT(
    232     KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,        KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    233     KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,       KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    234     KC_F11,  KC_F12,  XXXXXXX, XXXXXXX, XXXXXXX,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    235                                KC_TRNS, KC_TRNS,      KC_TG5,  KC_TRNS
    236   ),
    237 
    238   // --- 6: GMN LAYER -------------------------------------------------------------------------------
    239   //
    240   //                 +-------+                                              +-------+
    241   //         +-------+       +-------+                              +-------+       +-------+
    242   //         |       |   W   |       +-------+              +-------+       |  ...  |       |
    243   //         |       |       |   E   |       |              |       |  ...  |       |  ...  |
    244   // +-------+       +-------+       |   G   |              |  ...  |       +-------+       +-------+
    245   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    246   // |  ESC  |       |   S   |       +-------+              +-------+       |  ...  |       |  ...  |
    247   // |       |   A   |       |   D   |       |              |       |  ...  |       |  ...  |       |
    248   // +-------+       +-------+       |   F   |              |  ...  |       +-------+       +-------+
    249   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    250   // |  SHF  |       |   C   |       +-------+              +-------+       |  ...  |       |  ...  |
    251   // |       |       |       |       |       |              |       |  ...  |       |  ...  |       |
    252   // +-------+       +-------+       |       |              |  ...  |       +-------+       +-------+
    253   // |       +-------+       +-------+       |              |       +-------+       +-------+       |
    254   // |   Q   |                       +-------+              +-------+                       |  ...  |
    255   // |       |                   +-------+                      +-------+                   |       |
    256   // +-------+                   |       +-------+      +-------+       |                   +-------+
    257   //                             |  SPC  |       |      |       |  ...  |
    258   //                             |       |  CTL  |      |  TG6  |       |
    259   //                             +-------+       |      |       +-------+
    260   //                                     +-------+      +-------+
    261 
    262   [GMN] = LAYOUT(
    263     KC_ESC,  XXXXXXX, KC_W,    KC_E,    KC_G,         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    264     KC_LSFT, KC_A,    KC_S,    KC_D,    KC_F,         KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    265     KC_Q,    XXXXXXX, KC_C,    XXXXXXX, XXXXXXX,      KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
    266                                KC_SPC,  KC_LCTL,      KC_TG6,  KC_TRNS
    267   ),
    268 
    269 };