aboutsummaryrefslogtreecommitdiff
path: root/keyboards/dumbo
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/dumbo')
-rw-r--r--keyboards/dumbo/config.h58
-rw-r--r--keyboards/dumbo/dumbo.c16
-rw-r--r--keyboards/dumbo/dumbo.h44
-rw-r--r--keyboards/dumbo/info.json62
-rw-r--r--keyboards/dumbo/keymaps/default/config.h21
-rw-r--r--keyboards/dumbo/keymaps/default/keymap.c232
-rw-r--r--keyboards/dumbo/keymaps/default/rules.mk3
-rw-r--r--keyboards/dumbo/keymaps/trip-trap/config.h27
-rw-r--r--keyboards/dumbo/keymaps/trip-trap/keymap.c430
-rw-r--r--keyboards/dumbo/keymaps/trip-trap/rules.mk4
-rw-r--r--keyboards/dumbo/readme.md17
-rw-r--r--keyboards/dumbo/rules.mk19
12 files changed, 933 insertions, 0 deletions
diff --git a/keyboards/dumbo/config.h b/keyboards/dumbo/config.h
new file mode 100644
index 000000000..07b67d06d
--- /dev/null
+++ b/keyboards/dumbo/config.h
@@ -0,0 +1,58 @@
1/*
2Copyright 2020 Adam Naldal <[email protected]>
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7This program is distributed in the hope that it will be useful,
8but WITHOUT ANY WARRANTY; without even the implied warranty of
9MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10GNU General Public License for more details.
11You should have received a copy of the GNU General Public License
12along with this program. If not, see <http://www.gnu.org/licenses/>.
13*/
14
15#pragma once
16
17#include "config_common.h"
18
19/* USB Device descriptor parameter */
20#define VENDOR_ID 0xFEED
21#define PRODUCT_ID 0x25E3
22#define DEVICE_VER 0x0001
23#define MANUFACTURER trip_trap
24#define PRODUCT Dumbo
25
26/* key matrix size */
27/* Rows are doubled up */
28#define MATRIX_ROWS 8
29#define MATRIX_COLS 6
30
31// wiring
32#define MATRIX_ROW_PINS { D4, D7, E6, B4 }
33#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6}
34#define UNUSED_PINS
35
36#define ENCODERS_PAD_A { F4, C6 }
37#define ENCODERS_PAD_B { F5, B5 }
38#define ENCODERS_PAD_A_RIGHT { F5, B5 }
39#define ENCODERS_PAD_B_RIGHT { F4, C6 }
40
41/* COL2ROW, ROW2COL*/
42#define DIODE_DIRECTION COL2ROW
43
44/* define if matrix has ghost (lacks anti-ghosting diodes) */
45//#define MATRIX_HAS_GHOST
46
47/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
48#define DEBOUNCE 5
49
50/*
51 * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN.
52 */
53#define SOFT_SERIAL_PIN D2
54
55/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
56#define LOCKING_SUPPORT_ENABLE
57/* Locking resynchronize hack */
58#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/dumbo/dumbo.c b/keyboards/dumbo/dumbo.c
new file mode 100644
index 000000000..a8c34c1c9
--- /dev/null
+++ b/keyboards/dumbo/dumbo.c
@@ -0,0 +1,16 @@
1/* Copyright 2020 Adam Naldal <[email protected]>
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#include "dumbo.h"
diff --git a/keyboards/dumbo/dumbo.h b/keyboards/dumbo/dumbo.h
new file mode 100644
index 000000000..bd1d02f8e
--- /dev/null
+++ b/keyboards/dumbo/dumbo.h
@@ -0,0 +1,44 @@
1/* Copyright 2020 Adam Naldal <[email protected]>
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#pragma once
17
18#include "quantum.h"
19
20/* This a shortcut to help you visually see your layout.
21 *
22 * The first section contains all of the arguments representing the physical
23 * layout of the board and position of the keys.
24 *
25 * The second converts the arguments into a two-dimensional array which
26 * represents the switch matrix.
27 */
28
29#define LAYOUT_split_3x6_4( \
30 L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
31 L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
32 L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
33 L30, L31, L32, L33, R30, R31, R32, R33 \
34 ) \
35 { \
36 { L00, L01, L02, L03, L04, L05 }, \
37 { L10, L11, L12, L13, L14, L15 }, \
38 { L20, L21, L22, L23, L24, L25 }, \
39 { KC_NO, KC_NO, L30, L31, L32, L33 }, \
40 { R05, R04, R03, R02, R01, R00 }, \
41 { R15, R14, R13, R12, R11, R10 }, \
42 { R25, R24, R23, R22, R21, R20 }, \
43 { KC_NO, KC_NO, R33, R32, R31, R30 } \
44 }
diff --git a/keyboards/dumbo/info.json b/keyboards/dumbo/info.json
new file mode 100644
index 000000000..885ea08e2
--- /dev/null
+++ b/keyboards/dumbo/info.json
@@ -0,0 +1,62 @@
1{
2 "keyboard_name": "Dumbo",
3 "url": "",
4 "maintainer": "adamnaldal",
5 "layouts": {
6 "LAYOUT_split_3x6_4": {
7 "layout": [
8 {"x":0, "y":1.25},
9 {"x":1, "y":1},
10 {"x":2, "y":0.25},
11 {"x":3, "y":0},
12 {"x":4, "y":0.5},
13 {"x":5, "y":0.75},
14
15 {"x":9.5, "y":0.75},
16 {"x":10.5, "y":0.5},
17 {"x":11.5, "y":0},
18 {"x":12.5, "y":0.25},
19 {"x":13.5, "y":1},
20 {"x":14.5, "y":1.25},
21
22 {"x":0, "y":2.25},
23 {"x":1, "y":2},
24 {"x":2, "y":1.25},
25 {"x":3, "y":1},
26 {"x":4, "y":1.5},
27 {"x":5, "y":1.75},
28
29 {"x":9.5, "y":1.75},
30 {"x":10.5, "y":1.5},
31 {"x":11.5, "y":1},
32 {"x":12.5, "y":1.25},
33 {"x":13.5, "y":2},
34 {"x":14.5, "y":2.25},
35
36 {"x":0, "y":3.25},
37 {"x":1, "y":3},
38 {"x":2, "y":2.25},
39 {"x":3, "y":2},
40 {"x":4, "y":2.5},
41 {"x":5, "y":2.75},
42
43 {"x":9.5, "y":2.75},
44 {"x":10.5, "y":2.5},
45 {"x":11.5, "y":2},
46 {"x":12.5, "y":2.25},
47 {"x":13.5, "y":3},
48 {"x":14.5, "y":3.25},
49
50 {"x":3.25, "y":3.75},
51 {"x":4.25, "y":3.75, "h":1.5},
52 {"x":5.25, "y":3.75, "h":1.5},
53 {"x":6.25, "y":4.25},
54
55 {"x":8.25, "y":4.25},
56 {"x":9.25, "y":3.75, "h":1.5},
57 {"x":10.25, "y":3.75, "h":1.5},
58 {"x":11.25, "y":3.75}
59 ]
60 }
61 }
62}
diff --git a/keyboards/dumbo/keymaps/default/config.h b/keyboards/dumbo/keymaps/default/config.h
new file mode 100644
index 000000000..3b330ce54
--- /dev/null
+++ b/keyboards/dumbo/keymaps/default/config.h
@@ -0,0 +1,21 @@
1/* Copyright 2020 Adam Naldal <[email protected]>
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// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
20// #define SPLIT_USB_DETECT
21// #define NO_USB_STARTUP_CHECK
diff --git a/keyboards/dumbo/keymaps/default/keymap.c b/keyboards/dumbo/keymaps/default/keymap.c
new file mode 100644
index 000000000..7fc3ffc2c
--- /dev/null
+++ b/keyboards/dumbo/keymaps/default/keymap.c
@@ -0,0 +1,232 @@
1/* Copyright 2020 Adam Naldal <[email protected]>
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#include QMK_KEYBOARD_H
17
18enum layers {
19 _QWERTY = 0,
20 _NN,
21 _MS,
22 _SP
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26/*
27 * Base Layer: QWERTY
28 *
29 * ,-------------------------------------------. ,-------------------------------------------.
30 * | TAB | Q | W | E | R | T | | Y | U | I | O | P | ESC |
31 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
32 * | CTRL | A | S | D | F | G | | H | J | K | L | ; : | ' " |
33 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
34 * | LShift | Z | X | C | V | B | | N | M | , < | . > | / ? | SHIFT |
35 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
36 * | GUI | Caps | Space| Nav +| |Media+| Bksp | Enter| AltGr|
37 * | | | |Number| |symbol| | | |
38 * `---------------------------' `---------------------------'
39 */
40 [_QWERTY] = LAYOUT_split_3x6_4(
41 //,-----------------------------------------------------. ,-----------------------------------------------------.
42 KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ESC,
43 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
44 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
45 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
46 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
47 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
48 KC_LGUI, KC_CAPS, KC_SPC, MO(_NN), MO(_MS), KC_BSPC, KC_ENT, KC_RALT
49 //`------------------------------------' '------------------------------------'
50 ),
51 /*
52 * Navigation and Numbers: _NN
53 *
54 * ,-------------------------------------------. ,-------------------------------------------.
55 * | TAB | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | ESC |
56 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
57 * | CTRL | F1 | F2 | F3 | F4 | F5 | | left | down | up | right| | |
58 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
59 * | LShift | F6 | F7 | F8 | F9 | F10 | | home | pgdn | pgup | end | | SHIFT |
60 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
61 * | GUI | Del | Space| Nav +| |Media+|Back- | Enter| AltGr|
62 * | | | |Number| |symbol|space | | |
63 * `---------------------------' `---------------------------'
64 */
65 [_NN] = LAYOUT_split_3x6_4(
66 //,-----------------------------------------------------. ,-----------------------------------------------------.
67 KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC,
68 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
69 KC_LCTL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, XXXXXXX,
70 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
71 KC_LSFT, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, KC_RSFT,
72 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
73 KC_LGUI, KC_DEL, KC_SPC, _______, _______, KC_BSPC, KC_ENT, KC_RALT
74 //`------------------------------------' '------------------------------------'
75 ),
76 /*
77 * Media and Symbols: _MS
78 *
79 * ,-------------------------------------------. ,-------------------------------------------.
80 * | TAB | ! | @ | # | $ | % | | ^ | & | * | ( | ) | ESC |
81 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
82 * | CTRL | | prev | play | next | vol+ | | - | = | { | } | | | ´ |
83 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
84 * | LShift | |brght-|brght+| mute | vol- | | _ | + | [ | ] | \ | ~ |
85 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
86 * | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr|
87 * | | | |Number| |symbol| | | |
88 * `---------------------------' `---------------------------'
89 */
90 [_MS] = LAYOUT_split_3x6_4(
91 //,-----------------------------------------------------. ,-----------------------------------------------------.
92 KC_TAB, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_ESC,
93 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
94 KC_LCTL, XXXXXXX, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
95 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
96 KC_LSFT, XXXXXXX, KC_BRID, KC_BRIU, KC_MUTE, KC_VOLD, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
97 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
98 KC_LGUI, KC_DEL, KC_SPC, _______, _______, KC_BSPC, KC_ENT, KC_RALT
99 //`------------------------------------' '------------------------------------'
100 ),
101/*
102 * Special functions: _SP
103 *
104 * ,-------------------------------------------. ,-------------------------------------------.
105 * | TAB | | | | RESET| | | | | | | | ESC |
106 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
107 * | CTRL | | | DEBUG| | | | | | | | | |
108 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
109 * | LShift | | | | | | | | | | | | SHIFT |
110 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
111 * | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr|
112 * | | | |Number| |symbol| | | |
113 * `---------------------------' `---------------------------'
114 */
115 [_SP] = LAYOUT_split_3x6_4(
116 //,-----------------------------------------------------. ,-----------------------------------------------------.
117 KC_TAB, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC,
118 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
119 KC_LCTL, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
120 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
121 KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT,
122 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
123 KC_LGUI, KC_DEL, KC_SPC, _______, _______, KC_BSPC, KC_ENT, KC_RALT
124 //`------------------------------------' '------------------------------------'
125 ),
126
127};
128
129layer_state_t layer_state_set_user(layer_state_t state) {
130 return update_tri_layer_state(state, _NN, _MS, _SP);
131}
132
133#ifdef OLED_ENABLE
134
135static void render_logo(void) {
136 static const char PROGMEM qmk_logo[] = {
137 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
138 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
139 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
140 };
141
142 oled_write_P(qmk_logo, false);
143}
144
145static void print_status_narrow(void) {
146 // Print current mode
147 oled_write_P(PSTR("\n"), false);
148 oled_write_ln_P(PSTR("MODE"), false);
149 oled_write_ln_P(PSTR(""), false);
150
151 oled_write_P(PSTR("\n\n"), false);
152 // Print current layer
153 oled_write_ln_P(PSTR("LAYER"), false);
154 switch (get_highest_layer(layer_state)) {
155 case _QWERTY:
156 oled_write_P(PSTR("Base\n"), false);
157 break;
158 case _NN:
159 oled_write_P(PSTR("Nums\n"), false);
160 break;
161 case _MS:
162 oled_write_P(PSTR("Sym\n"), false);
163 break;
164 case _SP:
165 oled_write_P(PSTR("Spec\n"), false);
166 break;
167 default:
168 oled_write_ln_P(PSTR("Undef\n"), false);
169 }
170 oled_write_P(PSTR("\n\n"), false);
171 led_t led_usb_state = host_keyboard_led_state();
172 oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock);
173}
174
175oled_rotation_t oled_init_user(oled_rotation_t rotation) {
176 if (is_keyboard_master()) {
177 return OLED_ROTATION_270;
178 }
179 return rotation;
180}
181
182bool oled_task_user(void) {
183 if (is_keyboard_master()) {
184 print_status_narrow();
185 } else {
186 render_logo();
187 }
188 return false;
189}
190#endif
191
192#ifdef ENCODER_ENABLE
193bool encoder_update_user(uint8_t index, bool clockwise) {
194 if (index == 0) {
195 // master side thumb encoder
196 // Volume control
197 if (clockwise) {
198 tap_code(KC_VOLU);
199 } else {
200 tap_code(KC_VOLD);
201 }
202 }
203 else if (index == 1) {
204 // master side pinky encoder
205 // Page down / Page up
206 if (clockwise) {
207 tap_code(KC_PGDN);
208 } else {
209 tap_code(KC_PGUP);
210 }
211 }
212 else if (index == 2) {
213 // minion side thumb encoder
214 // Next track / Previous track
215 if (clockwise) {
216 tap_code(KC_MFFD);
217 } else {
218 tap_code(KC_MRWD);
219 }
220 }
221 else if (index == 3) {
222 // minion side pinky encoder
223 // Page end / Page home
224 if (clockwise) {
225 tap_code(KC_END);
226 } else {
227 tap_code(KC_HOME);
228 }
229 }
230 return true;
231}
232#endif
diff --git a/keyboards/dumbo/keymaps/default/rules.mk b/keyboards/dumbo/keymaps/default/rules.mk
new file mode 100644
index 000000000..a2d6e788f
--- /dev/null
+++ b/keyboards/dumbo/keymaps/default/rules.mk
@@ -0,0 +1,3 @@
1OLED_ENABLE = yes
2OLED_DRIVER = SSD1306 # Enables the use of OLED displays
3ENCODER_ENABLE = yes # Enables the use of one or more encoders
diff --git a/keyboards/dumbo/keymaps/trip-trap/config.h b/keyboards/dumbo/keymaps/trip-trap/config.h
new file mode 100644
index 000000000..7f713e4a3
--- /dev/null
+++ b/keyboards/dumbo/keymaps/trip-trap/config.h
@@ -0,0 +1,27 @@
1/* Copyright 2020 Adam Naldal <[email protected]>
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// Tapping term is ever so slightly lowered from the 200ms default to make layer and mod usage more snappy.
20#define TAPPING_TERM 200
21
22// Prevent normal rollover on alphas from accidentally triggering mods.
23#define IGNORE_MOD_TAP_INTERRUPT
24
25// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
26// #define SPLIT_USB_DETECT
27// #define NO_USB_STARTUP_CHECK
diff --git a/keyboards/dumbo/keymaps/trip-trap/keymap.c b/keyboards/dumbo/keymaps/trip-trap/keymap.c
new file mode 100644
index 000000000..73042f5f5
--- /dev/null
+++ b/keyboards/dumbo/keymaps/trip-trap/keymap.c
@@ -0,0 +1,430 @@
1/* Copyright 2020 Adam Naldal <[email protected]>
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#include QMK_KEYBOARD_H
17#include "keymap_danish.h"
18#include <stdio.h>
19
20enum layers {
21 _QWERTY = 0,
22 _COLEMAK,
23 _NN,
24 _MS,
25 _SP
26};
27
28// Default layer switching
29#define QWERT DF(_QWERTY)
30#define COLEM DF(_COLEMAK)
31
32// Layer tap codes
33#define LT_SPC LT(_NN, KC_SPC)
34#define LT_TAB LT(_MS, KC_TAB)
35#define LT_ENT LT(_MS, KC_ENT)
36#define LT_BSPC LT(_NN, KC_BSPC)
37
38// Qwerty homerow mods
39#define A_CTL LCTL_T(KC_A)
40#define S_ALT LALT_T(KC_S)
41#define D_GUI LGUI_T(KC_D)
42#define F_SFT LSFT_T(KC_F)
43#define J_SFT RSFT_T(KC_J)
44#define K_GUI RGUI_T(KC_K)
45#define L_ALT RALT_T(KC_L)
46#define AE_CTL RCTL_T(DK_AE)
47
48// Colemak homerow mods
49#define R_ALT LALT_T(KC_R)
50#define S_GUI LGUI_T(KC_S)
51#define T_SFT LSFT_T(KC_T)
52#define N_SFT RSFT_T(KC_N)
53#define E_GUI RGUI_T(KC_E)
54#define I_ALT RALT_T(KC_I)
55#define O_CTL RCTL_T(KC_O)
56
57// Navigation and numbers homerow mods
58#define RGHT_SFT LSFT_T(KC_RGHT)
59#define DOWN_GUI LGUI_T(KC_DOWN)
60#define LEFT_ALT LALT_T(KC_LEFT)
61#define N4_SFT RSFT_T(KC_4)
62#define N5_GUI RGUI_T(KC_5)
63#define N6_ALT RALT_T(KC_6)
64#define OE_CTL RCTL_T(DK_OSTR)
65
66// Undefined or wrong symbols (homebrew)
67#define HB_LCBR S(A(KC_8)) // {
68#define HB_RCBR S(A(KC_9)) // }
69#define HB_LABR KC_GRV // <
70#define HB_RABR S(KC_GRV) // >
71#define HB_USD KC_NUBS // $
72#define HB_PRGF S(KC_NUBS) // §
73#define HB_AT A(KC_NUHS) // @
74#define HB_EUR S(KC_4) // €
75
76
77const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
78/*
79 * Base Layer: QWERTY
80 *
81 * ,-------------------------------------------. ,-------------------------------------------.
82 * | | Q | W | E | R | T | | Y | U | I | O | P | Ã… |
83 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
84 * | | A | S | D | F | G | | H | J | K | L | Æ | Ø |
85 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
86 * | | Z | X | C | V | B | | N | M | , ; | . : | - _ | |
87 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
88 * | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps| PLAY|
89 * |(enc) | | _NN | _MS | | _MS | _NN | |(enc)|
90 * `---------------------------' `---------------------------'
91 */
92 [_QWERTY] = LAYOUT_split_3x6_4(
93 //,-----------------------------------------------------. ,-----------------------------------------------------.
94 XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, DK_ARNG,
95 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
96 XXXXXXX, A_CTL, S_ALT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_ALT, AE_CTL, DK_OSTR,
97 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
98 XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DK_MINS, XXXXXXX,
99 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
100 KC_MUTE, KC_ESC, LT_SPC, LT_TAB, LT_ENT, LT_BSPC, KC_CAPS, KC_MPLY
101 //`------------------------------------' '------------------------------------'
102 ),
103/*
104 * Base Layer: COLEMAK
105 *
106 * ,-------------------------------------------. ,-------------------------------------------.
107 * | | Q | W | F | P | B | | J | L | U | Y | Ã… | |
108 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
109 * | | A | R | S | T | G | | M | N | E | I | O | |
110 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
111 * | | Z | X | C | D | V | | K | H | , ; | . : | Æ | |
112 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
113 * | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps | PLAY|
114 * |(enc) | | _NN | _MS | | _MS | _NN | | (enc)|
115 * `---------------------------' `---------------------------'
116 */
117 [_COLEMAK] = LAYOUT_split_3x6_4(
118 //,-----------------------------------------------------. ,-----------------------------------------------------.
119 XXXXXXX, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, DK_ARNG, XXXXXXX,
120 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
121 XXXXXXX, A_CTL, R_ALT, S_GUI, T_SFT, KC_G, KC_M, N_SFT, E_GUI, I_ALT, O_CTL, XXXXXXX,
122 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
123 XXXXXXX, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, DK_AE, XXXXXXX,
124 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
125 KC_MUTE, KC_ESC, LT_SPC, LT_TAB, LT_ENT, LT_BSPC, KC_CAPS, KC_MPLY
126 //`------------------------------------' '------------------------------------'
127 ),
128 /*
129 * Navigation and Numbers: _NN
130 *
131 * ,-------------------------------------------. ,-------------------------------------------.
132 * | | | Home | Up | End | pgUp | | * | 7 | 8 | 9 | + | |
133 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
134 * | | | Left | Down | Right| pgDwn| | / | 4 | 5 | 6 | Ø | |
135 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
136 * | | | Cut | Copy | | Paste| | = | 1 | 2 | 3 | - | |
137 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
138 * | MUTE | Del | Space| Tab | | Enter| Bksp | 0 | PLAY |
139 * |(enc) | | _NN | _MS | | _MS | _NN | |(enc) |
140 * `---------------------------' `---------------------------'
141 */
142 [_NN] = LAYOUT_split_3x6_4(
143 //,-----------------------------------------------------. ,-----------------------------------------------------.
144 XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, DK_ASTR, KC_7, KC_8, KC_9, DK_PLUS, XXXXXXX,
145 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
146 XXXXXXX, KC_LCTL,LEFT_ALT,DOWN_GUI,RGHT_SFT, KC_PGDN, DK_SLSH, N4_SFT, N5_GUI, N6_ALT, OE_CTL, XXXXXXX,
147 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
148 XXXXXXX, XXXXXXX, G(KC_X), G(KC_C), XXXXXXX, G(KC_V), DK_EQL, KC_1, KC_2, KC_3, DK_MINS, XXXXXXX,
149 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
150 KC_MUTE, KC_DEL, _______, _______, _______, _______, KC_0, KC_MPLY
151 //`------------------------------------' '------------------------------------'
152 ),
153 /*
154 * Media and Symbols: _MS
155 *
156 * ,-------------------------------------------. ,-------------------------------------------.
157 * | | | | [ | ] | F1 | | $ | / | ( | ) | ? | |
158 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
159 * | |brght-|brght+| { | } | F2 | | @ | € | % | & | ' | |
160 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
161 * | | | | < | > | F3 | | § | ! | " | # | _ | |
162 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
163 * | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps | PLAY|
164 * |(enc) | | _NN | _MS | | _MS | _NN | | (enc)|
165 * `---------------------------' `---------------------------'
166 */
167 [_MS] = LAYOUT_split_3x6_4(
168 //,-----------------------------------------------------. ,-----------------------------------------------------.
169 XXXXXXX, XXXXXXX, XXXXXXX, DK_LBRC, DK_RBRC, KC_F1, HB_USD, DK_SLSH, DK_LPRN, DK_RPRN, DK_QUES, XXXXXXX,
170 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
171 XXXXXXX, KC_BRID, KC_BRIU, HB_LCBR, HB_RCBR, KC_F2, HB_AT, HB_EUR, DK_PERC, DK_AMPR, DK_QUOT, XXXXXXX,
172 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
173 XXXXXXX, XXXXXXX, XXXXXXX, HB_LABR, HB_RABR, KC_F3, HB_PRGF, DK_EXLM, DK_DQUO, DK_HASH, DK_UNDS, XXXXXXX,
174 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
175 KC_MUTE, KC_ESC, _______, _______, _______, _______, KC_CAPS, KC_MPLY
176 //`------------------------------------' '------------------------------------'
177 ),
178/*
179 * Special functions: _SP
180 *
181 * ,-------------------------------------------. ,-------------------------------------------.
182 * | |QWERTY| | | RESET| | | | | | | | |
183 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
184 * | | | | DEBUG| | | | | | | | | |
185 * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
186 * | | | |COLEMK| | | | | | | | | |
187 * `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
188 * | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr|
189 * | | | |Number| |symbol| | | |
190 * `---------------------------' `---------------------------'
191 */
192 [_SP] = LAYOUT_split_3x6_4(
193 //,-----------------------------------------------------. ,-----------------------------------------------------.
194 XXXXXXX, QWERT, XXXXXXX, XXXXXXX, RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
195 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
196 XXXXXXX, XXXXXXX, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
197 //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
198 XXXXXXX, XXXXXXX, XXXXXXX, COLEM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
199 //|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
200 KC_MUTE, KC_ESC, _______, _______, _______, _______, KC_CAPS, KC_MPLY
201 //`------------------------------------' '------------------------------------'
202 ),
203
204};
205
206layer_state_t layer_state_set_user(layer_state_t state) {
207 return update_tri_layer_state(state, _NN, _MS, _SP);
208}
209
210#ifdef OLED_ENABLE
211char wpm_str[10];
212
213// static void render_logo(void) {
214// static const char PROGMEM qmk_logo[] = {
215// 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
216// 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
217// 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
218// };
219//
220// oled_write_P(qmk_logo, false);
221// }
222
223static void print_status_narrow(void) {
224 // Print current mode
225 oled_write_P(PSTR("\n"), false);
226 oled_write_ln_P(PSTR("MODE"), false);
227 oled_write_ln_P(PSTR(""), false);
228
229 switch (get_highest_layer(default_layer_state)) {
230 case _QWERTY:
231 oled_write_ln_P(PSTR("Qwrt"), false);
232 break;
233 case _COLEMAK:
234 oled_write_ln_P(PSTR("Clmk"), false);
235 break;
236 default:
237 oled_write_P(PSTR("Undef"), false);
238 }
239 oled_write_P(PSTR("\n\n"), false);
240 // Print current layer
241 oled_write_ln_P(PSTR("LAYER"), false);
242 switch (get_highest_layer(layer_state)) {
243 case _QWERTY:
244 oled_write_P(PSTR("Base\n"), false);
245 break;
246 case _NN:
247 oled_write_P(PSTR("Nums\n"), false);
248 break;
249 case _MS:
250 oled_write_P(PSTR("Sym\n"), false);
251 break;
252 case _SP:
253 oled_write_P(PSTR("Spec\n"), false);
254 break;
255 default:
256 oled_write_ln_P(PSTR("Undef\n"), false);
257 }
258 oled_write_P(PSTR("\n\n"), false);
259 led_t led_usb_state = host_keyboard_led_state();
260 oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock);
261}
262
263#define ANIM_NUM_FRAMES 2 // number of frames in the animation
264#define MAX_DURATION 10000
265#define ANIM_BEGIN 30
266uint16_t anim_frame_duration = 100; // how long each frame lasts
267// #define ANIM_REVERSE // define this if you want the animation to run backwards at the end
268
269#ifdef ANIM_REVERSE
270#define ANIM_TOTAL_FRAMES (2*((ANIM_NUM_FRAMES)-1))
271#else
272#define ANIM_TOTAL_FRAMES ANIM_NUM_FRAMES
273#endif
274
275uint16_t anim_timer = 0;
276uint8_t current_anim_frame = 0;
277
278static void render_anim(void) {
279 static const char PROGMEM frame[ANIM_NUM_FRAMES][512] = {
280 {
281 // 'pokemon experiment frame 1', 32x128px
282 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
283 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
284 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x10, 0x08, 0x04, 0x04, 0x02, 0x02, 0x02,
285 0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
286 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x3c, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
287 0x04, 0xf2, 0x3a, 0x1c, 0x3c, 0xf8, 0xe0, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00,
288 0x00, 0x00, 0x00, 0x70, 0x8c, 0x03, 0x41, 0x82, 0x02, 0x03, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
289 0x00, 0x07, 0x04, 0x84, 0x84, 0xc7, 0x63, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00,
290 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x04, 0x1c, 0x28, 0x58, 0xa4, 0xa4, 0x44, 0x42, 0x42,
291 0x23, 0x97, 0x91, 0x48, 0x24, 0x23, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
292 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
293 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
294 0x00, 0x00, 0x80, 0x70, 0x08, 0x04, 0x04, 0x08, 0x08, 0x50, 0x20, 0x10, 0x10, 0x10, 0x90, 0x90,
295 0x90, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x10, 0x08, 0x08, 0x04, 0x04, 0x08, 0xf0, 0x00, 0x00,
296 0x80, 0x78, 0x1f, 0x3a, 0xf2, 0xc4, 0x00, 0x00, 0x30, 0x60, 0x00, 0x06, 0x8f, 0xcf, 0xe7, 0x03,
297 0x01, 0x00, 0x04, 0xf2, 0x3a, 0x1c, 0x1c, 0x78, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0,
298 0x1f, 0x64, 0xb4, 0x64, 0xa7, 0x23, 0x40, 0x48, 0x50, 0x40, 0x80, 0x80, 0x91, 0x89, 0x80, 0x80,
299 0x80, 0x40, 0x40, 0x47, 0x44, 0x44, 0xa4, 0x64, 0x27, 0x13, 0x08, 0x00, 0x00, 0x80, 0x60, 0x1f,
300 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x04, 0x0c, 0x0c, 0x0c, 0x08, 0x08, 0x08, 0x0c,
301 0x0c, 0x0c, 0x0a, 0x0a, 0x09, 0x05, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00,
302 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
303 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
304 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04,
305 0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
306 0x00, 0x00, 0x00, 0xfc, 0x1b, 0x3c, 0xfc, 0xf9, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
307 0x00, 0x00, 0x00, 0x02, 0xf1, 0x39, 0x1c, 0x3c, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x03, 0x0c, 0xf0,
308 0x00, 0xf8, 0x06, 0x01, 0x32, 0x02, 0x03, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
309 0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x84, 0x84, 0x47, 0xe3, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x3f,
310 0x00, 0x00, 0x01, 0x02, 0x06, 0x0a, 0x14, 0x28, 0x48, 0x44, 0x44, 0xc2, 0xc2, 0xc2, 0xa2, 0xa2,
311 0xa1, 0x91, 0x91, 0x89, 0x49, 0x45, 0x44, 0x22, 0x21, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00,
312 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
313 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
314
315 },
316 {
317 // 'pokemon experiment frame 2', 32x128px
318 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
319 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
320 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x84, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
321 0x00, 0x80, 0x80, 0x00, 0x01, 0x01, 0x01, 0x02, 0x0c, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
322 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x87, 0x8f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
323 0x01, 0xfc, 0x0e, 0x07, 0x0f, 0xfe, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00,
324 0x00, 0x00, 0x00, 0x1c, 0x63, 0x80, 0x10, 0x20, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00,
325 0x00, 0x81, 0x81, 0x41, 0x41, 0x21, 0x10, 0x00, 0x80, 0x60, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00,
326 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x04, 0x04, 0x0a, 0x0a, 0x0a, 0x0a, 0x09,
327 0x05, 0x07, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
328 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
329 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
330 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0x10, 0x10, 0xa0, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20,
331 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x10, 0xe0, 0x00, 0x00,
332 0x00, 0xf0, 0x3f, 0x72, 0xe2, 0x80, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x0c, 0x1e, 0x9e, 0xcf, 0x07,
333 0x03, 0x00, 0x00, 0xe2, 0x72, 0x38, 0x38, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0,
334 0x3f, 0xc8, 0x68, 0x48, 0x8f, 0x87, 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x43, 0x23, 0x01, 0x00,
335 0x00, 0x00, 0x00, 0x0f, 0x08, 0x88, 0x88, 0x48, 0x4f, 0x27, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x3f,
336 0x00, 0x00, 0x01, 0x02, 0x02, 0x06, 0x05, 0x09, 0x09, 0x09, 0x12, 0x12, 0x12, 0x12, 0x11, 0x11,
337 0x11, 0x11, 0x11, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
338 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
339 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
340 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x90, 0x88, 0x88, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02,
341 0x02, 0x02, 0x02, 0x82, 0x82, 0x84, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00,
342 0x00, 0x00, 0x00, 0xfe, 0x0d, 0x1e, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
343 0x00, 0x00, 0x00, 0x00, 0xf8, 0x1c, 0x0e, 0x1e, 0xfe, 0xfc, 0xf8, 0x00, 0x00, 0x01, 0x06, 0xf8,
344 0x00, 0x78, 0x87, 0x00, 0x31, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
345 0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x82, 0x82, 0x43, 0x61, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f,
346 0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x04, 0x0c, 0x08, 0x14, 0x12, 0x12, 0x12, 0x22, 0x22, 0x22,
347 0x21, 0x21, 0x21, 0x21, 0x11, 0x11, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
348 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
349 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
350 }
351 };
352
353 if (get_current_wpm() > ANIM_BEGIN){
354 if(timer_elapsed(anim_timer) > anim_frame_duration) {
355 anim_timer = timer_read();
356 current_anim_frame = (current_anim_frame + 1) % ANIM_TOTAL_FRAMES;
357 oled_clear();
358 oled_write_raw_P(frame[abs((ANIM_NUM_FRAMES-1)-current_anim_frame)], 512);
359 if (get_current_wpm() > ANIM_BEGIN){
360 anim_frame_duration = MAX_DURATION/get_current_wpm();
361 }
362 }
363 } else {
364 oled_write_raw_P(frame[0],512);
365 }
366}
367
368oled_rotation_t oled_init_user(oled_rotation_t rotation) {
369 if (is_keyboard_master()) {
370 return OLED_ROTATION_270;
371 }
372 if (is_keyboard_master() != true){
373 return OLED_ROTATION_270;
374 }
375 return rotation;
376}
377
378bool oled_task_user(void) {
379 if (is_keyboard_master()) {
380 print_status_narrow();
381 sprintf(wpm_str, "%03d", get_current_wpm());
382 oled_write(wpm_str, false);
383 } else {
384 render_anim();
385 }
386 return false;
387}
388#endif
389
390#ifdef ENCODER_ENABLE
391bool encoder_update_user(uint8_t index, bool clockwise) {
392 if (index == 0) {
393 // master side thumb encoder
394 // Volume control
395 if (clockwise) {
396 tap_code(KC_VOLU);
397 } else {
398 tap_code(KC_VOLD);
399 }
400 }
401 else if (index == 1) {
402 // master side pinky encoder
403 // Page down / Page up
404 if (clockwise) {
405 tap_code(KC_PGDN);
406 } else {
407 tap_code(KC_PGUP);
408 }
409 }
410 else if (index == 2) {
411 // minion side thumb encoder
412 // Next track / Previous track
413 if (clockwise) {
414 tap_code(KC_MFFD);
415 } else {
416 tap_code(KC_MRWD);
417 }
418 }
419 else if (index == 3) {
420 // minion side pinky encoder
421 // Page end / Page home
422 if (clockwise) {
423 tap_code(KC_END);
424 } else {
425 tap_code(KC_HOME);
426 }
427 }
428 return true;
429}
430#endif
diff --git a/keyboards/dumbo/keymaps/trip-trap/rules.mk b/keyboards/dumbo/keymaps/trip-trap/rules.mk
new file mode 100644
index 000000000..1913e10c4
--- /dev/null
+++ b/keyboards/dumbo/keymaps/trip-trap/rules.mk
@@ -0,0 +1,4 @@
1OLED_ENABLE = yes
2OLED_DRIVER = SSD1306 # Enables the use of OLED displays
3ENCODER_ENABLE = yes # Enables the use of one or more encoders
4WPM_ENABLE = yes
diff --git a/keyboards/dumbo/readme.md b/keyboards/dumbo/readme.md
new file mode 100644
index 000000000..8ebd14477
--- /dev/null
+++ b/keyboards/dumbo/readme.md
@@ -0,0 +1,17 @@
1# Dumbo
2
3![Dumbo](https://i.imgur.com/EEqCZsgl.jpg)
4
5Inspired by the corne, kyria and chimera ergo 42, the dumbo is a split keyboard ready for a comfortable future (read: bluetooth and ergo).
6
7The Dumbo is a small split ergonomic keyboard with 44 keys (outer columns can be broken off to make it 38 keys), heavy columnar stagger, small and comfortable thumb cluster, support for two rotary encoders per half, support for OLEDs, and optional support for a JST-PH two-pin connector to attach a battery and an on/ofF switch to power Bluetooth Pro Micro replacements like the nice!nano.
8
9* Keyboard Maintainer: [Adam Naldal](https://github.com/adamnaldal)
10* Hardware Supported: Pro Micro and pin-compatible replacements like the nice!nano
11* Hardware Availability: NA
12
13Make example for this keyboard (after setting up your build environment):
14
15 make dumbo:default
16
17See 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/dumbo/rules.mk b/keyboards/dumbo/rules.mk
new file mode 100644
index 000000000..6348457b6
--- /dev/null
+++ b/keyboards/dumbo/rules.mk
@@ -0,0 +1,19 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = yes # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15NKRO_ENABLE = no # Enable N-Key Rollover
16BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
17AUDIO_ENABLE = no # Audio output
18SPLIT_KEYBOARD = yes
19LTO_ENABLE = yes