diff options
author | Andrew Kannan <andrew.kannan@klaviyo.com> | 2021-12-14 22:41:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-14 19:41:41 -0800 |
commit | c10bc9f91e737dd3675b2e4492daa09092655af9 (patch) | |
tree | a63b9b8bb578e3d95664074e932200ee540d0bfc | |
parent | 39dcb78b78d95437f44c970db49625c870de4b66 (diff) | |
download | qmk_firmware-c10bc9f91e737dd3675b2e4492daa09092655af9.tar.gz qmk_firmware-c10bc9f91e737dd3675b2e4492daa09092655af9.zip |
[Keyboard] Adelie Firmware (#13265)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r-- | keyboards/cannonkeys/adelie/adelie.c | 17 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/adelie.h | 42 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/config.h | 117 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/info.json | 10 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/keymaps/default/keymap.c | 96 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/keymaps/via/keymap.c | 96 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/keymaps/via/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/readme.md | 15 | ||||
-rw-r--r-- | keyboards/cannonkeys/adelie/rules.mk | 18 |
9 files changed, 412 insertions, 0 deletions
diff --git a/keyboards/cannonkeys/adelie/adelie.c b/keyboards/cannonkeys/adelie/adelie.c new file mode 100644 index 000000000..04764169e --- /dev/null +++ b/keyboards/cannonkeys/adelie/adelie.c | |||
@@ -0,0 +1,17 @@ | |||
1 | /* Copyright 2020 Andrew Kannan | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include "adelie.h" | ||
diff --git a/keyboards/cannonkeys/adelie/adelie.h b/keyboards/cannonkeys/adelie/adelie.h new file mode 100644 index 000000000..0573e7bd3 --- /dev/null +++ b/keyboards/cannonkeys/adelie/adelie.h | |||
@@ -0,0 +1,42 @@ | |||
1 | /* Copyright 2020 Andrew Kannan | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include "quantum.h" | ||
20 | |||
21 | #define KNO KC_NO | ||
22 | |||
23 | /* This is a shortcut to help you visually see your layout. | ||
24 | * | ||
25 | * The first section contains all of the arguments representing the physical | ||
26 | * layout of the board and position of the keys. | ||
27 | * | ||
28 | * The second converts the arguments into a two-dimensional array which | ||
29 | * represents the switch matrix. | ||
30 | */ | ||
31 | #define LAYOUT_all( \ | ||
32 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ | ||
33 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1d, k1e, \ | ||
34 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2b, k2c, k2d, k2e, \ | ||
35 | k30, k31, k32, k33, k36, k38, k39, k3b, k3c, k3d, k3e \ | ||
36 | ) \ | ||
37 | { \ | ||
38 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e }, \ | ||
39 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, KNO, k1d, k1e }, \ | ||
40 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, KNO, k2b, k2c, k2d, k2e }, \ | ||
41 | { k30, k31, k32, k33, KNO, KNO, k36, KNO, k38, k39, KNO, k3b, k3c, k3d, k3e } \ | ||
42 | } | ||
diff --git a/keyboards/cannonkeys/adelie/config.h b/keyboards/cannonkeys/adelie/config.h new file mode 100644 index 000000000..25ddcf0c9 --- /dev/null +++ b/keyboards/cannonkeys/adelie/config.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | Copyright 2020 Andrew Kannan | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #pragma once | ||
19 | |||
20 | #include "config_common.h" | ||
21 | |||
22 | /* USB Device descriptor parameter */ | ||
23 | #define VENDOR_ID 0xCA04 | ||
24 | #define PRODUCT_ID 0x0005 | ||
25 | #define DEVICE_VER 0x0001 | ||
26 | #define MANUFACTURER Abec13 | ||
27 | #define PRODUCT Adelie | ||
28 | |||
29 | /* key matrix size */ | ||
30 | #define MATRIX_ROWS 4 | ||
31 | #define MATRIX_COLS 15 | ||
32 | |||
33 | /* | ||
34 | * Keyboard Matrix Assignments | ||
35 | * | ||
36 | * Change this to how you wired your keyboard | ||
37 | * COLS: AVR pins used for columns, left to right | ||
38 | * ROWS: AVR pins used for rows, top to bottom | ||
39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
41 | * | ||
42 | */ | ||
43 | #define MATRIX_ROW_PINS { F4, F1, B1, B0 } | ||
44 | #define MATRIX_COL_PINS { F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, B2 } | ||
45 | |||
46 | /* COL2ROW, ROW2COL*/ | ||
47 | #define DIODE_DIRECTION COL2ROW | ||
48 | |||
49 | #define RGB_DI_PIN F0 | ||
50 | #ifdef RGB_DI_PIN | ||
51 | #define RGBLED_NUM 3 | ||
52 | #define RGBLIGHT_HUE_STEP 8 | ||
53 | #define RGBLIGHT_SAT_STEP 8 | ||
54 | #define RGBLIGHT_VAL_STEP 8 | ||
55 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
56 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
57 | /*== all animations enable ==*/ | ||
58 | #define RGBLIGHT_ANIMATIONS | ||
59 | /*== or choose animations ==*/ | ||
60 | // #define RGBLIGHT_EFFECT_BREATHING | ||
61 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
62 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
63 | // #define RGBLIGHT_EFFECT_SNAKE | ||
64 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
65 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
66 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
67 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
68 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
69 | /*== customize breathing effect ==*/ | ||
70 | /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
71 | // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
72 | /*==== use exp() and sin() ====*/ | ||
73 | // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
74 | // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
75 | #endif | ||
76 | |||
77 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
78 | #define DEBOUNCE 5 | ||
79 | |||
80 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
81 | //#define MATRIX_HAS_GHOST | ||
82 | |||
83 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
84 | #define LOCKING_SUPPORT_ENABLE | ||
85 | /* Locking resynchronize hack */ | ||
86 | #define LOCKING_RESYNC_ENABLE | ||
87 | |||
88 | /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | ||
89 | * This is userful for the Windows task manager shortcut (ctrl+shift+esc). | ||
90 | */ | ||
91 | #define GRAVE_ESC_CTRL_OVERRIDE | ||
92 | |||
93 | /* | ||
94 | * Feature disable options | ||
95 | * These options are also useful to firmware size reduction. | ||
96 | */ | ||
97 | |||
98 | /* disable debug print */ | ||
99 | //#define NO_DEBUG | ||
100 | |||
101 | /* disable print */ | ||
102 | //#define NO_PRINT | ||
103 | |||
104 | /* disable action features */ | ||
105 | //#define NO_ACTION_LAYER | ||
106 | //#define NO_ACTION_TAPPING | ||
107 | //#define NO_ACTION_ONESHOT | ||
108 | |||
109 | /* disable these deprecated features by default */ | ||
110 | #define NO_ACTION_MACRO | ||
111 | #define NO_ACTION_FUNCTION | ||
112 | |||
113 | /* Bootmagic Lite key configuration */ | ||
114 | // #define BOOTMAGIC_LITE_ROW 0 | ||
115 | // #define BOOTMAGIC_LITE_COLUMN 0 | ||
116 | |||
117 | #define RGBLIGHT_LAYERS | ||
diff --git a/keyboards/cannonkeys/adelie/info.json b/keyboards/cannonkeys/adelie/info.json new file mode 100644 index 000000000..a32bb419d --- /dev/null +++ b/keyboards/cannonkeys/adelie/info.json | |||
@@ -0,0 +1,10 @@ | |||
1 | { | ||
2 | "keyboard_name": "Adelie", | ||
3 | "url": "", | ||
4 | "maintainer": "Abec13", | ||
5 | "layouts": { | ||
6 | "LAYOUT_all": { | ||
7 | "layout": [{"label":"Esc/~", "x":0, "y":0}, {"label":"Q", "x":1, "y":0}, {"label":"W", "x":2, "y":0}, {"label":"E", "x":3, "y":0}, {"label":"R", "x":4, "y":0}, {"label":"T", "x":5, "y":0}, {"label":"Y", "x":6, "y":0}, {"label":"U", "x":7, "y":0}, {"label":"I", "x":8, "y":0}, {"label":"O", "x":9, "y":0}, {"label":"P", "x":10, "y":0}, {"label":"{", "x":11, "y":0}, {"label":"}", "x":12, "y":0}, {"label":"Back<br>Space", "x":13, "y":0}, {"label":"Page up", "x":14.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.25}, {"label":"A", "x":1.25, "y":1}, {"label":"S", "x":2.25, "y":1}, {"label":"D", "x":3.25, "y":1}, {"label":"F", "x":4.25, "y":1}, {"label":"G", "x":5.25, "y":1}, {"label":"H", "x":6.25, "y":1}, {"label":"J", "x":7.25, "y":1}, {"label":"K", "x":8.25, "y":1}, {"label":"L", "x":9.25, "y":1}, {"label":":", "x":10.25, "y":1}, {"label":"\"", "x":11.25, "y":1}, {"label":"Enter", "x":12.25, "y":1, "w":1.75}, {"label":"Page Dn", "x":14.5, "y":1}, {"label":"Shift", "x":0, "y":2, "w":1.75}, {"label":"Z", "x":1.75, "y":2}, {"label":"X", "x":2.75, "y":2}, {"label":"C", "x":3.75, "y":2}, {"label":"V", "x":4.75, "y":2}, {"label":"B", "x":5.75, "y":2}, {"label":"N", "x":6.75, "y":2}, {"label":"M", "x":7.75, "y":2}, {"label":"<", "x":8.75, "y":2}, {"label":">", "x":9.75, "y":2}, {"label":"?", "x":10.75, "y":2}, {"label":"Shift", "x":11.75, "y":2, "w":1.25}, {"label":"TG(3)", "x":14.5, "y":2}, {"label":"Up", "x":13.25, "y":2.25}, {"label":"Control", "x":0, "y":3, "w":1.25}, {"label":"Win", "x":1.25, "y":3}, {"label":"Alt", "x":2.25, "y":3, "w":1.25}, {"label":"MO(1)", "x":3.5, "y":3, "w":2.75}, {"label":"Space", "x":6.25, "y":3, "w":2.25}, {"label":"Alt", "x":8.5, "y":3, "w":1.25}, {"label":"Win", "x":9.75, "y":3}, {"label":"MO(2)", "x":10.75, "y":3, "w":1.25}, {"label":"Left", "x":12.25, "y":3.25}, {"label":"Down", "x":13.25, "y":3.25}, {"label":"Right", "x":14.25, "y":3.25}] | ||
8 | } | ||
9 | } | ||
10 | } | ||
diff --git a/keyboards/cannonkeys/adelie/keymaps/default/keymap.c b/keyboards/cannonkeys/adelie/keymaps/default/keymap.c new file mode 100644 index 000000000..2698da36e --- /dev/null +++ b/keyboards/cannonkeys/adelie/keymaps/default/keymap.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* Copyright 2020 Andrew Kannan | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | |||
20 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
21 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
22 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
23 | // entirely and just use numbers. | ||
24 | enum layer_names { | ||
25 | _BASE, | ||
26 | _FN1, | ||
27 | _FN2, | ||
28 | _FN3 | ||
29 | }; | ||
30 | |||
31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
32 | [_BASE] = LAYOUT_all( | ||
33 | KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | ||
34 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
35 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TG(_FN3), | ||
36 | KC_LCTL, KC_LGUI, KC_LALT, MO(_FN1), KC_SPC, KC_RALT, KC_RGUI, MO(_FN2), KC_LEFT, KC_DOWN, KC_RIGHT | ||
37 | ), | ||
38 | |||
39 | [_FN1] = LAYOUT_all( | ||
40 | KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_HOME, | ||
41 | RGB_TOG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TRNS, KC_END, | ||
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_TRNS, KC_TRNS, KC_MINS, KC_PLUS, KC_ASTR, KC_TRNS, KC_EQL, KC_INS, KC_PSCR, | ||
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
44 | ), | ||
45 | |||
46 | [_FN2] = LAYOUT_all( | ||
47 | KC_POWER, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_DEL, KC_VOLU, | ||
48 | KC_SLEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, | ||
49 | KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_MUTE, | ||
50 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
51 | ), | ||
52 | |||
53 | [_FN3] = LAYOUT_all( | ||
54 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
55 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FN1), KC_TRNS, KC_TRNS, KC_TRNS | ||
58 | ) | ||
59 | }; | ||
60 | |||
61 | const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
62 | {0, 3, HSV_RED} | ||
63 | ); | ||
64 | const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
65 | {0, 3, HSV_CYAN} | ||
66 | ); | ||
67 | const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
68 | {0, 3, HSV_PURPLE} | ||
69 | ); | ||
70 | const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
71 | {0, 3, HSV_GREEN} | ||
72 | ); | ||
73 | |||
74 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
75 | my_layer0_layer, | ||
76 | my_layer1_layer, | ||
77 | my_layer2_layer, | ||
78 | my_layer3_layer | ||
79 | ); | ||
80 | |||
81 | void keyboard_post_init_user(void) { | ||
82 | // Enable the LED layers | ||
83 | rgblight_layers = my_rgb_layers; | ||
84 | } | ||
85 | |||
86 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
87 | rgblight_set_layer_state(0, layer_state_cmp(state, _BASE)); | ||
88 | return state; | ||
89 | } | ||
90 | |||
91 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
92 | rgblight_set_layer_state(1, layer_state_cmp(state, _FN1)); | ||
93 | rgblight_set_layer_state(2, layer_state_cmp(state, _FN2)); | ||
94 | rgblight_set_layer_state(3, layer_state_cmp(state, _FN3)); | ||
95 | return state; | ||
96 | } | ||
diff --git a/keyboards/cannonkeys/adelie/keymaps/via/keymap.c b/keyboards/cannonkeys/adelie/keymaps/via/keymap.c new file mode 100644 index 000000000..2698da36e --- /dev/null +++ b/keyboards/cannonkeys/adelie/keymaps/via/keymap.c | |||
@@ -0,0 +1,96 @@ | |||
1 | /* Copyright 2020 Andrew Kannan | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include QMK_KEYBOARD_H | ||
18 | |||
19 | |||
20 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
21 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
22 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
23 | // entirely and just use numbers. | ||
24 | enum layer_names { | ||
25 | _BASE, | ||
26 | _FN1, | ||
27 | _FN2, | ||
28 | _FN3 | ||
29 | }; | ||
30 | |||
31 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
32 | [_BASE] = LAYOUT_all( | ||
33 | KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP, | ||
34 | KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, | ||
35 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TG(_FN3), | ||
36 | KC_LCTL, KC_LGUI, KC_LALT, MO(_FN1), KC_SPC, KC_RALT, KC_RGUI, MO(_FN2), KC_LEFT, KC_DOWN, KC_RIGHT | ||
37 | ), | ||
38 | |||
39 | [_FN1] = LAYOUT_all( | ||
40 | KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_TRNS, KC_HOME, | ||
41 | RGB_TOG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_TRNS, KC_END, | ||
42 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOT, KC_TRNS, KC_TRNS, KC_MINS, KC_PLUS, KC_ASTR, KC_TRNS, KC_EQL, KC_INS, KC_PSCR, | ||
43 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
44 | ), | ||
45 | |||
46 | [_FN2] = LAYOUT_all( | ||
47 | KC_POWER, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_DEL, KC_VOLU, | ||
48 | KC_SLEP, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, | ||
49 | KC_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_MUTE, | ||
50 | RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
51 | ), | ||
52 | |||
53 | [_FN3] = LAYOUT_all( | ||
54 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
55 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FN1), KC_TRNS, KC_TRNS, KC_TRNS | ||
58 | ) | ||
59 | }; | ||
60 | |||
61 | const rgblight_segment_t PROGMEM my_layer0_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
62 | {0, 3, HSV_RED} | ||
63 | ); | ||
64 | const rgblight_segment_t PROGMEM my_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
65 | {0, 3, HSV_CYAN} | ||
66 | ); | ||
67 | const rgblight_segment_t PROGMEM my_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
68 | {0, 3, HSV_PURPLE} | ||
69 | ); | ||
70 | const rgblight_segment_t PROGMEM my_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS( | ||
71 | {0, 3, HSV_GREEN} | ||
72 | ); | ||
73 | |||
74 | const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST( | ||
75 | my_layer0_layer, | ||
76 | my_layer1_layer, | ||
77 | my_layer2_layer, | ||
78 | my_layer3_layer | ||
79 | ); | ||
80 | |||
81 | void keyboard_post_init_user(void) { | ||
82 | // Enable the LED layers | ||
83 | rgblight_layers = my_rgb_layers; | ||
84 | } | ||
85 | |||
86 | layer_state_t default_layer_state_set_user(layer_state_t state) { | ||
87 | rgblight_set_layer_state(0, layer_state_cmp(state, _BASE)); | ||
88 | return state; | ||
89 | } | ||
90 | |||
91 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
92 | rgblight_set_layer_state(1, layer_state_cmp(state, _FN1)); | ||
93 | rgblight_set_layer_state(2, layer_state_cmp(state, _FN2)); | ||
94 | rgblight_set_layer_state(3, layer_state_cmp(state, _FN3)); | ||
95 | return state; | ||
96 | } | ||
diff --git a/keyboards/cannonkeys/adelie/keymaps/via/rules.mk b/keyboards/cannonkeys/adelie/keymaps/via/rules.mk new file mode 100644 index 000000000..1e5b99807 --- /dev/null +++ b/keyboards/cannonkeys/adelie/keymaps/via/rules.mk | |||
@@ -0,0 +1 @@ | |||
VIA_ENABLE = yes | |||
diff --git a/keyboards/cannonkeys/adelie/readme.md b/keyboards/cannonkeys/adelie/readme.md new file mode 100644 index 000000000..2e959fb9d --- /dev/null +++ b/keyboards/cannonkeys/adelie/readme.md | |||
@@ -0,0 +1,15 @@ | |||
1 | # Adelie | ||
2 | |||
3 |  | ||
4 | |||
5 | The Adelie 50% Keyboard by Abec13 | ||
6 | |||
7 |  | ||
8 | |||
9 | * Keyboard Maintainer: [Abec13](https://github.com/abec13) | ||
10 | |||
11 | Make example for this keyboard (after setting up your build environment): | ||
12 | |||
13 | make cannonkeys/adelie:default | ||
14 | |||
15 | See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | ||
diff --git a/keyboards/cannonkeys/adelie/rules.mk b/keyboards/cannonkeys/adelie/rules.mk new file mode 100644 index 000000000..3a2f2feb7 --- /dev/null +++ b/keyboards/cannonkeys/adelie/rules.mk | |||
@@ -0,0 +1,18 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = no # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | NKRO_ENABLE = no # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
18 | AUDIO_ENABLE = no # Audio output | ||