1 // this is the style you want to emulate.
2 // This is the canonical layout file for the Quantum project. If you want to add another keyboard,
4 #include "chimera_ergo.h"
6 // Each layer gets a name for readability, which is then used in the keymap matrix below.
7 // The underscores don't mean anything - you can have a layer called STUFF or any other name.
8 // Layer names don't all need to be of the same length, obviously, and you can also skip them
9 // entirely and just use numbers.
10 enum chimera_ergo_layers
20 #define KC_NMPD TG(_NUMPAD)
21 #define KC_SYMB TG(_SYMBOLS)
22 #define KC_SPFN LT(_NAV,KC_EQL)
23 #define KC_SCTL MT(MOD_LCTL, KC_LBRC)
24 #define KC_SCTR MT(MOD_LCTL, KC_RBRC)
25 #define KC_SPLT MT(MOD_LALT, KC_MINS)
26 #define KC_SPRT MT(MOD_LALT, KC_1)
27 #define KC_GBRC MT(MOD_RGUI, KC_RBRC)
28 #define KC_GQOT MT(MOD_LGUI, KC_QUOT)
29 #define KC_MESC LT(_MACROS, KC_ESC)
35 #define KC_CAD LALT(LCTL(KC_DEL))
37 #define LONGPRESS_DELAY 150
38 //#define LAYER_TOGGLE_DELAY 300
40 // Fillers to make layering more clear
41 #define _______ KC_TRNS
45 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
47 [_QWERTY] = KC_KEYMAP(
48 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
49 LBRC, 1 ,SCTL,SPLT,SPFN, 5 , 6 ,GBRC,SPRT,SCTR, 0 ,RBRC,
50 //|----+----+----+----+----+----| |----+----+----+----+----+----|
51 MESC, Q , W , E , R , T , Y , U , I , O , P ,QUOT,
52 //|----+----+----+----+----+----| |----+----+----+----+----+----|
53 TAB , A , S , D , F , G , H , J , K , L ,SCLN,ENT ,
54 //|----+----+----+----+----+----| |----+----+----+----+----+----|
55 LSPO, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSPC,
56 //|----+----+----+----+----+----| |----+----+----+----+----+----|
58 // \------------------+----+----/ \---+----+----+--------------/
62 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
63 ,UNDS, , , , , , , , , , ,
64 //|----+----+----+----+----+----| |----+----+----+----+----+----|
65 , , , , , , , , , , , ,
66 //|----+----+----+----+----+----| |----+----+----+----+----+----|
67 , , , , , , , , , ,COLN, ,
68 //|----+----+----+----+----+----| |----+----+----+----+----+----|
69 SCOF, , , , , , , , , , ,SCOF,
70 //|----+----+----+----+----+----| |----+----+----+----+----+----|
72 // \------------------+----+----/ \---+----+----+--------------/
75 [_NUMPAD] = KC_KEYMAP(
76 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
77 , , , , , , , , , ,MINS, ,
78 //|----+----+----+----+----+----| |----+----+----+----+----+----|
79 , ,COLN, , , , , 7 , 8 , 9 ,ASTR, ,
80 //|----+----+----+----+----+----| |----+----+----+----+----+----|
81 , ,DOT , , , , , 4 , 5 , 6 ,PLUS, ,
82 //|----+----+----+----+----+----| |----+----+----+----+----+----|
83 , , , , , , , 1 , 2 , 3 ,SLSH, ,
84 //|----+----+----+----+----+----| |----+----+----+----+----+----|
86 // \------------------+----+----/ \---+----+----+--------------/
89 [_SYMBOLS] = KC_KEYMAP(
90 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
91 , , , , , , , , , , , ,
92 //|----+----+----+----+----+----| |----+----+----+----+----+----|
93 ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
94 //|----+----+----+----+----+----| |----+----+----+----+----+----|
95 F1 , F2 , F3 , F4 , F5 , F6 , TILD,EQL ,UNDS,LCBR,RCBR, ,
96 //|----+----+----+----+----+----| |----+----+----+----+----+----|
97 F7 , F8 , F9 ,F10 ,F11 ,F12 , GRV ,PLUS,MINS,LBRC,RBRC, ,
98 //|----+----+----+----+----+----| |----+----+----+----+----+----|
100 // \------------------+----+----/ \---+----+----+--------------/
103 [_MACROS] = KC_KEYMAP(
104 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
105 , , , , , , , , , , , ,
106 //|----+----+----+----+----+----| |----+----+----+----+----+----|
107 , , , , , , , ,INCL, , , ,
108 //|----+----+----+----+----+----| |----+----+----+----+----+----|
109 , , ,CAD , , , , , , , , ,
110 //|----+----+----+----+----+----| |----+----+----+----+----+----|
111 SCAP, , , , , , , ,PULL,PUSH, , ,
112 //|----+----+----+----+----+----| |----+----+----+----+----+----|
114 // \------------------+----+----/ \---+----+----+--------------/
118 //,----+----+----+----+----+----. ,----+----+----+----+----+----.
119 , , , , , , , , , , , ,
120 //|----+----+----+----+----+----| |----+----+----+----+----+----|
121 , , , , , , ,PGUP, UP ,PGDN,PSCR, ,
122 //|----+----+----+----+----+----| |----+----+----+----+----+----|
123 , , , , , , ,LEFT,DOWN,RGHT, , ,
124 //|----+----+----+----+----+----| |----+----+----+----+----+----|
125 , , , , , , , , , , , ,
126 //|----+----+----+----+----+----| |----+----+----+----+----+----|
128 // \------------------+----+----/ \---+----+----+--------------/
135 const uint16_t PROGMEM fn_actions[] = {
139 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
142 /* include some kind of library or header */
144 if (record->event.pressed) {
145 SEND_STRING("#include <>");
146 return MACRO( T(LEFT), END);
150 if (record->event.pressed) {
151 SEND_STRING("git pull");
152 return MACRO( T(ENT), END );
156 if (record->event.pressed){
157 SEND_STRING("git push");
158 return MACRO( T(ENT), END );
162 if (record->event.pressed){
164 register_code(KC_CAPSLOCK);
165 unregister_code(KC_CAPSLOCK);
169 if (record->event.pressed){
171 register_code(KC_CAPSLOCK);
172 unregister_code(KC_CAPSLOCK);
180 void matrix_scan_user(void) {
181 uint8_t layer = biton32(layer_state);