diff options
Diffstat (limited to 'keyboards/draculad')
-rw-r--r-- | keyboards/draculad/config.h | 69 | ||||
-rw-r--r-- | keyboards/draculad/draculad.c | 18 | ||||
-rw-r--r-- | keyboards/draculad/draculad.h | 40 | ||||
-rw-r--r-- | keyboards/draculad/info.json | 57 | ||||
-rw-r--r-- | keyboards/draculad/keymaps/default/keymap.c | 228 | ||||
-rw-r--r-- | keyboards/draculad/keymaps/pimoroni/config.h | 27 | ||||
-rw-r--r-- | keyboards/draculad/keymaps/pimoroni/keymap.c | 335 | ||||
-rw-r--r-- | keyboards/draculad/keymaps/pimoroni/rules.mk | 6 | ||||
-rw-r--r-- | keyboards/draculad/readme.md | 31 | ||||
-rw-r--r-- | keyboards/draculad/rules.mk | 24 |
10 files changed, 835 insertions, 0 deletions
diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h new file mode 100644 index 000000000..abcdc76b4 --- /dev/null +++ b/keyboards/draculad/config.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /* | ||
2 | Copyright 2021 @mangoiv | ||
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 | #define VENDOR_ID 0xFEED | ||
23 | #define PRODUCT_ID 0x1B1E | ||
24 | #define DEVICE_VER 0x0001 | ||
25 | #define MANUFACTURER mangoiv | ||
26 | #define PRODUCT draculad | ||
27 | |||
28 | #define MATRIX_ROWS 8 | ||
29 | #define MATRIX_COLS 5 | ||
30 | |||
31 | #define MATRIX_ROW_PINS {D4, C6, D7, E6} | ||
32 | #define MATRIX_COL_PINS {F4, F5,F6, F7, B1} | ||
33 | |||
34 | #define DIODE_DIRECTION COL2ROW | ||
35 | |||
36 | #define DEBOUNCE 5 | ||
37 | |||
38 | |||
39 | #define USE_SERIAL | ||
40 | #define SOFT_SERIAL_PIN D2 | ||
41 | |||
42 | #ifdef OLED_ENABLE | ||
43 | #define OLED_DISPLAY_128X64 | ||
44 | #define OLED_TIMEOUT 30000 | ||
45 | #endif | ||
46 | |||
47 | #define RGB_DI_PIN D3 | ||
48 | #ifdef RGB_DI_PIN | ||
49 | #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
50 | #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
51 | #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
52 | #define RGBLIGHT_EFFECT_BREATHING | ||
53 | #define RGBLED_NUM 10 | ||
54 | #define RGBLIGHT_SPLIT | ||
55 | #define RGBLIGHT_HUE_STEP 8 | ||
56 | #define RGBLIGHT_SAT_STEP 8 | ||
57 | #define RGBLIGHT_VAL_STEP 8 | ||
58 | #define RGBLIGHT_SLEEP | ||
59 | #endif | ||
60 | |||
61 | #define ENCODERS_PAD_A {B2 , B4} | ||
62 | #define ENCODERS_PAD_B {B6 , B5} | ||
63 | |||
64 | #define ENCODER_RESOLUTIONS { 4, 4, 4, 1} | ||
65 | #define UNUSED_PINS | ||
66 | |||
67 | #define EE_HANDS | ||
68 | |||
69 | #define LAYER_STATE_8BIT | ||
diff --git a/keyboards/draculad/draculad.c b/keyboards/draculad/draculad.c new file mode 100644 index 000000000..04a83ef2e --- /dev/null +++ b/keyboards/draculad/draculad.c | |||
@@ -0,0 +1,18 @@ | |||
1 | /* | ||
2 | Copyright 2021 @mangoiv | ||
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 "draculad.h" \ No newline at end of file | ||
diff --git a/keyboards/draculad/draculad.h b/keyboards/draculad/draculad.h new file mode 100644 index 000000000..b98bb0d2c --- /dev/null +++ b/keyboards/draculad/draculad.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | Copyright 2021 @mangoiv | ||
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 "quantum.h" | ||
21 | |||
22 | #define XXX KC_NO | ||
23 | |||
24 | #define LAYOUT( \ | ||
25 | L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | ||
26 | L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | ||
27 | L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ | ||
28 | L30, R33, \ | ||
29 | L31, L32, L33, R30, R31, R32 \ | ||
30 | ) \ | ||
31 | { \ | ||
32 | { L00, L01, L02, L03, L04 }, \ | ||
33 | { L10, L11, L12, L13, L14 }, \ | ||
34 | { L20, L21, L22, L23, L24 }, \ | ||
35 | { XXX, L30, L31, L32, L33 }, \ | ||
36 | { R04, R03, R02, R01, R00 }, \ | ||
37 | { R14, R13, R12, R11, R10 }, \ | ||
38 | { R24, R23, R22, R21, R20 }, \ | ||
39 | { XXX, R33, R32, R31, R30 } \ | ||
40 | } | ||
diff --git a/keyboards/draculad/info.json b/keyboards/draculad/info.json new file mode 100644 index 000000000..351ebb58f --- /dev/null +++ b/keyboards/draculad/info.json | |||
@@ -0,0 +1,57 @@ | |||
1 | { | ||
2 | "keyboard_name": "DracuLad", | ||
3 | "url": "", | ||
4 | "maintainer": "MangoIV", | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
7 | "layout": [ | ||
8 | {"label":"L00", "x":0, "y":1}, | ||
9 | {"label":"L01", "x":1, "y":0.35}, | ||
10 | {"label":"L02", "x":2, "y":0}, | ||
11 | {"label":"L03", "x":3, "y":0.35}, | ||
12 | {"label":"L04", "x":4, "y":0.5}, | ||
13 | |||
14 | {"label":"R00", "x":8, "y":0.5}, | ||
15 | {"label":"R01", "x":9, "y":0.35}, | ||
16 | {"label":"R02", "x":10, "y":0}, | ||
17 | {"label":"R03", "x":11, "y":0.35}, | ||
18 | {"label":"R04", "x":12, "y":1}, | ||
19 | |||
20 | {"label":"L10", "x":0, "y":2}, | ||
21 | {"label":"L11", "x":1, "y":1.35}, | ||
22 | {"label":"L12", "x":2, "y":1}, | ||
23 | {"label":"L13", "x":3, "y":1.35}, | ||
24 | {"label":"L14", "x":4, "y":1.5}, | ||
25 | |||
26 | {"label":"R10", "x":8, "y":1.5}, | ||
27 | {"label":"R11", "x":9, "y":1.35}, | ||
28 | {"label":"R12", "x":10, "y":1}, | ||
29 | {"label":"R13", "x":11, "y":1.35}, | ||
30 | {"label":"R14", "x":12, "y":2}, | ||
31 | |||
32 | {"label":"L20", "x":0, "y":3}, | ||
33 | {"label":"L21", "x":1, "y":2.35}, | ||
34 | {"label":"L22", "x":2, "y":2}, | ||
35 | {"label":"L23", "x":3, "y":2.35}, | ||
36 | {"label":"L24", "x":4, "y":2.5}, | ||
37 | |||
38 | {"label":"R20", "x":8, "y":2.5}, | ||
39 | {"label":"R21", "x":9, "y":2.35}, | ||
40 | {"label":"R22", "x":10, "y":2}, | ||
41 | {"label":"R23", "x":11, "y":2.35}, | ||
42 | {"label":"R24", "x":12, "y":3}, | ||
43 | |||
44 | {"label":"L30", "x":4.25, "y":3.5}, | ||
45 | {"label":"R33", "x":7.75, "y":3.5}, | ||
46 | |||
47 | {"label":"L31", "x":3, "y":4.5}, | ||
48 | {"label":"L32", "x":4, "y":4.5}, | ||
49 | {"label":"L33", "x":5, "y":4.5}, | ||
50 | |||
51 | {"label":"R30", "x":7, "y":4.5}, | ||
52 | {"label":"R31", "x":8, "y":4.5}, | ||
53 | {"label":"R32", "x":9, "y":4.5} | ||
54 | ] | ||
55 | } | ||
56 | } | ||
57 | } | ||
diff --git a/keyboards/draculad/keymaps/default/keymap.c b/keyboards/draculad/keymaps/default/keymap.c new file mode 100644 index 000000000..a352359d1 --- /dev/null +++ b/keyboards/draculad/keymaps/default/keymap.c | |||
@@ -0,0 +1,228 @@ | |||
1 | /* | ||
2 | Copyright 2021 @mangoiv | ||
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 | enum layer_number { | ||
21 | _BASE, | ||
22 | _NUM, | ||
23 | _SYMB, | ||
24 | _MUS, | ||
25 | _ADJ | ||
26 | }; | ||
27 | |||
28 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
29 | [_BASE] = LAYOUT( | ||
30 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
31 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, | ||
32 | LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), | ||
33 | KC_MUTE, TG(_ADJ), | ||
34 | KC_LCTL, LALT_T(KC_BSPC), LT(_MUS,KC_SPC), LT(_NUM,KC_DEL), LT(_SYMB,KC_ENT), KC_CAPS | ||
35 | ), | ||
36 | [_NUM] = LAYOUT( | ||
37 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
38 | KC_TAB, XXXXXXX, KC_VOLD, KC_VOLU, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, | ||
39 | KC_LSFT, XXXXXXX, XXXXXXX, KC_MUTE, RESET, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT, | ||
40 | XXXXXXX, KC_NO, | ||
41 | XXXXXXX, KC_LALT, XXXXXXX, _______, KC_ENT, KC_NO | ||
42 | ), | ||
43 | [_SYMB] = LAYOUT( | ||
44 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, KC_EQL, KC_MINS, | ||
45 | XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, XXXXXXX, KC_GRV, KC_BSLS, | ||
46 | KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, | ||
47 | XXXXXXX, KC_NO, | ||
48 | KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_NO | ||
49 | ), | ||
50 | [_MUS] = LAYOUT( | ||
51 | KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
52 | KC_LALT, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
53 | KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
54 | XXXXXXX, XXXXXXX, | ||
55 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
56 | ), | ||
57 | [_ADJ] = LAYOUT( | ||
58 | RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
59 | EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, | ||
60 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, | ||
61 | XXXXXXX, _______, | ||
62 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
63 | ) | ||
64 | }; | ||
65 | |||
66 | #ifdef OLED_ENABLE | ||
67 | |||
68 | |||
69 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
70 | |||
71 | if (is_keyboard_master()) { | ||
72 | if(is_keyboard_left()){ | ||
73 | return OLED_ROTATION_270; | ||
74 | } | ||
75 | else { | ||
76 | return OLED_ROTATION_90; | ||
77 | } | ||
78 | } else { | ||
79 | return OLED_ROTATION_0; | ||
80 | } | ||
81 | } | ||
82 | static void render_logo(void) { | ||
83 | static const char PROGMEM drac_logo[] = { | ||
84 | // drac_logo, 128x64px | ||
85 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
86 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
87 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
88 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
89 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
90 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
91 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
92 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
93 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
94 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, | ||
96 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
97 | 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00, | ||
98 | 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0, | ||
99 | 0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00, | ||
100 | 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, | ||
102 | 0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, | ||
103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff, | ||
104 | 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
105 | 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00, | ||
106 | 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff, | ||
107 | 0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00, | ||
108 | 0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
109 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, | ||
110 | 0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc, | ||
111 | 0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, | ||
112 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
113 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
114 | 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, | ||
115 | 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, | ||
116 | 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
117 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, | ||
118 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, | ||
119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff, | ||
120 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
121 | 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60, | ||
122 | 0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0, | ||
123 | 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
124 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, | ||
126 | 0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, | ||
127 | 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
128 | 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
129 | 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08, | ||
130 | 0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80, | ||
131 | 0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
132 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
133 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
134 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, | ||
135 | 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, | ||
136 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, | ||
137 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, | ||
138 | 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, | ||
139 | 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
140 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
141 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
145 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
147 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
148 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
149 | }; | ||
150 | oled_write_raw_P(drac_logo, sizeof(drac_logo)); | ||
151 | } | ||
152 | |||
153 | static void render_status(void) { | ||
154 | oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false); | ||
155 | uint8_t n = get_current_wpm(); | ||
156 | char wpm_counter[4]; | ||
157 | wpm_counter[3] = '\0'; | ||
158 | wpm_counter[2] = '0' + n % 10; | ||
159 | wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
160 | wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; | ||
161 | oled_write_P(PSTR("WPM:"), false); | ||
162 | oled_write(wpm_counter, false); | ||
163 | led_t led_state = host_keyboard_led_state(); | ||
164 | oled_write_P(PSTR("\nCaps: "), false); | ||
165 | oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false); | ||
166 | oled_write_P(PSTR("\n"), false); | ||
167 | switch (get_highest_layer(layer_state)) { | ||
168 | case _BASE: | ||
169 | oled_write_P(PSTR("Base "), false); | ||
170 | break; | ||
171 | case _NUM: | ||
172 | oled_write_P(PSTR("Numbers"), false); | ||
173 | break; | ||
174 | case _SYMB: | ||
175 | oled_write_P(PSTR("Symbols"), false); | ||
176 | break; | ||
177 | case _ADJ: | ||
178 | oled_write_P(PSTR("Adjust "), false); | ||
179 | break; | ||
180 | case _MUS: | ||
181 | oled_write_P(PSTR("Mouse "), false); | ||
182 | break; | ||
183 | default: | ||
184 | oled_write_P(PSTR("Unkn "), false); | ||
185 | break; | ||
186 | } | ||
187 | } | ||
188 | |||
189 | bool oled_task_user(void) { | ||
190 | if (is_keyboard_master()) { | ||
191 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | ||
192 | } else { | ||
193 | render_logo(); | ||
194 | } | ||
195 | return false; | ||
196 | } | ||
197 | |||
198 | #endif | ||
199 | |||
200 | #ifdef ENCODER_ENABLE | ||
201 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
202 | if (index == 0) { | ||
203 | // Volume control | ||
204 | if (clockwise) { | ||
205 | tap_code(KC_VOLU); | ||
206 | } else { | ||
207 | tap_code(KC_VOLD); | ||
208 | } | ||
209 | } | ||
210 | else if (index == 2) { | ||
211 | if(clockwise) { | ||
212 | tap_code(KC_PGUP); | ||
213 | } | ||
214 | else{ | ||
215 | tap_code(KC_PGDN); | ||
216 | } | ||
217 | } | ||
218 | else if (index == 3 ) { | ||
219 | // Page up/Page down | ||
220 | if (clockwise) { | ||
221 | tap_code(KC_WH_U); | ||
222 | } else { | ||
223 | tap_code(KC_WH_D); | ||
224 | } | ||
225 | } | ||
226 | return true; | ||
227 | } | ||
228 | #endif | ||
diff --git a/keyboards/draculad/keymaps/pimoroni/config.h b/keyboards/draculad/keymaps/pimoroni/config.h new file mode 100644 index 000000000..378b9b892 --- /dev/null +++ b/keyboards/draculad/keymaps/pimoroni/config.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | Copyright 2021 @mangoiv | ||
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 | #define POINTING_DEVICE_ROTATION_90 | ||
19 | |||
20 | //comment that out if your trackball is on the left side | ||
21 | #define TRACKBALL_RIGHT | ||
22 | |||
23 | #ifdef TRACKBALL_RIGHT | ||
24 | #define POINTING_DEVICE_INVERT_X | ||
25 | #define POINTING_DEVICE_INVERT_Y | ||
26 | #endif | ||
27 | |||
diff --git a/keyboards/draculad/keymaps/pimoroni/keymap.c b/keyboards/draculad/keymaps/pimoroni/keymap.c new file mode 100644 index 000000000..5c20c69af --- /dev/null +++ b/keyboards/draculad/keymaps/pimoroni/keymap.c | |||
@@ -0,0 +1,335 @@ | |||
1 | /* | ||
2 | Copyright 2021 @mangoiv | ||
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 | |||
21 | enum layer_number { | ||
22 | _BASE, | ||
23 | _NUM, | ||
24 | _SYMB, | ||
25 | _MUS, | ||
26 | _ADJ | ||
27 | }; | ||
28 | |||
29 | enum custom_keycodes { | ||
30 | BALL_HUI = SAFE_RANGE, //cycles hue | ||
31 | BALL_WHT, //cycles white | ||
32 | BALL_DEC, //decreased color | ||
33 | BALL_SCR, //scrolls | ||
34 | BALL_NCL, //left click | ||
35 | BALL_RCL, //right click | ||
36 | BALL_MCL, //middle click | ||
37 | }; | ||
38 | |||
39 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
40 | [_BASE] = LAYOUT( | ||
41 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | ||
42 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, | ||
43 | LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), | ||
44 | KC_MUTE, TG(_ADJ), | ||
45 | KC_LCTL, LALT_T(KC_BSPC), LT(_MUS,KC_SPC), KC_NO, LT(_NUM,KC_ENT), LT(_SYMB,KC_DEL) | ||
46 | ), | ||
47 | [_NUM] = LAYOUT( | ||
48 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | ||
49 | KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, | ||
50 | KC_LSFT, XXXXXXX, KC_MPRV, KC_MNXT, RESET, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT, | ||
51 | XXXXXXX, KC_NO, | ||
52 | KC_LCTL, KC_LALT, XXXXXXX, KC_NO, _______, KC_ENT | ||
53 | ), | ||
54 | [_SYMB] = LAYOUT( | ||
55 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, KC_EQL, KC_MINS, | ||
56 | XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, XXXXXXX, KC_GRV, KC_BSLS, | ||
57 | KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, | ||
58 | XXXXXXX, KC_NO, | ||
59 | KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, _______ | ||
60 | ), | ||
61 | [_MUS] = LAYOUT( | ||
62 | KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
63 | KC_LALT, KC_BTN3, KC_BTN2, KC_BTN1, BALL_SCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
64 | KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
65 | XXXXXXX, XXXXXXX, | ||
66 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
67 | ), | ||
68 | [_ADJ] = LAYOUT( | ||
69 | RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BALL_HUI, BALL_WHT, BALL_DEC, XXXXXXX, XXXXXXX, | ||
70 | EEP_RST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, | ||
71 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, | ||
72 | XXXXXXX, _______, | ||
73 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
74 | ) | ||
75 | }; | ||
76 | |||
77 | |||
78 | #ifdef OLED_ENABLE | ||
79 | oled_rotation_t oled_init_user(oled_rotation_t rotation) { | ||
80 | |||
81 | if (is_keyboard_master()) { | ||
82 | if(is_keyboard_left()){ | ||
83 | return OLED_ROTATION_270; | ||
84 | } | ||
85 | else { | ||
86 | return OLED_ROTATION_90; | ||
87 | } | ||
88 | } else { | ||
89 | return OLED_ROTATION_0; | ||
90 | } | ||
91 | } | ||
92 | static void render_logo(void) { | ||
93 | static const char PROGMEM drac_logo[] = { | ||
94 | // drac_logo, 128x64px | ||
95 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
96 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
97 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
98 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, | ||
99 | 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
100 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
102 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
103 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
104 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
105 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0, | ||
106 | 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
107 | 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00, | ||
108 | 0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0, | ||
109 | 0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00, | ||
110 | 0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
111 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0, | ||
112 | 0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00, | ||
113 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff, | ||
114 | 0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
115 | 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00, | ||
116 | 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff, | ||
117 | 0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00, | ||
118 | 0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
119 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, | ||
120 | 0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc, | ||
121 | 0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff, | ||
122 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, | ||
123 | 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
124 | 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, | ||
125 | 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, | ||
126 | 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
127 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, | ||
128 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, | ||
129 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff, | ||
130 | 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
131 | 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60, | ||
132 | 0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0, | ||
133 | 0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
134 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
135 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, | ||
136 | 0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8, | ||
137 | 0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, | ||
138 | 0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, | ||
139 | 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08, | ||
140 | 0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80, | ||
141 | 0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
142 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
143 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
144 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, | ||
145 | 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01, | ||
146 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, | ||
147 | 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03, | ||
148 | 0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01, | ||
149 | 0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
150 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
151 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
152 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
153 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
154 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
155 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
156 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
157 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
158 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 | ||
159 | }; | ||
160 | oled_write_raw_P(drac_logo, sizeof(drac_logo)); | ||
161 | } | ||
162 | |||
163 | static void render_status(void) { | ||
164 | oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false); | ||
165 | uint8_t n = get_current_wpm(); | ||
166 | char wpm_counter[4]; | ||
167 | wpm_counter[3] = '\0'; | ||
168 | wpm_counter[2] = '0' + n % 10; | ||
169 | wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; | ||
170 | wpm_counter[0] = n / 10 ? '0' + n / 10 : ' '; | ||
171 | oled_write_P(PSTR("WPM:"), false); | ||
172 | oled_write(wpm_counter, false); | ||
173 | led_t led_state = host_keyboard_led_state(); | ||
174 | oled_write_P(PSTR("\nCaps: "), false); | ||
175 | oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false); | ||
176 | oled_write_P(PSTR("\n"), false); | ||
177 | switch (get_highest_layer(layer_state)) { | ||
178 | case _BASE: | ||
179 | oled_write_P(PSTR("Base "), false); | ||
180 | break; | ||
181 | case _NUM: | ||
182 | oled_write_P(PSTR("Numbers"), false); | ||
183 | break; | ||
184 | case _SYMB: | ||
185 | oled_write_P(PSTR("Symbols"), false); | ||
186 | break; | ||
187 | case _ADJ: | ||
188 | oled_write_P(PSTR("Adjust "), false); | ||
189 | break; | ||
190 | case _MUS: | ||
191 | oled_write_P(PSTR("Mouse "), false); | ||
192 | break; | ||
193 | default: | ||
194 | oled_write_P(PSTR("Unkn "), false); | ||
195 | break; | ||
196 | } | ||
197 | } | ||
198 | |||
199 | bool oled_task_user(void) { | ||
200 | if (is_keyboard_master()) { | ||
201 | render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc) | ||
202 | } else { | ||
203 | render_logo(); | ||
204 | } | ||
205 | return false; | ||
206 | } | ||
207 | |||
208 | #endif //OLED_ENABLE | ||
209 | |||
210 | uint8_t white = 0; | ||
211 | uint8_t red = 255; | ||
212 | uint8_t green = 0; | ||
213 | uint8_t blue = 0; | ||
214 | |||
215 | bool set_scrolling = false; | ||
216 | report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { | ||
217 | if (set_scrolling) { | ||
218 | mouse_report.h = mouse_report.x; | ||
219 | mouse_report.v = mouse_report.y; | ||
220 | mouse_report.x = mouse_report.y = 0; | ||
221 | } | ||
222 | return mouse_report; | ||
223 | } | ||
224 | |||
225 | void ball_increase_hue(void){ | ||
226 | if(red!=255&&green!=255&&blue!=255){ | ||
227 | red =255; | ||
228 | } | ||
229 | if (red==255&&green<255&&blue==0){ | ||
230 | green += 15; | ||
231 | } else if(green==255&&blue==0&&red>0){ | ||
232 | red-=15; | ||
233 | } else if(red==0&&blue<255&&green==255){ | ||
234 | blue+=15; | ||
235 | } else if(blue==255&&green>0&&red==0){ | ||
236 | green -= 15; | ||
237 | } else if(green == 0&&blue==255&&red<255){ | ||
238 | red +=15; | ||
239 | } else if(green ==0&&blue>0&&red==255){ | ||
240 | blue -=15; | ||
241 | } | ||
242 | pimoroni_trackball_set_rgbw(red,green,blue,white); | ||
243 | } | ||
244 | |||
245 | void decrease_color(void){ | ||
246 | if (green>0){ | ||
247 | green-=15; | ||
248 | } | ||
249 | if (red>0){ | ||
250 | red-=15; | ||
251 | } | ||
252 | if (blue>0){ | ||
253 | blue-=15; | ||
254 | } | ||
255 | pimoroni_trackball_set_rgbw(red,green,blue,white); | ||
256 | } | ||
257 | |||
258 | void cycle_white(void){ | ||
259 | if (white<255){ | ||
260 | white +=15; | ||
261 | } else{ | ||
262 | white=0; | ||
263 | } | ||
264 | pimoroni_trackball_set_rgbw(red,green,blue,white); | ||
265 | } | ||
266 | |||
267 | bool process_record_user(uint16_t keycode, keyrecord_t *record){ | ||
268 | switch (keycode){ | ||
269 | case BALL_HUI: | ||
270 | if(record->event.pressed){ | ||
271 | ball_increase_hue(); | ||
272 | } | ||
273 | break; | ||
274 | |||
275 | case BALL_WHT: | ||
276 | if(record-> event.pressed){ | ||
277 | cycle_white(); | ||
278 | } | ||
279 | break; | ||
280 | |||
281 | case BALL_DEC: | ||
282 | if(record-> event.pressed){ | ||
283 | decrease_color(); | ||
284 | } | ||
285 | break; | ||
286 | |||
287 | case BALL_SCR: | ||
288 | if(record->event.pressed){ | ||
289 | set_scrolling = true; | ||
290 | } else{ | ||
291 | set_scrolling = false; | ||
292 | } | ||
293 | break; | ||
294 | |||
295 | case BALL_NCL: | ||
296 | record->event.pressed?register_code(KC_BTN1):unregister_code(KC_BTN1); | ||
297 | break; | ||
298 | case BALL_RCL: | ||
299 | record->event.pressed?register_code(KC_BTN2):unregister_code(KC_BTN2); | ||
300 | break; | ||
301 | case BALL_MCL: | ||
302 | record->event.pressed?register_code(KC_BTN3):unregister_code(KC_BTN3); | ||
303 | break; | ||
304 | } | ||
305 | return true; | ||
306 | } | ||
307 | |||
308 | #ifdef ENCODER_ENABLE | ||
309 | bool encoder_update_user(uint8_t index, bool clockwise) { | ||
310 | if (index == 0) { | ||
311 | // Volume control | ||
312 | if (clockwise) { | ||
313 | tap_code(KC_VOLU); | ||
314 | } else { | ||
315 | tap_code(KC_VOLD); | ||
316 | } | ||
317 | } | ||
318 | else if (index == 2) { | ||
319 | switch (get_highest_layer(layer_state)) { | ||
320 | case _ADJ: | ||
321 | clockwise?ball_increase_hue():cycle_white(); | ||
322 | break; | ||
323 | case _MUS: | ||
324 | clockwise?tap_code(KC_WH_U):tap_code(KC_WH_D); | ||
325 | break; | ||
326 | default: | ||
327 | clockwise?tap_code(KC_PGUP):tap_code(KC_PGDN); | ||
328 | break; | ||
329 | } | ||
330 | } | ||
331 | // I only have 2 encoders on the the pimoroni example board, just add else ifs for your other encoders... | ||
332 | // the missing ones are encoder 1 on the right side and encoder 3 on the left side | ||
333 | return true; | ||
334 | } | ||
335 | #endif // ENCODER_ENABLE | ||
diff --git a/keyboards/draculad/keymaps/pimoroni/rules.mk b/keyboards/draculad/keymaps/pimoroni/rules.mk new file mode 100644 index 000000000..66d3bf0e4 --- /dev/null +++ b/keyboards/draculad/keymaps/pimoroni/rules.mk | |||
@@ -0,0 +1,6 @@ | |||
1 | # only uncomment on the side you have your trackball on | ||
2 | POINTING_DEVICE_ENABLE = yes | ||
3 | POINTING_DEVICE_DRIVER = pimoroni_trackball | ||
4 | OLED_ENABLE = yes | ||
5 | OLED_DRIVER = SSD1306 | ||
6 | MOUSEKEY_ENABLE = yes | ||
diff --git a/keyboards/draculad/readme.md b/keyboards/draculad/readme.md new file mode 100644 index 000000000..585d6cb5f --- /dev/null +++ b/keyboards/draculad/readme.md | |||
@@ -0,0 +1,31 @@ | |||
1 | # DracuLad | ||
2 | |||
3 |  | ||
4 | |||
5 | *A 34-36 key split keyboard* | ||
6 | - 36 keys, two of them can be replaced by rotary encoders making it support 34-36 keys and 2-4 encoders. | ||
7 | - bright RGB Underglow with WS2812B LEDs | ||
8 | - one SSD1306 OLED per side | ||
9 | - aggressive pinky stagger similar to the Kyria but with an alternative thumb cluster to raise comfort for large hands | ||
10 | - support for MX and Choc switches | ||
11 | |||
12 | * Keyboard Maintainer: [MangoIV](https://github.com/MangoIV) | ||
13 | * Hardware Supported: [DracuLad PCBs and cases](https://github.com/MangoIV/dracuLad), [the Pimoroni trackball](https://shop.pimoroni.com/products/trackball-breakout) | ||
14 | * Hardware Availability: [MangoIV's GitHub](https://github.com/MangoIV/dracuLad) | ||
15 | |||
16 | Make example for this keyboard (after setting up your build env): | ||
17 | |||
18 | make draculad:default | ||
19 | |||
20 | or for the version using the Pimoroni trackball: | ||
21 | |||
22 | make draculad:pimoroni | ||
23 | |||
24 | Flashing example for DFU and Caterina respectively (replace `default` with the name of your keymap): | ||
25 | |||
26 | make draculad:default:dfu | ||
27 | make draculad:default:flash | ||
28 | |||
29 | When flashing the first time using handedness by EEPROM, use the [QMK guide for that topic](https://docs.qmk.fm/#/feature_split_keyboard?id=handedness-by-eeprom). | ||
30 | |||
31 | 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/draculad/rules.mk b/keyboards/draculad/rules.mk new file mode 100644 index 000000000..d3b69705a --- /dev/null +++ b/keyboards/draculad/rules.mk | |||
@@ -0,0 +1,24 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = caterina | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # 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 = yes # 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 | ||
19 | SPLIT_KEYBOARD = yes | ||
20 | OLED_ENABLE = yes | ||
21 | OLED_DRIVER = SSD1306 | ||
22 | WPM_ENABLE = yes | ||
23 | ENCODER_ENABLE = yes | ||
24 | LTO_ENABLE = yes | ||