qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

keymap.c (2099B)


      1 #include QMK_KEYBOARD_H
      2 
      3 #ifdef RGBLIGHT_ENABLE
      4 //Following line allows macro to read current RGB settings
      5 extern rgblight_config_t rgblight_config;
      6 #endif
      7 
      8 extern uint8_t is_master;
      9 
     10 // Each layer gets a name for readability, which is then used in the keymap matrix below.
     11 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
     12 // Layer names don't all need to be of the same length, obviously, and you can also skip them
     13 // entirely and just use numbers.
     14 enum layer_number {
     15   _BASE,
     16   _MOUSE,
     17   _BROWSER,
     18   _ADJUST,
     19 };
     20 
     21 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     22   [_BASE] = LAYOUT(
     23   //|-------------------------------------------|
     24                           TG(_MOUSE),
     25   //|---------------+---------------+-----------|
     26 LT(_ADJUST, KC_BSPC),          KC_UP,TG(_BROWSER),
     27   //|---------------+---------------+-----------|
     28              KC_LEFT,        KC_DOWN,    KC_RIGHT
     29   //|-------------------------------------------|
     30   ),
     31 
     32   [_MOUSE] = LAYOUT(
     33   //|-------------------------------------------|
     34                           TG(_MOUSE),
     35   //|---------------+---------------+-----------|
     36              MS_BTN1,        MS_UP,      MS_BTN2,
     37   //|---------------+---------------+-----------|
     38              MS_LEFT,        MS_DOWN,    MS_RGHT
     39   //|-------------------------------------------|
     40   ),
     41 
     42   [_BROWSER] = LAYOUT(
     43   //|-------------------------------------------|
     44                           LCTL(KC_W),
     45   //|---------------+---------------+-----------|
     46     LCTL(LSFT(KC_T)),        MS_WHLU,TG(_BROWSER),
     47   //|---------------+---------------+-----------|
     48   LCTL(LSFT(KC_TAB)),        MS_WHLD,LCTL(KC_TAB)
     49   //|-------------------------------------------|
     50   ),
     51 
     52   [_ADJUST] = LAYOUT( /* Base */
     53   //|-------------------------------------------|
     54                              UG_VALD,
     55   //|---------------+---------------+-----------|
     56          MO(_ADJUST),        UG_SATD,    UG_VALU,
     57   //|---------------+---------------+-----------|
     58              UG_NEXT,        UG_TOGG,    UG_SATU
     59   //|-------------------------------------------|
     60   )
     61 };