aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/README.md52
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/config.h100
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/glcdfont.c243
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/keymap.c214
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json1
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/logo_reader.c11
-rw-r--r--keyboards/crkbd/keymaps/kidbrazil/rules.mk17
7 files changed, 638 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/kidbrazil/README.md b/keyboards/crkbd/keymaps/kidbrazil/README.md
new file mode 100644
index 000000000..28414860c
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/README.md
@@ -0,0 +1,52 @@
1# KidBrazil's custom CRKBD Layout
2
3![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg)
4
5This is a simple layout that I use for both programming and gaming. It is very
6closely based on the original CRKBD layout with some modifications to the
7position of CTRL and SHIFT.
8
9## Layers
10This keymap includes a total of 4 Layers:
11- QWERTY
12- NUMBERS
13- SYMBOLS
14- GAMING
15- WEAPONS
16
17The first three layers are pretty self explanatory and follow closely the
18default keymap for this keyboard. The magic really starts to happen with the
19gaming layer.
20
21### Gaming Layer
22The gaming layer can be toggled on/off from the SYMBOLS layer. Once on the
23gaming layer it will stay there until you toggle it off again. The gaming layer
24includes normal WASD and most of the keys FPS games use on the left hand. On the
25right hand we have F1-F12 and a few other special keys for games that require
26it.
27
28### Weapon
29The weapon layer is a momentary layer that can only be reached from the gaming
30layer. This layer preserves the left hand almost unchanged, except for when the
31layer is activated the top row becomes NUM 1 - 6 for wepon selection. The right
32hand is KC_TRNS the whole way so basically it is still the gaming layer.
33
34## Custom Font
35This keymap includes a custom font for my LooseTransistor logo. It is fine if
36you want to use it I certainly don't mind but if you want your own, just replace
37the glcdfont file here and you should be fine.
38
39Alternatively you could remove the font config line from the config.h file so it
40will use the default QMK one.
41
42## OLED
43This Keymap is setup to use the newer OLED API. Some work has been done to
44customize this with showing layer and USB information. I also tried my best to
45get a dormant / sleep state going but it is hit or miss and often only works on
46the master hand.
47
48### TODO
49- Fix OLED and Backlight so they turn off when the computer sleeps, currently
50 only the left hand does that and the LEDs still stay on.
51- Wait for Spit_common to be implemented in CRKBD and revisit the special color
52 layers and animations
diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h
new file mode 100644
index 000000000..dd3f1a030
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/config.h
@@ -0,0 +1,100 @@
1/*
2This is the c configuration file for the keymap
3
4Copyright 2012 Jun Wako <wakojun@gmail.com>
5Copyright 2015 Jack Humbert
6Copyright 2019 Lucas Moreira
7
8This program is free software: you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation, either version 2 of the License, or
11(at your option) any later version.
12
13This program is distributed in the hope that it will be useful,
14but WITHOUT ANY WARRANTY; without even the implied warranty of
15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16GNU General Public License for more details.
17
18You should have received a copy of the GNU General Public License
19along with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22#pragma once
23
24//#define USE_MATRIX_I2C
25
26/* Select hand configuration */
27
28#define MASTER_LEFT
29// #define MASTER_RIGHT
30// #define EE_HANDS
31
32//#define SSD1306OLED
33
34#define USE_SERIAL_PD2
35
36#define TAPPING_FORCE_HOLD
37#define TAPPING_TERM 150
38#undef PRODUCT
39#define PRODUCT CRKBD Loose Transistor Ed.
40
41#ifdef RGBLIGHT_ENABLE
42 //#undef RGBLED_NUM
43 //#define RGBLIGHT_ANIMATIONS
44 #define RGBLIGHT_EFFECT_BREATHING
45 #define RGBLIGHT_EFFECT_RAINBOW_MOOD
46 #define RGBLIGHT_EFFECT_KNIGHT
47 //#define RGBLED_NUM 27
48 #define RGBLIGHT_LIMIT_VAL 120
49 #define RGBLIGHT_HUE_STEP 10
50 #define RGBLIGHT_SAT_STEP 17
51 #define RGBLIGHT_VAL_STEP 17
52#endif
53
54#ifdef RGB_MATRIX_ENABLE
55//# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
56// # define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses)
57// # define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
58# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
59# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
60// # define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness)
61// # define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness)
62# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 150 out of 255. Higher may cause the controller to crash.
63# define RGB_MATRIX_HUE_STEP 8
64# define RGB_MATRIX_SAT_STEP 8
65# define RGB_MATRIX_VAL_STEP 8
66# define RGB_MATRIX_SPD_STEP 10
67
68/* Disable the animations you don&#39;t want/need. You will need to disable a good number of these *
69 * because they take up a lot of space. Disable until you can successfully compile your firmware. */
70# define DISABLE_RGB_MATRIX_ALPHAS_MODS
71# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
72// # define DISABLE_RGB_MATRIX_BREATHING
73# define DISABLE_RGB_MATRIX_CYCLE_ALL
74# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
75# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
76# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
77# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
78# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
79# define DISABLE_RGB_MATRIX_DUAL_BEACON
80# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
81# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
82# define DISABLE_RGB_MATRIX_RAINDROPS
83# define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
84# define DISABLE_RGB_MATRIX_TYPING_HEATMAP
85# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
86# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
87# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
88# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
89# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
90# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
91# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
92# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
93# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
94# define DISABLE_RGB_MATRIX_SPLASH
95# define DISABLE_RGB_MATRIX_MULTISPLASH
96# define DISABLE_RGB_MATRIX_SOLID_SPLASH
97# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
98#endif
99#define OLED_FONT_H "keyboards/crkbd/keymaps/kidbrazil/glcdfont.c"
100#define OLED_DISABLE_TIMEOUT
diff --git a/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c
new file mode 100644
index 000000000..a67c32924
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/glcdfont.c
@@ -0,0 +1,243 @@
1// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
2// See gfxfont.h for newer custom bitmap font info.
3
4#ifndef FONT5X7_H
5#define FONT5X7_H
6
7#ifdef __AVR__
8 #include <avr/io.h>
9 #include <avr/pgmspace.h>
10#elif defined(ESP8266)
11 #include <pgmspace.h>
12#else
13 #define PROGMEM
14#endif
15
16// Standard ASCII 5x7 font
17const unsigned char font[] PROGMEM = {
18 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
19 0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
20 0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
21 0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
22 0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
23 0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
24 0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
25 0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
26 0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
27 0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
28 0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
29 0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
30 0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
31 0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
32 0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
33 0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
34 0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
35 0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
36 0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
37 0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
38 0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
39 0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
40 0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
41 0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
42 0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
43 0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
44 0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
45 0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
46 0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
47 0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
48 0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
49 0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
50 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
51 0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
52 0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
53 0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
54 0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
55 0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
56 0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
57 0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
58 0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
59 0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
60 0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
61 0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
62 0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
63 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
64 0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
65 0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
66 0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
67 0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
68 0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
69 0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
70 0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
71 0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
72 0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
73 0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
74 0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
75 0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
76 0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
77 0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
78 0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
79 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
80 0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
81 0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
82 0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
83 0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
84 0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
85 0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
86 0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
87 0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
88 0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
89 0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
90 0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
91 0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
92 0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
93 0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
94 0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
95 0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
96 0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
97 0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
98 0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
99 0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
100 0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
101 0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
102 0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
103 0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
104 0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
105 0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
106 0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
107 0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
108 0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
109 0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
110 0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
111 0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
112 0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
113 0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
114 0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
115 0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
116 0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
117 0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
118 0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
119 0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
120 0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
121 0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
122 0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
123 0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
124 0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
125 0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
126 0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
127 0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
128 0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
129 0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
130 0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
131 0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
132 0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
133 0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
134 0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
135 0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
136 0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
137 0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
138 0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
139 0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
140 0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
141 0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
142 0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
143 0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
144 0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
145 0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
146 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
147 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8,
148 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0x00,
149 0xFC, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE,
150 0x02, 0xF9, 0x01, 0x01, 0x05, 0x09,
151 0x11, 0x22, 0x06, 0xFE, 0xFE, 0xFE,
152 0xFE, 0xFE, 0xFE, 0xFE, 0x46, 0x46,
153 0x44, 0x44, 0x45, 0x44, 0x29, 0x28,
154 0x2A, 0x28, 0x11, 0x13, 0x05, 0x07,
155 0x05, 0x07, 0x05, 0x07, 0x05, 0x07,
156 0xE5, 0xE7, 0xE5, 0x07, 0x05, 0x07,
157 0x05, 0x07, 0x05, 0x07, 0x05, 0x07,
158 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7,
159 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07,
160 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7,
161 0xE5, 0xE7, 0xE5, 0xC7, 0x85, 0x07,
162 0x85, 0xC7, 0xE5, 0xE7, 0xE5, 0xE7,
163 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x07,
164 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0xE7,
165 0xE5, 0xE7, 0xE5, 0xE7, 0xE5, 0x00,
166 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
167 0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC,
168 0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00,
169 0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E,
170 0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00,
171 0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B,
172 0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00,
173 0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE,
174 0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00,
175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
176 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
177 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
178 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
179 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF,
180 0xFF, 0xFF, 0xE3, 0xC1, 0xC1, 0x00,
181 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
182 0x00, 0xFF, 0x00, 0x00, 0x80, 0x00,
183 0x1C, 0x3E, 0x7F, 0xFF, 0xFF, 0xFF,
184 0xFF, 0xFF, 0xFF, 0xFF, 0x22, 0x22,
185 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,
186 0x22, 0x22, 0x22, 0x14, 0x14, 0x14,
187 0x14, 0x14, 0x08, 0x08, 0x00, 0x00,
188 0xFF, 0xFF, 0xFF, 0x80, 0x80, 0x80,
189 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
190 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xBE,
191 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
192 0xFF, 0xFF, 0xFF, 0xFF, 0x81, 0xBD,
193 0x81, 0xFF, 0xFF, 0xFF, 0xFF, 0x00,
194 0x8F, 0x9F, 0x9C, 0x9C, 0x9C, 0x9C,
195 0x9C, 0x9C, 0x9C, 0xFC, 0xF8, 0x00,
196 0xFF, 0xFF, 0xFF, 0x9C, 0x9C, 0x9C,
197 0x9C, 0x9C, 0x9C, 0x80, 0x80, 0x00,
198 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
199 0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F,
200 0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00,
201 0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F,
202 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00,
203 0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20,
204 0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00,
205 0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F,
206 0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00,
207 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
208 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
209 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
210 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
211 0x00, 0x00, 0x01, 0x03, 0x07, 0x0F,
212 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00,
213 0x1F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F,
214 0x20, 0x47, 0x48, 0x50, 0x40, 0x41,
215 0x42, 0x24, 0x30, 0x3F, 0x3F, 0x3F,
216 0x3F, 0x3F, 0x3F, 0x3F, 0x31, 0x31,
217 0x11, 0x51, 0x11, 0x11, 0x4A, 0x0A,
218 0x2A, 0x0A, 0x44, 0x64, 0x50, 0x70,
219 0x50, 0x70, 0x50, 0x70, 0x50, 0x70,
220 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
221 0x53, 0x73, 0x53, 0x73, 0x53, 0x70,
222 0x50, 0x71, 0x53, 0x73, 0x53, 0x73,
223 0x53, 0x73, 0x53, 0x71, 0x50, 0x70,
224 0x50, 0x71, 0x53, 0x73, 0x53, 0x73,
225 0x53, 0x73, 0x53, 0x71, 0x50, 0x70,
226 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
227 0x53, 0x73, 0x53, 0x73, 0x51, 0x70,
228 0x53, 0x73, 0x53, 0x73, 0x53, 0x73,
229 0x53, 0x73, 0x53, 0x73, 0x53, 0x00,
230 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
231 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
232 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
233 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
235 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
236 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
237 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
238 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
239 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
240 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
241 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
242};
243#endif // FONT5X7_H
diff --git a/keyboards/crkbd/keymaps/kidbrazil/keymap.c b/keyboards/crkbd/keymaps/kidbrazil/keymap.c
new file mode 100644
index 000000000..1086cce3a
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/keymap.c
@@ -0,0 +1,214 @@
1#include QMK_KEYBOARD_H
2
3// [Init Variables] ----------------------------------------------------------//
4extern uint8_t is_master;
5// Oled timer similar to Drashna's
6static uint32_t oled_timer = 0;
7// Boolean to store
8bool eeprom_oled_enabled = false;
9
10// [CRKBD layers Init] -------------------------------------------------------//
11enum crkbd_layers {
12 _QWERTY,
13 _NUM,
14 _SYM,
15 _GAME,
16 _WEAPON
17};
18
19// [Keymaps] -----------------------------------------------------------------//
20const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
21 [_QWERTY] = LAYOUT(
22 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
23 LSFT_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
24 KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
25 LGUI_T(KC_PGUP), MO(_NUM), KC_SPC, KC_ENT, MO(_SYM), LALT_T(KC_PGDN)
26 ),
27
28 [_NUM] = LAYOUT(
29 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL,
30 LSFT_T(KC_TAB), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_F12, KC_NO,
31 KC_LCTL, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_PGUP, KC_PGDN, KC_HOME, KC_END, KC_F11, KC_NO,
32 LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
33 ),
34
35 [_SYM] = LAYOUT(
36 KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
37 LSFT_T(KC_TAB), RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,
38 KC_LCTL, RGB_VAD, RGB_RMOD, RGB_HUD, RGB_SAD, TG(_GAME), KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,
39 LGUI_T(KC_PGUP), KC_TRNS, KC_SPC, KC_ENT, KC_TRNS, LALT_T(KC_PGDN)
40 ),
41
42 [_GAME] = LAYOUT(
43 KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
44 KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, KC_NO,
45 KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_TRNS, KC_PGUP, KC_PGDN, KC_NO, KC_NO, KC_NO, KC_NO,
46 KC_TAB, MO(_WEAPON), KC_SPC, KC_ENT, KC_TRNS, KC_NO
47 ),
48
49 [_WEAPON] = LAYOUT(
50 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
51 KC_TRNS, KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
52 KC_TRNS, KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_7, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
53 KC_TRNS, KC_TAB, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS
54 )
55};
56
57//int RGB_current_mode;
58
59// [Process User Input] ------------------------------------------------------//
60bool process_record_user(uint16_t keycode, keyrecord_t *record) {
61 // Use process_record_keymap to reset timer on keypress
62 if (record->event.pressed) {
63 #ifdef OLED_DRIVER_ENABLE
64 oled_timer = timer_read32();
65 #endif
66 // Restore LEDs if they are enabled in eeprom
67 rgb_matrix_enable_noeeprom();
68 }
69 return true;
70}
71
72// [OLED Configuration] ------------------------------------------------------//
73#ifdef OLED_DRIVER_ENABLE
74
75// Init Oled and Rotate....
76oled_rotation_t oled_init_user(oled_rotation_t rotation) {
77 if (!has_usb())
78 return OLED_ROTATION_180; // flips the display 180 to see it from my side
79 return rotation;
80}
81
82// Read logo from font file
83const char *read_logo(void);
84
85// {OLED helpers} -----------------------------------------------//
86
87// Render Blank Space
88void render_space(void) {
89 oled_write_ln_P(PSTR(" "), false);
90}
91
92// Render separator lines for oled display
93void render_separator(void) {
94 switch (get_highest_layer(layer_state)){
95 case _GAME:
96 case _WEAPON:
97 oled_write_ln_P(PSTR("===================="), false);
98 break;
99 default:
100 oled_write_ln_P(PSTR("++++++++++++++++++++"), false);
101 }
102}
103
104// Render current layer state
105void render_layer_state(void){
106 // If you want to change the display of OLED, you need to change here
107 switch (get_highest_layer(layer_state)){
108 case _QWERTY:
109 oled_write_ln_P(PSTR("| MODE | QWRTY ]"), false);
110 break;
111 case _NUM:
112 oled_write_ln_P(PSTR("| MODE | NUMBERS ]"), false);
113 break;
114 case _SYM:
115 oled_write_ln_P(PSTR("| MODE | SYMBOLS ]"), false);
116 break;
117 case _GAME:
118 oled_write_ln_P(PSTR("| G A M E ]"), false);
119 break;
120 case _WEAPON:
121 oled_write_ln_P(PSTR("| W E A P O N ]"), false);
122 break;
123 default:
124 oled_write_ln_P(PSTR("| MODE | UNDEF ]"), false);
125 }
126}
127
128// Render USB State
129void render_usb_state(void) {
130 switch (USB_DeviceState) {
131 case DEVICE_STATE_Unattached:
132 oled_write_ln_P(PSTR("| USB | FREE ]"), false);
133 break;
134 case DEVICE_STATE_Suspended:
135 oled_write_ln_P(PSTR("| USB | SLEEP ]"), false);
136 break;
137 case DEVICE_STATE_Configured:
138 oled_write_ln_P(PSTR("| USB | READY ]"), false);
139 break;
140 case DEVICE_STATE_Powered:
141 oled_write_ln_P(PSTR("| USB | PWRD ]"), false);
142 break;
143 case DEVICE_STATE_Default:
144 oled_write_ln_P(PSTR("| USB | DFLT ]"), false);
145 break;
146 case DEVICE_STATE_Addressed:
147 oled_write_ln_P(PSTR("| USB | ADDRS ]"), false);
148 break;
149 default:
150 oled_write_ln_P(PSTR("| USB | INVALID ]"), false);
151 }
152}
153
154// Render Logo
155void render_logo(void) {
156 oled_write(read_logo(), false);
157}
158
159// Master OLED Screen (Left Hand )
160void render_master_oled(void) {
161 // Switch display based on Layer
162 switch (get_highest_layer(layer_state)){
163 case _GAME:
164 render_separator();
165 render_layer_state();
166 render_separator();
167 render_separator();
168 break;
169 case _WEAPON:
170 render_separator();
171 render_separator();
172 render_layer_state();
173 render_separator();
174 break;
175 default:
176 render_separator();
177 render_layer_state();
178 render_separator();
179 render_usb_state();
180 }
181}
182
183// lave OLED scren (Right Hand)
184void render_slave_oled(void) {
185 render_logo();
186}
187
188// {OLED Task} -----------------------------------------------//
189void oled_task_user(void) {
190 // Drashna style timeout for LED and OLED Roughly 8mins
191 if (timer_elapsed32(oled_timer) > 480000) {
192 oled_off();
193 rgb_matrix_disable_noeeprom();
194 return;
195 }
196 else {
197 oled_on();
198 }
199 // Show logo when USB dormant
200 switch (USB_DeviceState) {
201 case DEVICE_STATE_Unattached:
202 case DEVICE_STATE_Powered:
203 case DEVICE_STATE_Suspended:
204 render_logo();
205 break;
206 default:
207 if (is_master) {
208 render_master_oled();
209 } else {
210 render_slave_oled();
211 }
212 }
213}
214#endif
diff --git a/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json b/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json
new file mode 100644
index 000000000..dd9895cce
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/kidbrazil.json
@@ -0,0 +1 @@
{"keyboard":"crkbd/rev1","keymap":"kidbrazil","layout":"LAYOUT","layers":[["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_BSPC","LCTL_T(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_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_RSFT","LGUI_T(KC_PGUP)","MO(1)","KC_SPC","KC_ENT","MO(2)","LALT_T(KC_PGDN)"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_DEL","LCTL_T(KC_TAB)","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_LEFT","KC_UP","KC_DOWN","KC_RGHT","KC_F12","KC_NO","KC_LSFT","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_PGUP","KC_PGDN","KC_HOME","KC_END","KC_F11","KC_NO","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_BSPC","LCTL_T(KC_TAB)","RGB_TOG","RGB_MOD","RGB_HUI","RGB_SAI","RGB_VAI","KC_MINS","KC_EQL","KC_LCBR","KC_RCBR","KC_PIPE","KC_GRV","KC_LSFT","RGB_VAD","RGB_RMOD","RGB_HUD","RGB_SAD","TG(3)","KC_UNDS","KC_PLUS","KC_LBRC","KC_RBRC","KC_BSLS","KC_TILD","LGUI_T(KC_PGUP)","KC_TRNS","KC_SPC","KC_ENT","KC_TRNS","LALT_T(KC_PGDN)"],["KC_ESC","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_G","KC_F7","KC_F8","KC_F9","KC_F10","KC_NO","KC_NO","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_TRNS","KC_PGUP","KC_PGDN","KC_NO","KC_NO","KC_NO","KC_NO","KC_TAB","MO(4)","KC_SPC","KC_ENT","KC_TRNS","KC_NO"],["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LSFT","KC_A","KC_S","KC_D","KC_F","KC_6","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_LCTL","KC_Z","KC_X","KC_C","KC_V","KC_7","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TRNS","KC_TAB","KC_TRNS","KC_SPC","KC_TRNS","KC_TRNS","KC_TRNS"]],"author":"","notes":""} \ No newline at end of file
diff --git a/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c b/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c
new file mode 100644
index 000000000..1bc1503a6
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/logo_reader.c
@@ -0,0 +1,11 @@
1#include "crkbd.h"
2
3const char *read_logo(void) {
4 static char logo[] = {
5 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
6 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
7 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
8 0};
9
10 return logo;
11}
diff --git a/keyboards/crkbd/keymaps/kidbrazil/rules.mk b/keyboards/crkbd/keymaps/kidbrazil/rules.mk
new file mode 100644
index 000000000..ad03b86bf
--- /dev/null
+++ b/keyboards/crkbd/keymaps/kidbrazil/rules.mk
@@ -0,0 +1,17 @@
1CONSOLE_ENABLE = no # Console for debug
2COMMAND_ENABLE = no # Commands for debug and configuration
3MIDI_ENABLE = no # MIDI controls
4AUDIO_ENABLE = no # Audio output on port C6
5MOUSEKEY_ENABLE = no
6RGBLIGHT_ENABLE = no
7RGB_MATRIX_ENABLE = WS2812
8OLED_DRIVER_ENABLE = yes
9
10# If you want to change the display of OLED, you need to change here
11SRC += ./keyboards/crkbd/keymaps/kidbrazil/logo_reader.c \
12 #./lib/rgb_state_reader.c \
13 #./lib/logo_reader.c \
14 #./lib/keylogger.c \
15 # ./lib/mode_icon_reader.c \
16 # ./lib/host_led_state_reader.c \
17 # ./lib/timelogger.c \