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_ortho.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_ortho_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_8)
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] = {
48 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
49 MESC, Q , W , E , R , T ,SCTL, SCTR, Y , U , I , O , P ,QUOT,
50 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
51 TAB , A , S , D , F , G ,SPLT, SPRT, H , J , K , L ,SCLN,ENT ,
52 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
53 LSPO, Z , X , C , V , B ,SPFN, GBRC, N , M ,COMM,DOT ,SLSH,RSPC,
54 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
56 // \------------------+----+----+---/ \---+----+----+-------------------/
60 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
61 , , , , , , , , , , , , , ,
62 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
63 , , , , , ,UNDS, , , , , ,COLN, ,
64 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
65 SCOF, , , , , , , , , , , , ,SCOF,
66 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
68 // \------------------+----+----+---/ \---+----+----+-------------------/
72 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
73 , ,COLN , , , , , , , 7 , 8 , 9 ,ASTR,MINS,
74 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
75 , ,DOT , , , , , , , 4 , 5 , 6 ,PLUS, ,
76 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
77 , , , , , , , , , 1 , 2 , 3 ,SLSH, ,
78 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
80 // \------------------+----+----+---/ \---+----+----+-------------------/
84 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
85 ,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS,
86 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
87 , F1 , F2 , F3 , F4 , F5 , , ,TILD,COLN,UNDS,LCBR,RCBR, ,
88 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
89 , F6 , F7 , F8 , F9 ,F10 , , ,GRV ,SCLN,MINS,LBRC,RBRC, ,
90 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
92 // \------------------+----+----+---/ \---+----+----+-------------------/
96 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
97 , , , , , , , , , , UP , ,PSCR, ,
98 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
99 , , , , , , , , ,LEFT,DOWN,RGHT, , ,
100 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
101 , , , , , , , , ,PGUP,PGDN, , , ,
102 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
104 // \------------------+----+----+---/ \---+----+----+-------------------/
108 //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
109 , , , , , , , , , ,INCL, , , ,
110 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
111 , , ,CAD , , , , , , , , , , ,
112 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
113 SCAP, , , , , , , , , ,PULL,PUSH, ,SCAP,
114 //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
116 // \------------------+----+----+---/ \---+----+----+-------------------/
122 const uint16_t PROGMEM fn_actions[] = {
126 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
129 /* include some kind of library or header */
131 if (record->event.pressed) {
132 SEND_STRING("#include <>");
133 return MACRO( T(LEFT), END);
137 if (record->event.pressed) {
138 SEND_STRING("git pull");
139 return MACRO( T(ENT), END );
143 if (record->event.pressed){
144 SEND_STRING("git push");
145 return MACRO( T(ENT), END );
149 if (record->event.pressed){
151 register_code(KC_CAPSLOCK);
152 unregister_code(KC_CAPSLOCK);
156 if (record->event.pressed){
158 register_code(KC_CAPSLOCK);
159 unregister_code(KC_CAPSLOCK);
167 void matrix_scan_user(void) {
168 uint8_t layer = biton32(layer_state);