diff options
author | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2022-04-10 12:13:40 +0100 |
commit | dc90387ce7d8ba7b607d9c48540bf6d8b560f14d (patch) | |
tree | 4ccb8fa5886b66fa9d480edef74236c27f035e16 /keyboards/boardsource/microdox/keymaps/via |
Diffstat (limited to 'keyboards/boardsource/microdox/keymaps/via')
-rw-r--r-- | keyboards/boardsource/microdox/keymaps/via/keymap.c | 105 | ||||
-rw-r--r-- | keyboards/boardsource/microdox/keymaps/via/rules.mk | 6 |
2 files changed, 111 insertions, 0 deletions
diff --git a/keyboards/boardsource/microdox/keymaps/via/keymap.c b/keyboards/boardsource/microdox/keymaps/via/keymap.c new file mode 100644 index 000000000..e02fb0b6e --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/via/keymap.c | |||
@@ -0,0 +1,105 @@ | |||
1 | /* | ||
2 | Copyright 2020 Jack Sangdahl <@toastedmangoes> | ||
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 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
21 | [0] = LAYOUT_split_3x5_3( | ||
22 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
23 | SFT_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SCLN), | ||
24 | CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), | ||
25 | LT(3, KC_LGUI), MO(1), KC_SPC, KC_BSPC, MO(2), KC_ENT | ||
26 | ), | ||
27 | |||
28 | [1] = LAYOUT_split_3x5_3( | ||
29 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
30 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, | ||
31 | KC_ESC, KC_TAB, KC_CAPS, KC_TILD, KC_GRV, KC_QUOT, KC_DQUO, KC_MPRV, KC_MPLY, KC_MNXT, | ||
32 | KC_LGUI, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_RALT | ||
33 | ), | ||
34 | |||
35 | [2] = LAYOUT_split_3x5_3( | ||
36 | KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_PSCR, KC_DEL, KC_INS, KC_HOME, KC_END, | ||
37 | KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_LEFT, KC_DOWN, KC_RIGHT, KC_UP, KC_VOLU, | ||
38 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_VOLD, | ||
39 | KC_PGDN, KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, KC_PGUP | ||
40 | ), | ||
41 | [3] = LAYOUT_split_3x5_3( | ||
42 | RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUD, RGB_HUI, XXXXXXX, XXXXXXX, | ||
43 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_SAD, RGB_SAI, XXXXXXX, XXXXXXX, | ||
44 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_VAD, RGB_VAI, XXXXXXX, XXXXXXX, | ||
45 | KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
46 | ) | ||
47 | }; | ||
48 | |||
49 | #ifdef OLED_ENABLE | ||
50 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
51 | if (is_keyboard_master()) | ||
52 | return OLED_ROTATION_180; | ||
53 | return rotation; | ||
54 | } | ||
55 | |||
56 | static void render_logo(void) { | ||
57 | static const char PROGMEM qmk_logo[] = { | ||
58 | 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, | ||
59 | 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, | ||
60 | 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, | ||
61 | 0 | ||
62 | }; | ||
63 | oled_write_P(qmk_logo, false); | ||
64 | } | ||
65 | |||
66 | static void render_status(void) { | ||
67 | switch (get_highest_layer(layer_state)) { | ||
68 | case 0: | ||
69 | oled_write_P(PSTR("B R L A O\n"), false); | ||
70 | oled_write_P(PSTR("^\n"), false); | ||
71 | oled_write_P(PSTR("Layer: Base\n"), false); | ||
72 | break; | ||
73 | case 1: | ||
74 | oled_write_P(PSTR("B R L A O\n"), false); | ||
75 | oled_write_P(PSTR(" ^\n"), false); | ||
76 | oled_write_P(PSTR("Layer: Raise\n"), false); | ||
77 | break; | ||
78 | case 2: | ||
79 | oled_write_P(PSTR("B R L A O\n"), false); | ||
80 | oled_write_P(PSTR(" ^\n"), false); | ||
81 | oled_write_P(PSTR("Layer: Lower\n"), false); | ||
82 | break; | ||
83 | case 3: | ||
84 | oled_write_P(PSTR("B R L A O\n"), false); | ||
85 | oled_write_P(PSTR(" ^\n"), false); | ||
86 | oled_write_P(PSTR("Layer: Adjust\n"), false); | ||
87 | break; | ||
88 | default: | ||
89 | oled_write_P(PSTR("B R L A O"), false); | ||
90 | oled_write_P(PSTR(" ^\n"), false); | ||
91 | oled_write_P(PSTR("Layer: Other\n"), false); | ||
92 | } | ||
93 | } | ||
94 | |||
95 | bool oled_task_user(void) { | ||
96 | if (is_keyboard_master()) { | ||
97 | render_status(); | ||
98 | } else { | ||
99 | render_logo(); | ||
100 | oled_scroll_left(); | ||
101 | } | ||
102 | return false; | ||
103 | } | ||
104 | |||
105 | #endif | ||
diff --git a/keyboards/boardsource/microdox/keymaps/via/rules.mk b/keyboards/boardsource/microdox/keymaps/via/rules.mk new file mode 100644 index 000000000..c84c1f417 --- /dev/null +++ b/keyboards/boardsource/microdox/keymaps/via/rules.mk | |||
@@ -0,0 +1,6 @@ | |||
1 | OLED_ENABLE = yes | ||
2 | OLED_DRIVER = SSD1306 | ||
3 | VIA_ENABLE = yes | ||
4 | EXTRAKEY_ENABLE = yes | ||
5 | RGBLIGHT_ENABLE = yes | ||
6 | LTO_ENABLE = yes | ||