aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/40percentclub/nano/keymaps/drashna/keymap.c16
-rw-r--r--keyboards/c39/keymaps/drashna/config.h16
-rwxr-xr-xkeyboards/c39/keymaps/drashna/keymap.c16
-rw-r--r--keyboards/gergo/keymaps/drashna/keymap.c16
-rw-r--r--keyboards/keebio/iris/keymaps/drashna/config.h31
-rw-r--r--keyboards/keebio/iris/keymaps/drashna/keymap.c16
-rw-r--r--keyboards/keebio/iris/keymaps/drashna_lp/config.h31
-rw-r--r--keyboards/keebio/iris/keymaps/drashna_old/config.h31
-rw-r--r--keyboards/keebio/viterbi/keymaps/drashna/config.h31
-rw-r--r--keyboards/keebio/viterbi/keymaps/drashna/keymap.c16
-rw-r--r--keyboards/kyria/keymaps/drashna/config.h2
-rw-r--r--keyboards/kyria/keymaps/drashna/keymap.c16
-rw-r--r--keyboards/launchpad/keymaps/drashna/config.h31
-rw-r--r--keyboards/launchpad/keymaps/drashna/keymap.c107
-rw-r--r--keyboards/launchpad/keymaps/drashna/rules.mk6
-rw-r--r--keyboards/moonlander/keymaps/drashna/config.h5
-rw-r--r--keyboards/moonlander/keymaps/drashna/keymap.c4
-rw-r--r--layouts/community/ergodox/drashna/config.h21
-rw-r--r--layouts/community/ergodox/drashna/keymap.c122
-rw-r--r--layouts/community/numpad_5x6/drashna/config.h16
-rw-r--r--layouts/community/numpad_5x6/drashna/keymap.c16
-rw-r--r--layouts/community/ortho_4x12/drashna/config.h16
-rw-r--r--layouts/community/ortho_4x12/drashna/keymap.c16
-rw-r--r--layouts/community/ortho_5x12/drashna/config.h16
-rw-r--r--layouts/community/ortho_5x12/drashna/keymap.c16
-rw-r--r--layouts/community/split_3x6_3/drashna/config.h (renamed from keyboards/crkbd/keymaps/drashna/config.h)36
-rw-r--r--layouts/community/split_3x6_3/drashna/glcdfont.c (renamed from keyboards/crkbd/keymaps/drashna/glcdfont.c)0
-rw-r--r--layouts/community/split_3x6_3/drashna/keymap.c (renamed from keyboards/crkbd/keymaps/drashna/keymap.c)46
-rw-r--r--layouts/community/split_3x6_3/drashna/rules.mk (renamed from keyboards/crkbd/keymaps/drashna/rules.mk)11
-rw-r--r--users/drashna/config.h28
-rw-r--r--users/drashna/drashna.c31
-rw-r--r--users/drashna/drashna.h31
-rw-r--r--users/drashna/oled_stuff.c16
-rw-r--r--users/drashna/oled_stuff.h16
-rw-r--r--users/drashna/pimoroni_trackball.c57
-rw-r--r--users/drashna/pimoroni_trackball.h17
-rw-r--r--users/drashna/process_records.c379
-rw-r--r--users/drashna/process_records.h16
-rw-r--r--users/drashna/rgb_matrix_stuff.c18
-rw-r--r--users/drashna/rgb_matrix_stuff.h16
-rw-r--r--users/drashna/rgb_stuff.c74
-rw-r--r--users/drashna/rgb_stuff.h16
-rw-r--r--users/drashna/rgblight_breathe_table.h16
-rw-r--r--users/drashna/tap_dances.c16
-rw-r--r--users/drashna/tap_dances.h16
-rw-r--r--users/drashna/template.c16
-rw-r--r--users/drashna/template.h16
-rw-r--r--users/drashna/wrappers.h17
48 files changed, 1034 insertions, 501 deletions
diff --git a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
index f5d0787ee..b8947cce7 100644
--- a/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
+++ b/keyboards/40percentclub/nano/keymaps/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2#include "analog.h" 18#include "analog.h"
3#include "pointing_device.h" 19#include "pointing_device.h"
diff --git a/keyboards/c39/keymaps/drashna/config.h b/keyboards/c39/keymaps/drashna/config.h
index 789b7cc14..73b0b8acf 100644
--- a/keyboards/c39/keymaps/drashna/config.h
+++ b/keyboards/c39/keymaps/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3// place overrides here 19// place overrides here
diff --git a/keyboards/c39/keymaps/drashna/keymap.c b/keyboards/c39/keymaps/drashna/keymap.c
index 882938138..3fd3ef35e 100755
--- a/keyboards/c39/keymaps/drashna/keymap.c
+++ b/keyboards/c39/keymaps/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3/* 19/*
diff --git a/keyboards/gergo/keymaps/drashna/keymap.c b/keyboards/gergo/keymaps/drashna/keymap.c
index d1e622406..7258d350d 100644
--- a/keyboards/gergo/keymaps/drashna/keymap.c
+++ b/keyboards/gergo/keymaps/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3/* 19/*
diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h
index 49381b60a..63f87b7c4 100644
--- a/keyboards/keebio/iris/keymaps/drashna/config.h
+++ b/keyboards/keebio/iris/keymaps/drashna/config.h
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Danny Nguyen <danny@keeb.io> 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This 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
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#pragma once 17#pragma once
19 18
diff --git a/keyboards/keebio/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c
index edfcd23e7..bc34ba822 100644
--- a/keyboards/keebio/iris/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3/* 19/*
diff --git a/keyboards/keebio/iris/keymaps/drashna_lp/config.h b/keyboards/keebio/iris/keymaps/drashna_lp/config.h
index 5370d88ed..414acab84 100644
--- a/keyboards/keebio/iris/keymaps/drashna_lp/config.h
+++ b/keyboards/keebio/iris/keymaps/drashna_lp/config.h
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Danny Nguyen <danny@keeb.io> 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This 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
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#pragma once 17#pragma once
19 18
diff --git a/keyboards/keebio/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h
index 5adf014e3..f08b22dca 100644
--- a/keyboards/keebio/iris/keymaps/drashna_old/config.h
+++ b/keyboards/keebio/iris/keymaps/drashna_old/config.h
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Danny Nguyen <danny@keeb.io> 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This 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
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#pragma once 17#pragma once
19 18
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h
index 40a5bbd0e..5d7ffa8a1 100644
--- a/keyboards/keebio/viterbi/keymaps/drashna/config.h
+++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Danny Nguyen <danny@hexwire.com> 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This 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
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#pragma once 17#pragma once
19 18
diff --git a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
index 3b213418d..99e06b4de 100644
--- a/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
+++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3// Fillers to make layering more clear 19// Fillers to make layering more clear
diff --git a/keyboards/kyria/keymaps/drashna/config.h b/keyboards/kyria/keymaps/drashna/config.h
index 5e9d8b010..1af947e73 100644
--- a/keyboards/kyria/keymaps/drashna/config.h
+++ b/keyboards/kyria/keymaps/drashna/config.h
@@ -1,4 +1,4 @@
1/* Copyright 2019 Thomas Baart <thomas@splitkb.com> 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
diff --git a/keyboards/kyria/keymaps/drashna/keymap.c b/keyboards/kyria/keymaps/drashna/keymap.c
index 98afff19f..08f32812e 100644
--- a/keyboards/kyria/keymaps/drashna/keymap.c
+++ b/keyboards/kyria/keymaps/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3uint8_t is_master; 19uint8_t is_master;
diff --git a/keyboards/launchpad/keymaps/drashna/config.h b/keyboards/launchpad/keymaps/drashna/config.h
new file mode 100644
index 000000000..212b1da80
--- /dev/null
+++ b/keyboards/launchpad/keymaps/drashna/config.h
@@ -0,0 +1,31 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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/* Underlight Configuration */
20#undef RGB_DI_PIN
21#define RGB_DI_PIN F5
22#define RGBLIGHT_ANIMATIONS
23#undef RGBLED_NUM
24#define RGBLED_NUM 8 // Number of LEDs
25#define RGBLIGHT_HUE_STEP 10
26#define RGBLIGHT_SAT_STEP 17
27#define RGBLIGHT_VAL_STEP 17
28
29#define DRIVER_LED_TOTAL RGBLED_NUM
30#define B7_AUDIO
31#define AUDIO_CLICKY
diff --git a/keyboards/launchpad/keymaps/drashna/keymap.c b/keyboards/launchpad/keymaps/drashna/keymap.c
new file mode 100644
index 000000000..f8e4d1a41
--- /dev/null
+++ b/keyboards/launchpad/keymaps/drashna/keymap.c
@@ -0,0 +1,107 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include QMK_KEYBOARD_H
18
19enum local_layers {
20 _QWERTY,
21 _RGB,
22 _FUNC,
23};
24
25// Defines for task manager and such
26#define CALTDEL LCTL(LALT(KC_DEL))
27#define TSKMGR LCTL(LSFT(KC_ESC))
28
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30
31 /* Qwerty
32 * ,-------------.
33 * | 1 | 2 |
34 * |------+------|
35 * | 3 | 4 |
36 * |------+------|
37 * | 5 | 6 |
38 * |------+------|
39 * | FUNC | RGB |
40 * `-------------'
41 */
42 [_QWERTY] = LAYOUT( \
43 KC_1, KC_2, \
44 KC_3, KC_4, \
45 KC_5, KC_6, \
46 MO(_FUNC), TG(_RGB) \
47 ),
48
49 /* RGB
50 * ,-------------.
51 * | Mode-| Mode+|
52 * |------+------|
53 * | HUE- | HUE+ |
54 * |------+------|
55 * | SAT- | SAT+ |
56 * |------+------|
57 * |RGBTOG| |
58 * `-------------'
59 */
60 [_RGB] = LAYOUT( \
61 RGB_RMOD, RGB_MOD, \
62 RGB_HUD, RGB_HUI, \
63 RGB_SAD, RGB_SAI, \
64 RGB_TOG, KC_TRNS \
65 ),
66
67 /* Function
68 * ,-------------.
69 * | Q |CALDEL|
70 * |------+------|
71 * | A |TSKMGR|
72 * |------+------|
73 * | Z | X |
74 * |------+------|
75 * | | C |
76 * `-------------'
77 */
78 [_FUNC] = LAYOUT( \
79 KC_Q, CALTDEL, \
80 KC_A, TSKMGR, \
81 KC_Z, KC_X, \
82 _______, RESET \
83 )
84
85};
86
87
88
89
90#ifdef RGB_MATRIX_ENABLE
91 led_config_t g_led_config = {
92 {
93 { 7, 0 },
94 { 6, 1 },
95 { 5, 2 },
96 { 4, 3 },
97 },{
98 { 121, 2 }, { 121, 23 },
99 { 121, 41 }, { 121, 60 },
100 { 103, 2 }, { 103, 23 },
101 { 103, 41 }, { 103, 60 },
102 },{
103 1, 1, 1, 1,
104 1, 1, 1, 1,
105 }
106 };
107#endif
diff --git a/keyboards/launchpad/keymaps/drashna/rules.mk b/keyboards/launchpad/keymaps/drashna/rules.mk
new file mode 100644
index 000000000..463b85599
--- /dev/null
+++ b/keyboards/launchpad/keymaps/drashna/rules.mk
@@ -0,0 +1,6 @@
1BOOTLOADER = atmel-dfu
2
3RGBLIGHT_ENABLE = no
4AUDIO_ENABLE = no
5BOOTMAGIC_ENABLE = lite
6RGB_MATRIX_ENABLE = WS2812
diff --git a/keyboards/moonlander/keymaps/drashna/config.h b/keyboards/moonlander/keymaps/drashna/config.h
index dd49eaf4b..e022722fe 100644
--- a/keyboards/moonlander/keymaps/drashna/config.h
+++ b/keyboards/moonlander/keymaps/drashna/config.h
@@ -1,4 +1,4 @@
1/* Copyright 2020 Drashna Jael're <drashna@live.com> 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
@@ -15,7 +15,8 @@
15 */ 15 */
16 16
17 17
18
19#pragma once 18#pragma once
20 19
21#define TAPPING_TERM_PER_KEY 20#define TAPPING_TERM_PER_KEY
21#define WAIT_FOR_USB
22// #define NO_USB_STARTUP_CHECK
diff --git a/keyboards/moonlander/keymaps/drashna/keymap.c b/keyboards/moonlander/keymaps/drashna/keymap.c
index b8754673b..7daa5248f 100644
--- a/keyboards/moonlander/keymaps/drashna/keymap.c
+++ b/keyboards/moonlander/keymaps/drashna/keymap.c
@@ -1,4 +1,4 @@
1/* Copyright 2020 Drashna Jael're <drashna@live.com> 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2 * 2 *
3 * This program is free software: you can redistribute it and/or modify 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 4 * it under the terms of the GNU General Public License as published by
@@ -14,8 +14,6 @@
14 * along with this program. If not, see <http://www.gnu.org/licenses/>. 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */ 15 */
16 16
17
18
19#include "drashna.h" 17#include "drashna.h"
20 18
21#ifndef UNICODE_ENABLE 19#ifndef UNICODE_ENABLE
diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h
index 8ad589f93..a595a93c4 100644
--- a/layouts/community/ergodox/drashna/config.h
+++ b/layouts/community/ergodox/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3#ifdef RGBLIGHT_ENABLE 19#ifdef RGBLIGHT_ENABLE
@@ -15,7 +31,7 @@
15#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity 31#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity
16 32
17#undef DEBOUNCE 33#undef DEBOUNCE
18#define DEBOUNCE 15 34#define DEBOUNCE 20
19 35
20#define TAPPING_TERM_PER_KEY 36#define TAPPING_TERM_PER_KEY
21 37
@@ -25,8 +41,7 @@
25# undef RGB_MATRIX_LED_PROCESS_LIMIT 41# undef RGB_MATRIX_LED_PROCESS_LIMIT
26# undef RGB_MATRIX_LED_FLUSH_LIMIT 42# undef RGB_MATRIX_LED_FLUSH_LIMIT
27# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) 43# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
28# define RGBLIGHT_LIMIT_VAL 175 44# define RGBLIGHT_LIMIT_VAL 100
29# define RGB_MATRIX_MAXIMUM_BRIGHTNESS (RGBLIGHT_LIMIT_VAL + 25)
30# undef RGBLIGHT_SLEEP 45# undef RGBLIGHT_SLEEP
31# endif 46# endif
32#endif 47#endif
diff --git a/layouts/community/ergodox/drashna/keymap.c b/layouts/community/ergodox/drashna/keymap.c
index 8f5aaf6cd..5f1c0c8a0 100644
--- a/layouts/community/ergodox/drashna/keymap.c
+++ b/layouts/community/ergodox/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3#ifdef UNICODEMAP_ENABLE 19#ifdef UNICODEMAP_ENABLE
@@ -6,9 +22,6 @@
6#ifndef UNICODE_ENABLE 22#ifndef UNICODE_ENABLE
7# define UC(x) KC_NO 23# define UC(x) KC_NO
8#endif 24#endif
9#ifdef RGBLIGHT_ENABLE
10extern rgblight_config_t rgblight_config;
11#endif
12 25
13enum more_custom_keycodes { 26enum more_custom_keycodes {
14 KC_SWAP_NUM = NEW_SAFE_RANGE, 27 KC_SWAP_NUM = NEW_SAFE_RANGE,
@@ -315,8 +328,21 @@ void keyboard_post_init_keymap(void) {
315void shutdown_keymap(void) { 328void shutdown_keymap(void) {
316 trackball_set_rgbw(RGB_RED, 0x00); 329 trackball_set_rgbw(RGB_RED, 0x00);
317} 330}
331
332static bool mouse_button_one, trackball_button_one;
333
334void trackball_check_click(bool pressed, report_mouse_t* mouse) {
335 if (mouse_button_one | pressed) {
336 mouse->buttons |= MOUSE_BTN1;
337 } else {
338 mouse->buttons &= ~MOUSE_BTN1;
339 }
340 trackball_button_one = pressed;
341}
318#endif 342#endif
319 343
344
345
320bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { 346bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
321 switch (keycode) { 347 switch (keycode) {
322 case KC_1: 348 case KC_1:
@@ -358,33 +384,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
358 } 384 }
359 run_trackball_cleanup(); 385 run_trackball_cleanup();
360 break; 386 break;
361#if !defined(MOUSEKEY_ENABLE) && defined(POINTING_DEVICE_ENABLE) 387#if !defined(MOUSEKEY_ENABLE)
362 case KC_BTN1 ... KC_BTN3: 388 case KC_MS_BTN1:
363 { 389 mouse_button_one = record->event.pressed;
364 report_mouse_t currentReport = pointing_device_get_report(); 390 trackball_register_button(mouse_button_one | trackball_button_one, MOUSE_BTN1);
365 if (record->event.pressed) { 391 break;
366 currentReport.buttons |= (1 << (keycode - KC_BTN1)); // this is defined in report.h 392 case KC_MS_BTN2:
367 } else { 393 trackball_register_button(record->event.pressed, MOUSE_BTN2);
368 currentReport.buttons &= ~(1 << (keycode - KC_BTN1)); 394 break;
369 } 395 case KC_MS_BTN3:
370 pointing_device_set_report(currentReport); 396 trackball_register_button(record->event.pressed, MOUSE_BTN3);
371 pointing_device_send(); 397 break;
372 break;
373 }
374# endif 398# endif
375#endif 399#endif
376 } 400 }
377 // switch (keycode) {
378 // case KC_P00:
379 // if (!record->event.pressed) {
380 // register_code(KC_KP_0);
381 // unregister_code(KC_KP_0);
382 // register_code(KC_KP_0);
383 // unregister_code(KC_KP_0);
384 // }
385 // return false;
386 // break;
387 //}
388 return true; 401 return true;
389} 402}
390 403
@@ -457,7 +470,8 @@ void rgb_matrix_indicators_user(void) {
457 if (userspace_config.rgb_layer_change) 470 if (userspace_config.rgb_layer_change)
458# endif 471# endif
459 { 472 {
460 switch (get_highest_layer(layer_state)) { 473 bool mods_enabled = IS_LAYER_ON(_MODS);
474 switch (get_highest_layer(layer_state|default_layer_state)) {
461 case _GAMEPAD: 475 case _GAMEPAD:
462 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 476 rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
463 break; 477 break;
@@ -473,36 +487,30 @@ void rgb_matrix_indicators_user(void) {
473 case _ADJUST: 487 case _ADJUST:
474 rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 488 rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
475 break; 489 break;
476 default: { 490 case _QWERTY:
477 bool mods_enabled = IS_LAYER_ON(_MODS); 491 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
478 switch (get_highest_layer(default_layer_state)) { 492 break;
479 case _QWERTY: 493 case _COLEMAK:
480 rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 494 rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
481 break; 495 break;
482 case _COLEMAK: 496 case _DVORAK:
483 rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 497 rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
484 break; 498 break;
485 case _DVORAK: 499 case _WORKMAN:
486 rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 500 rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
487 break; 501 break;
488 case _WORKMAN: 502 case _NORMAN:
489 rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 503 rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
490 break; 504 break;
491 case _NORMAN: 505 case _MALTRON:
492 rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 506 rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
493 break; 507 break;
494 case _MALTRON: 508 case _EUCALYN:
495 rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 509 rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
496 break; 510 break;
497 case _EUCALYN: 511 case _CARPLAX:
498 rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER); 512 rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
499 break;
500 case _CARPLAX:
501 rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_MODIFIER);
502 break;
503 }
504 break; 513 break;
505 }
506 } 514 }
507 } 515 }
508} 516}
diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h
index 29045148e..97c1170d7 100644
--- a/layouts/community/numpad_5x6/drashna/config.h
+++ b/layouts/community/numpad_5x6/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3// #define B6_AUDIO 19// #define B6_AUDIO
diff --git a/layouts/community/numpad_5x6/drashna/keymap.c b/layouts/community/numpad_5x6/drashna/keymap.c
index 3d325a4c1..5c87ebf76 100644
--- a/layouts/community/numpad_5x6/drashna/keymap.c
+++ b/layouts/community/numpad_5x6/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3#define F2_MCRO LT(_GAMEPAD, KC_F2) 19#define F2_MCRO LT(_GAMEPAD, KC_F2)
diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h
index 5342549e5..6a99fcda0 100644
--- a/layouts/community/ortho_4x12/drashna/config.h
+++ b/layouts/community/ortho_4x12/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM) 19#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
diff --git a/layouts/community/ortho_4x12/drashna/keymap.c b/layouts/community/ortho_4x12/drashna/keymap.c
index d2957d8fd..8070a7d35 100644
--- a/layouts/community/ortho_4x12/drashna/keymap.c
+++ b/layouts/community/ortho_4x12/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3#ifdef RGBLIGHT_ENABLE 19#ifdef RGBLIGHT_ENABLE
diff --git a/layouts/community/ortho_5x12/drashna/config.h b/layouts/community/ortho_5x12/drashna/config.h
index 7504338ff..76bd642a3 100644
--- a/layouts/community/ortho_5x12/drashna/config.h
+++ b/layouts/community/ortho_5x12/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3/* ws2812 RGB LED */ 19/* ws2812 RGB LED */
diff --git a/layouts/community/ortho_5x12/drashna/keymap.c b/layouts/community/ortho_5x12/drashna/keymap.c
index 0ee9dfb10..98c349b2e 100644
--- a/layouts/community/ortho_5x12/drashna/keymap.c
+++ b/layouts/community/ortho_5x12/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3/* 19/*
diff --git a/keyboards/crkbd/keymaps/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h
index 26af02957..7db51fb6e 100644
--- a/keyboards/crkbd/keymaps/drashna/config.h
+++ b/layouts/community/split_3x6_3/drashna/config.h
@@ -1,22 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2This is the c configuration file for the keymap 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4Copyright 2012 Jun Wako <wakojun@gmail.com> 4 * it under the terms of the GNU General Public License as published by
5Copyright 2015 Jack Humbert 5 * the Free Software Foundation, either version 2 of the License, or
6 6 * (at your option) any later version.
7This program is free software: you can redistribute it and/or modify 7 *
8it under the terms of the GNU General Public License as published by 8 * This program is distributed in the hope that it will be useful,
9the Free Software Foundation, either version 2 of the License, or 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10(at your option) any later version. 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 11 * GNU General Public License for more details.
12This program is distributed in the hope that it will be useful, 12 *
13but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * You should have received a copy of the GNU General Public License
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15GNU General Public License for more details. 15 */
16
17You should have received a copy of the GNU General Public License
18along with this program. If not, see <http://www.gnu.org/licenses/>.
19*/
20 16
21#pragma once 17#pragma once
22 18
@@ -70,7 +66,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
70#undef PRODUCT 66#undef PRODUCT
71#define PRODUCT Drashna Hacked Corne Keyboard 67#define PRODUCT Drashna Hacked Corne Keyboard
72 68
73#define OLED_FONT_H "keyboards/crkbd/keymaps/drashna/glcdfont.c" 69#define OLED_FONT_H "layouts/community/split_3x6_3/drashna/glcdfont.c"
74// #define OLED_FONT_WIDTH 5 70// #define OLED_FONT_WIDTH 5
75// #define OLED_FONT_HEIGHT 7 71// #define OLED_FONT_HEIGHT 7
76 72
diff --git a/keyboards/crkbd/keymaps/drashna/glcdfont.c b/layouts/community/split_3x6_3/drashna/glcdfont.c
index 10ce3b345..10ce3b345 100644
--- a/keyboards/crkbd/keymaps/drashna/glcdfont.c
+++ b/layouts/community/split_3x6_3/drashna/glcdfont.c
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/layouts/community/split_3x6_3/drashna/keymap.c
index d9c1605ce..30e3958fe 100644
--- a/keyboards/crkbd/keymaps/drashna/keymap.c
+++ b/layouts/community/split_3x6_3/drashna/keymap.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3extern uint8_t is_master; 19extern uint8_t is_master;
@@ -17,90 +33,90 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
17 * of use. K## is a placeholder to pass through the individual keycodes 33 * of use. K## is a placeholder to pass through the individual keycodes
18 */ 34 */
19 35
20#define LAYOUT_crkbd_base( \ 36#define LAYOUT_split_3x6_3_base( \
21 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \ 37 K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
22 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ 38 K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
23 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \ 39 K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
24 ) \ 40 ) \
25 LAYOUT_wrapper( \ 41 LAYOUT_split_3x6_3_wrapper( \
26 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \ 42 KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
27 ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \ 43 ALT_T(KC_TAB), K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
28 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \ 44 OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
29 KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \ 45 KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \
30 ) 46 )
31#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__) 47#define LAYOUT_split_3x6_3_base_wrapper(...) LAYOUT_split_3x6_3_base(__VA_ARGS__)
32 48
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 49const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34 [_QWERTY] = LAYOUT_crkbd_base_wrapper( 50 [_QWERTY] = LAYOUT_split_3x6_3_base_wrapper(
35 _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, 51 _________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
36 _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, 52 _________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
37 _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ 53 _________________QWERTY_L3_________________, _________________QWERTY_R3_________________
38 ), 54 ),
39 55
40 [_COLEMAK] = LAYOUT_crkbd_base_wrapper( 56 [_COLEMAK] = LAYOUT_split_3x6_3_base_wrapper(
41 _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, 57 _________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
42 _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, 58 _________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
43 _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ 59 _________________COLEMAK_L3________________, _________________COLEMAK_R3________________
44 ), 60 ),
45 61
46 [_DVORAK] = LAYOUT_crkbd_base_wrapper( 62 [_DVORAK] = LAYOUT_split_3x6_3_base_wrapper(
47 _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, 63 _________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
48 _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, 64 _________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
49 _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ 65 _________________DVORAK_L3_________________, _________________DVORAK_R3_________________
50 ), 66 ),
51 67
52 [_WORKMAN] = LAYOUT_crkbd_base_wrapper( 68 [_WORKMAN] = LAYOUT_split_3x6_3_base_wrapper(
53 _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, 69 _________________WORKMAN_L1________________, _________________WORKMAN_R1________________,
54 _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, 70 _________________WORKMAN_L2________________, _________________WORKMAN_R2________________,
55 _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ 71 _________________WORKMAN_L3________________, _________________WORKMAN_R3________________
56 ), 72 ),
57 73
58 [_NORMAN] = LAYOUT_crkbd_base_wrapper( 74 [_NORMAN] = LAYOUT_split_3x6_3_base_wrapper(
59 _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, 75 _________________NORMAN_L1_________________, _________________NORMAN_L1_________________,
60 _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, 76 _________________NORMAN_L2_________________, _________________NORMAN_R2_________________,
61 _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ 77 _________________NORMAN_L3_________________, _________________NORMAN_R3_________________
62 ), 78 ),
63 79
64 [_MALTRON] = LAYOUT_crkbd_base_wrapper( 80 [_MALTRON] = LAYOUT_split_3x6_3_base_wrapper(
65 _________________MALTRON_L1________________, _________________MALTRON_R1________________, 81 _________________MALTRON_L1________________, _________________MALTRON_R1________________,
66 _________________MALTRON_L2________________, _________________MALTRON_R2________________, 82 _________________MALTRON_L2________________, _________________MALTRON_R2________________,
67 _________________MALTRON_L3________________, _________________MALTRON_R3________________ 83 _________________MALTRON_L3________________, _________________MALTRON_R3________________
68 ), 84 ),
69 85
70 [_EUCALYN] = LAYOUT_crkbd_base_wrapper( 86 [_EUCALYN] = LAYOUT_split_3x6_3_base_wrapper(
71 _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, 87 _________________EUCALYN_L1________________, _________________EUCALYN_R1________________,
72 _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, 88 _________________EUCALYN_L2________________, _________________EUCALYN_R2________________,
73 _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ 89 _________________EUCALYN_L3________________, _________________EUCALYN_R3________________
74 ), 90 ),
75 91
76 [_CARPLAX] = LAYOUT_crkbd_base_wrapper( 92 [_CARPLAX] = LAYOUT_split_3x6_3_base_wrapper(
77 _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, 93 _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________,
78 _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, 94 _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________,
79 _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ 95 _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________
80 ), 96 ),
81 97
82 [_MODS] = LAYOUT_wrapper( 98 [_MODS] = LAYOUT_split_3x6_3_wrapper(
83 _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, 99 _______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
84 _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, 100 _______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
85 KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT, 101 KC_LSFT, ___________________BLANK___________________, ___________________BLANK___________________, KC_RSFT,
86 _______, _______, _______, _______, _______, _______ 102 _______, _______, _______, _______, _______, _______
87 ), 103 ),
88 104
89 [_LOWER] = LAYOUT_wrapper( 105 [_LOWER] = LAYOUT_split_3x6_3_wrapper(
90 KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11, 106 KC_F11, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_F11,
91 KC_F12, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE, 107 KC_F12, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
92 _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______, 108 _______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
93 _______, _______, _______, _______, _______, _______ 109 _______, _______, _______, _______, _______, _______
94 ), 110 ),
95 111
96 [_RAISE] = LAYOUT_wrapper( \ 112 [_RAISE] = LAYOUT_split_3x6_3_wrapper( \
97 _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______, 113 _______, _________________RAISE_L1__________________, _________________RAISE_R1__________________, _______,
98 _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS, 114 _______, _________________RAISE_L2__________________, _________________RAISE_R2__________________, KC_BSLS,
99 _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______, 115 _______, _________________RAISE_L3__________________, _________________RAISE_R3__________________, _______,
100 _______, _______, _______, _______, _______, _______ 116 _______, _______, _______, _______, _______, _______
101 ), 117 ),
102 118
103 [_ADJUST] = LAYOUT_wrapper( \ 119 [_ADJUST] = LAYOUT_split_3x6_3_wrapper( \
104 KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, 120 KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
105 VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST, 121 VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
106 MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL, 122 MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL,
diff --git a/keyboards/crkbd/keymaps/drashna/rules.mk b/layouts/community/split_3x6_3/drashna/rules.mk
index 492c17e20..6ac1554b3 100644
--- a/keyboards/crkbd/keymaps/drashna/rules.mk
+++ b/layouts/community/split_3x6_3/drashna/rules.mk
@@ -16,12 +16,13 @@ UNICODE_ENABLE = no # Unicode
16BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID 16BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
17RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. 17RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
18SWAP_HANDS_ENABLE = no # Enable one-hand typing 18SWAP_HANDS_ENABLE = no # Enable one-hand typing
19RGB_MATRIX_ENABLE = WS2812
20 19
21HAPTIC_ENABLE = SOLENOID
22# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 20# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
23SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend 21SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
24 22
25BOOTLOADER = qmk-dfu 23ifeq ($(strip $(KEYBOARD)), crkbd/rev1)
26 24 OLED_DRIVER_ENABLE = yes
27OLED_DRIVER_ENABLE = yes 25 RGB_MATRIX_ENABLE = WS2812
26 HAPTIC_ENABLE = SOLENOID
27 BOOTLOADER = qmk-dfu
28endif
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 7d83c7884..9fc65e5c9 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3// Use custom magic number so that when switching branches, EEPROM always gets reset 19// Use custom magic number so that when switching branches, EEPROM always gets reset
@@ -7,11 +23,6 @@
7#define USB_POLLING_INTERVAL_MS 1 23#define USB_POLLING_INTERVAL_MS 1
8 24
9#ifdef AUDIO_ENABLE 25#ifdef AUDIO_ENABLE
10# if __GNUC__ > 5
11# if __has_include("drashna_song_list.h")
12# include "drashna_song_list.h"
13# endif // if file exists
14# endif // __GNUC__
15 26
16# define AUDIO_CLICKY 27# define AUDIO_CLICKY
17# define STARTUP_SONG SONG(RICK_ROLL) 28# define STARTUP_SONG SONG(RICK_ROLL)
@@ -49,7 +60,7 @@
49// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 60// # define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
50// # define EECONFIG_RGB_MATRIX (uint32_t *)16 61// # define EECONFIG_RGB_MATRIX (uint32_t *)16
51 62
52# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) 63# if defined(__AVR__) && !defined(__AVR_AT90USB1286__) && !defined(KEYBOARD_launchpad)
53# define DISABLE_RGB_MATRIX_ALPHAS_MODS 64# define DISABLE_RGB_MATRIX_ALPHAS_MODS
54# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN 65# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
55# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT 66# define DISABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
@@ -63,7 +74,7 @@
63# define DISABLE_RGB_MATRIX_CYCLE_ALL 74# define DISABLE_RGB_MATRIX_CYCLE_ALL
64# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT 75# define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
65# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN 76# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
66# define DISABLE_RGB_MATRIX_CYCLE_OUT_IN 77// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
67// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL 78// # define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
68# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON 79# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
69# define DISABLE_RGB_MATRIX_DUAL_BEACON 80# define DISABLE_RGB_MATRIX_DUAL_BEACON
@@ -100,7 +111,7 @@
100 111
101#ifdef QMK_KEYS_PER_SCAN 112#ifdef QMK_KEYS_PER_SCAN
102# undef QMK_KEYS_PER_SCAN 113# undef QMK_KEYS_PER_SCAN
103# define QMK_KEYS_PER_SCAN 1 114# define QMK_KEYS_PER_SCAN 2
104#endif // !QMK_KEYS_PER_SCAN 115#endif // !QMK_KEYS_PER_SCAN
105 116
106// this makes it possible to do rolling combos (zx) with keys that 117// this makes it possible to do rolling combos (zx) with keys that
@@ -111,6 +122,7 @@
111#undef PERMISSIVE_HOLD 122#undef PERMISSIVE_HOLD
112//#define TAPPING_FORCE_HOLD 123//#define TAPPING_FORCE_HOLD
113//#define RETRO_TAPPING 124//#define RETRO_TAPPING
125#define TAPPING_TERM_PER_KEY
114 126
115#define FORCE_NKRO 127#define FORCE_NKRO
116 128
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 5c0f18027..ec6484621 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Christopher Courtney <drashna@live.com> @drashna 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This 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
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#include "drashna.h" 17#include "drashna.h"
19 18
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index dd2b02258..772005a03 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -1,19 +1,18 @@
1/* 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
2Copyright 2017 Christopher Courtney <drashna@live.com> @drashna 2 *
3 3 * This program is free software: you can redistribute it and/or modify
4This 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
5it under the terms of the GNU General Public License as published by 5 * the Free Software Foundation, either version 2 of the License, or
6the Free Software Foundation, either version 2 of the License, or 6 * (at your option) any later version.
7(at your option) any later version. 7 *
8 8 * This program is distributed in the hope that it will be useful,
9This program is distributed in the hope that it will be useful, 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * GNU General Public License for more details.
12GNU General Public License for more details. 12 *
13 13 * You should have received a copy of the GNU General Public License
14You should have received a copy of the GNU General Public License 14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15along with this program. If not, see <http://www.gnu.org/licenses/>. 15 */
16*/
17 16
18#pragma once 17#pragma once
19#include QMK_KEYBOARD_H 18#include QMK_KEYBOARD_H
diff --git a/users/drashna/oled_stuff.c b/users/drashna/oled_stuff.c
index 6503b970e..46288aad2 100644
--- a/users/drashna/oled_stuff.c
+++ b/users/drashna/oled_stuff.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3extern uint8_t is_master; 19extern uint8_t is_master;
diff --git a/users/drashna/oled_stuff.h b/users/drashna/oled_stuff.h
index 662e206b7..7f2786d00 100644
--- a/users/drashna/oled_stuff.h
+++ b/users/drashna/oled_stuff.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
diff --git a/users/drashna/pimoroni_trackball.c b/users/drashna/pimoroni_trackball.c
index c5bb560b3..9ae094c05 100644
--- a/users/drashna/pimoroni_trackball.c
+++ b/users/drashna/pimoroni_trackball.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "pimoroni_trackball.h" 17#include "pimoroni_trackball.h"
2#include "i2c_master.h" 18#include "i2c_master.h"
3 19
@@ -6,7 +22,7 @@ static int16_t x_offset = 0;
6static int16_t y_offset = 0; 22static int16_t y_offset = 0;
7static int16_t h_offset = 0; 23static int16_t h_offset = 0;
8static int16_t v_offset = 0; 24static int16_t v_offset = 0;
9static float precisionSpeed = 1; 25static float precisionSpeed = 1;
10 26
11#ifndef I2C_TIMEOUT 27#ifndef I2C_TIMEOUT
12# define I2C_TIMEOUT 100 28# define I2C_TIMEOUT 100
@@ -47,17 +63,37 @@ __attribute__((weak)) void trackball_check_click(bool pressed, report_mouse_t* m
47 } 63 }
48} 64}
49 65
66void trackball_register_button(bool pressed, enum mouse_buttons button) {
67 report_mouse_t currentReport = pointing_device_get_report();
68 if (pressed) {
69 currentReport.buttons |= button;
70 } else {
71 currentReport.buttons &= ~button;
72 }
73 pointing_device_set_report(currentReport);
74}
75
50float trackball_get_precision(void) { return precisionSpeed; } 76float trackball_get_precision(void) { return precisionSpeed; }
51void trackball_set_precision(float precision) { precisionSpeed = precision; } 77void trackball_set_precision(float precision) { precisionSpeed = precision; }
52bool trackball_is_scrolling(void) { return scrolling; } 78bool trackball_is_scrolling(void) { return scrolling; }
53void trackball_set_scrolling(bool scroll) { scrolling = scroll; } 79void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
54 80
55__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00,0x00,0x00,0x4F); } 81bool has_report_changed (report_mouse_t first, report_mouse_t second) {
82 return !(
83 (!first.buttons && first.buttons == second.buttons) &&
84 (!first.x && first.x == second.x) &&
85 (!first.y && first.y == second.y) &&
86 (!first.h && first.h == second.h) &&
87 (!first.v && first.v == second.v) );
88}
89
90
91__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x00, 0x00, 0x00, 0x4F); }
56 92
57void pointing_device_task(void) { 93void pointing_device_task(void) {
58 static bool debounce; 94 static bool debounce;
59 static uint16_t debounce_timer; 95 static uint16_t debounce_timer;
60 uint8_t state[5] = {}; 96 uint8_t state[5] = {};
61 if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) { 97 if (i2c_readReg(TRACKBALL_WRITE, 0x04, state, 5, I2C_TIMEOUT) == I2C_STATUS_SUCCESS) {
62 if (!state[4] && !debounce) { 98 if (!state[4] && !debounce) {
63 if (scrolling) { 99 if (scrolling) {
@@ -85,7 +121,7 @@ void pointing_device_task(void) {
85 } 121 }
86 } else { 122 } else {
87 if (state[4]) { 123 if (state[4]) {
88 debounce = true; 124 debounce = true;
89 debounce_timer = timer_read(); 125 debounce_timer = timer_read();
90 } 126 }
91 } 127 }
@@ -97,7 +133,6 @@ void pointing_device_task(void) {
97 133
98 trackball_check_click(state[4] & (1 << 7), &mouse); 134 trackball_check_click(state[4] & (1 << 7), &mouse);
99 135
100
101#ifndef PIMORONI_TRACKBALL_ROTATE 136#ifndef PIMORONI_TRACKBALL_ROTATE
102 update_member(&mouse.x, &x_offset); 137 update_member(&mouse.x, &x_offset);
103 update_member(&mouse.y, &y_offset); 138 update_member(&mouse.y, &y_offset);
@@ -110,5 +145,7 @@ void pointing_device_task(void) {
110 update_member(&mouse.v, &h_offset); 145 update_member(&mouse.v, &h_offset);
111#endif 146#endif
112 pointing_device_set_report(mouse); 147 pointing_device_set_report(mouse);
113 pointing_device_send(); 148 if (has_report_changed(mouse, pointing_device_get_report())) {
149 pointing_device_send();
150 }
114} 151}
diff --git a/users/drashna/pimoroni_trackball.h b/users/drashna/pimoroni_trackball.h
index 7e8a7cc81..83d248d3f 100644
--- a/users/drashna/pimoroni_trackball.h
+++ b/users/drashna/pimoroni_trackball.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3#include "quantum.h" 19#include "quantum.h"
@@ -11,6 +27,7 @@
11 27
12void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white); 28void trackball_set_rgbw(uint8_t red, uint8_t green, uint8_t blue, uint8_t white);
13void trackball_check_click(bool pressed, report_mouse_t *mouse); 29void trackball_check_click(bool pressed, report_mouse_t *mouse);
30void trackball_register_button(bool pressed, enum mouse_buttons button);
14 31
15float trackball_get_precision(void); 32float trackball_get_precision(void);
16void trackball_set_precision(float precision); 33void trackball_set_precision(float precision);
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 8e3d3356e..19bdef73f 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2 18
3uint16_t copy_paste_timer; 19uint16_t copy_paste_timer;
@@ -21,304 +37,171 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
21 process_record_user_oled(keycode, record); 37 process_record_user_oled(keycode, record);
22#endif // OLED 38#endif // OLED
23 39
24 if (process_record_keymap(keycode, record) && process_record_secrets(keycode, record) 40 if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
25#ifdef RGB_MATRIX_ENABLE 41#ifdef RGB_MATRIX_ENABLE
26 && process_record_user_rgb_matrix(keycode, record) 42 && process_record_user_rgb_matrix(keycode, record)
27#endif 43#endif
28#ifdef RGBLIGHT_ENABLE 44#ifdef RGBLIGHT_ENABLE
29 && process_record_user_rgb_light(keycode, record) 45 && process_record_user_rgb_light(keycode, record)
30#endif 46#endif
31 ) { 47 && true)) {
32 switch (keycode) { 48 return false;
33 case KC_QWERTY ... KC_WORKMAN: 49 }
34 if (record->event.pressed) { 50
35 uint8_t mods = mod_config(get_mods() | get_oneshot_mods()); 51 switch (keycode) {
36 if (!mods) { 52 case KC_QWERTY ... KC_WORKMAN:
37 set_single_persistent_default_layer(keycode - KC_QWERTY); 53 if (record->event.pressed) {
38 } else if (mods & MOD_MASK_SHIFT) { 54 uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
39 set_single_persistent_default_layer(keycode - KC_QWERTY + 4); 55 if (!mods) {
40 } else if (mods & MOD_MASK_CTRL) { 56 set_single_persistent_default_layer(keycode - KC_QWERTY);
41 set_single_persistent_default_layer(keycode - KC_QWERTY + 8); 57 } else if (mods & MOD_MASK_SHIFT) {
42 } 58 set_single_persistent_default_layer(keycode - KC_QWERTY + 4);
59 } else if (mods & MOD_MASK_CTRL) {
60 set_single_persistent_default_layer(keycode - KC_QWERTY + 8);
43 } 61 }
44 break; 62 }
63 break;
45 64
46 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader 65 case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
47 if (!record->event.pressed) { 66 if (!record->event.pressed) {
48#ifndef MAKE_BOOTLOADER 67#ifndef MAKE_BOOTLOADER
49 uint8_t temp_mod = mod_config(get_mods()); 68 uint8_t temp_mod = mod_config(get_mods());
50 uint8_t temp_osm = mod_config(get_oneshot_mods()); 69 uint8_t temp_osm = mod_config(get_oneshot_mods());
51 clear_mods(); 70 clear_mods();
52 clear_oneshot_mods(); 71 clear_oneshot_mods();
53#endif 72#endif
54 send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY); 73 send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY);
55#ifndef MAKE_BOOTLOADER 74#ifndef MAKE_BOOTLOADER
56 if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) 75 if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
57#endif 76#endif
58 { 77 {
59 send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY); 78 send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY);
60#ifndef MAKE_BOOTLOADER 79#ifndef MAKE_BOOTLOADER
61 } else { 80 } else {
62 send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY); 81 send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY);
63#endif 82#endif
64 } 83 }
65 send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); 84 send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY);
66#ifdef RGB_MATRIX_SPLIT_RIGHT 85#ifdef RGB_MATRIX_SPLIT_RIGHT
67 send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); 86 send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY);
68# ifndef OLED_DRIVER_ENABLE 87# ifndef OLED_DRIVER_ENABLE
69 send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); 88 send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY);
70# endif 89# endif
71#endif 90#endif
72 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); 91 send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
73 } 92 }
74 93
75 break; 94 break;
76 95
77 case VRSN: // Prints firmware version 96 case VRSN: // Prints firmware version
78 if (record->event.pressed) { 97 if (record->event.pressed) {
79 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); 98 send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
80 } 99 }
81 break; 100 break;
82 101
83 case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them 102 case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
84#ifdef TAP_DANCE_ENABLE 103#ifdef TAP_DANCE_ENABLE
85 if (record->event.pressed) { 104 if (record->event.pressed) {
86 for (uint8_t index = 0; index < 4; index++) { 105 for (uint8_t index = 0; index < 4; index++) {
87 diablo_timer[index].key_interval = 0; 106 diablo_timer[index].key_interval = 0;
88 }
89 } 107 }
108 }
90#endif // TAP_DANCE_ENABLE 109#endif // TAP_DANCE_ENABLE
91 break; 110 break;
92 111
93 case KC_CCCV: // One key copy/paste 112 case KC_CCCV: // One key copy/paste
94 if (record->event.pressed) { 113 if (record->event.pressed) {
95 copy_paste_timer = timer_read(); 114 copy_paste_timer = timer_read();
96 } else { 115 } else {
97 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy 116 if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
98 tap_code16(LCTL(KC_C)); 117 tap_code16(LCTL(KC_C));
99 } else { // Tap, paste 118 } else { // Tap, paste
100 tap_code16(LCTL(KC_V)); 119 tap_code16(LCTL(KC_V));
101 }
102 } 120 }
103 break; 121 }
122 break;
104#ifdef UNICODE_ENABLE 123#ifdef UNICODE_ENABLE
105 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻ 124 case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
106 if (record->event.pressed) { 125 if (record->event.pressed) {
107 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); 126 send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
108 } 127 }
109 break; 128 break;
110 case UC_TABL: // ┬─┬ノ( º _ ºノ) 129 case UC_TABL: // ┬─┬ノ( º _ ºノ)
111 if (record->event.pressed) { 130 if (record->event.pressed) {
112 send_unicode_string("┬─┬ノ( º _ ºノ)"); 131 send_unicode_string("┬─┬ノ( º _ ºノ)");
113 } 132 }
114 break; 133 break;
115 case UC_SHRG: // ¯\_(ツ)_/¯ 134 case UC_SHRG: // ¯\_(ツ)_/¯
116 if (record->event.pressed) { 135 if (record->event.pressed) {
117 send_unicode_string("¯\\_(ツ)_/¯"); 136 send_unicode_string("¯\\_(ツ)_/¯");
118 } 137 }
119 break; 138 break;
120 case UC_DISA: // ಠ_ಠ 139 case UC_DISA: // ಠ_ಠ
121 if (record->event.pressed) { 140 if (record->event.pressed) {
122 send_unicode_string("ಠ_ಠ"); 141 send_unicode_string("ಠ_ಠ");
123 } 142 }
124 break; 143 break;
125#endif 144#endif
126 case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal 145 case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
127#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 146#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
128 if (record->event.pressed) { 147 if (record->event.pressed) {
129 userspace_config.rgb_layer_change ^= 1; 148 userspace_config.rgb_layer_change ^= 1;
130 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); 149 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
131 eeconfig_update_user(userspace_config.raw); 150 eeconfig_update_user(userspace_config.raw);
132 if (userspace_config.rgb_layer_change) { 151 if (userspace_config.rgb_layer_change) {
133# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) 152# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
134 rgblight_enable_noeeprom(); 153 rgblight_enable_noeeprom();
135# endif 154# endif
136 layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better) 155 layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
137# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE) 156# if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
138 } else { 157 } else {
139 rgblight_disable_noeeprom(); 158 rgblight_disable_noeeprom();
140# endif 159# endif
141 }
142 } 160 }
161 }
143#endif // RGBLIGHT_ENABLE 162#endif // RGBLIGHT_ENABLE
144 break; 163 break;
145 164
146#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE) 165#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
147 case RGB_TOG: 166 case RGB_TOG:
148 // Split keyboards need to trigger on key-up for edge-case issue 167 // Split keyboards need to trigger on key-up for edge-case issue
149# ifndef SPLIT_KEYBOARD 168# ifndef SPLIT_KEYBOARD
150 if (record->event.pressed) { 169 if (record->event.pressed) {
151# else 170# else
152 if (!record->event.pressed) { 171 if (!record->event.pressed) {
153# endif 172# endif
154# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) 173# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
155 rgblight_toggle(); 174 rgblight_toggle();
156# endif 175# endif
157# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES) 176# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
158 rgb_matrix_toggle(); 177 rgb_matrix_toggle();
159# endif 178# endif
160 } 179 }
161 return false; 180 return false;
162 break; 181 break;
163 case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions 182 case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
164 if (record->event.pressed) { 183 if (record->event.pressed) {
165 bool is_eeprom_updated; 184 bool is_eeprom_updated;
166# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) 185# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
167 // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled 186 // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
168 if (userspace_config.rgb_layer_change) { 187 if (userspace_config.rgb_layer_change) {
169 userspace_config.rgb_layer_change = false; 188 userspace_config.rgb_layer_change = false;
170 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change); 189 dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
171 is_eeprom_updated = true; 190 is_eeprom_updated = true;
172 } 191 }
173# endif 192# endif
174# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) 193# if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
175 if (userspace_config.rgb_matrix_idle_anim) { 194 if (userspace_config.rgb_matrix_idle_anim) {
176 userspace_config.rgb_matrix_idle_anim = false; 195 userspace_config.rgb_matrix_idle_anim = false;
177 dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim); 196 dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
178 is_eeprom_updated = true; 197 is_eeprom_updated = true;
179 }
180# endif
181 if (is_eeprom_updated) {
182 eeconfig_update_user(userspace_config.raw);
183 }
184 }
185
186# if defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)
187 if (keycode == RGB_MODE_FORWARD && record->event.pressed) {
188 uint8_t shifted = get_mods() & (MOD_MASK_SHIFT);
189 if (shifted) {
190# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
191 rgblight_step_reverse();
192# endif
193# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
194 rgb_matrix_step_reverse();
195# endif
196 } else {
197# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
198 rgblight_step();
199# endif
200# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
201 rgb_matrix_step();
202# endif
203 }
204 } else if (keycode == RGB_MODE_REVERSE && record->event.pressed) {
205 uint8_t shifted = get_mods() & (MOD_MASK_SHIFT);
206 if (shifted) {
207# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
208 rgblight_step();
209# endif
210# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
211 rgb_matrix_step();
212# endif
213 } else {
214# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
215 rgblight_step_reverse();
216# endif
217# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
218 rgb_matrix_step_reverse();
219# endif
220 }
221 } else if (keycode == RGB_HUI) {
222# ifndef SPLIT_KEYBOARD
223 if (record->event.pressed) {
224# else
225 if (!record->event.pressed) {
226# endif
227# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
228 rgblight_increase_hue();
229# endif
230# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
231 rgb_matrix_increase_hue();
232# endif
233 }
234 } else if (keycode == RGB_HUD) {
235# ifndef SPLIT_KEYBOARD
236 if (record->event.pressed) {
237# else
238 if (!record->event.pressed) {
239# endif
240# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
241 rgblight_decrease_hue();
242# endif
243# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
244 rgb_matrix_decrease_hue();
245# endif
246 }
247 } else if (keycode == RGB_SAI) {
248# ifndef SPLIT_KEYBOARD
249 if (record->event.pressed) {
250# else
251 if (!record->event.pressed) {
252# endif
253# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
254 rgblight_increase_sat();
255# endif
256# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
257 rgb_matrix_increase_sat();
258# endif
259 }
260 } else if (keycode == RGB_SAD) {
261# ifndef SPLIT_KEYBOARD
262 if (record->event.pressed) {
263# else
264 if (!record->event.pressed) {
265# endif
266# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
267 rgblight_decrease_sat();
268# endif
269# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
270 rgb_matrix_decrease_sat();
271# endif
272 }
273 } else if (keycode == RGB_VAI) {
274# ifndef SPLIT_KEYBOARD
275 if (record->event.pressed) {
276# else
277 if (!record->event.pressed) {
278# endif
279# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
280 rgblight_increase_val();
281# endif
282# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
283 rgb_matrix_increase_val();
284# endif
285 }
286 } else if (keycode == RGB_VAD) {
287# ifndef SPLIT_KEYBOARD
288 if (record->event.pressed) {
289# else
290 if (!record->event.pressed) {
291# endif
292# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
293 rgblight_decrease_val();
294# endif
295# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
296 rgb_matrix_decrease_val();
297# endif
298 }
299 } else if (keycode == RGB_SPI) {
300 if (record->event.pressed) {
301# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
302 rgblight_increase_speed();
303# endif
304# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
305 rgb_matrix_increase_speed();
306# endif
307 }
308 } else if (keycode == RGB_SPD) {
309 if (record->event.pressed) {
310# if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)
311 rgblight_decrease_speed();
312# endif
313# if defined(RGB_MATRIX_ENABLE) && !defined(RGB_MATRIX_DISABLE_KEYCODES)
314 rgb_matrix_decrease_speed();
315# endif
316 }
317 } 198 }
318 return false;
319# endif 199# endif
200 if (is_eeprom_updated) {
201 eeconfig_update_user(userspace_config.raw);
202 }
203 }
320#endif 204#endif
321 }
322 } 205 }
323 return true; 206 return true;
324} 207}
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 999882d4b..d41be962d 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2#include "drashna.h" 18#include "drashna.h"
3 19
diff --git a/users/drashna/rgb_matrix_stuff.c b/users/drashna/rgb_matrix_stuff.c
index c9c3224fa..52e261234 100644
--- a/users/drashna/rgb_matrix_stuff.c
+++ b/users/drashna/rgb_matrix_stuff.c
@@ -1,5 +1,21 @@
1#include "drashna.h" 1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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 */
2 16
17#include "drashna.h"
18#include "rgb_matrix.h"
3#include "lib/lib8tion/lib8tion.h" 19#include "lib/lib8tion/lib8tion.h"
4extern led_config_t g_led_config; 20extern led_config_t g_led_config;
5 21
diff --git a/users/drashna/rgb_matrix_stuff.h b/users/drashna/rgb_matrix_stuff.h
index 35b01047b..592f9c9e6 100644
--- a/users/drashna/rgb_matrix_stuff.h
+++ b/users/drashna/rgb_matrix_stuff.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2#include "quantum.h" 18#include "quantum.h"
3 19
diff --git a/users/drashna/rgb_stuff.c b/users/drashna/rgb_stuff.c
index defee9ac1..d98f7cc2f 100644
--- a/users/drashna/rgb_stuff.c
+++ b/users/drashna/rgb_stuff.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "drashna.h" 17#include "drashna.h"
2#include "rgb_stuff.h" 18#include "rgb_stuff.h"
3#include "eeprom.h" 19#include "eeprom.h"
@@ -152,14 +168,15 @@ void matrix_scan_rgb_light(void) {
152 168
153void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) { 169void rgblight_set_hsv_and_mode(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode) {
154 rgblight_sethsv_noeeprom(hue, sat, val); 170 rgblight_sethsv_noeeprom(hue, sat, val);
155 wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly 171 // wait_us(175); // Add a slight delay between color and mode to ensure it's processed correctly
156 rgblight_mode_noeeprom(mode); 172 rgblight_mode_noeeprom(mode);
157} 173}
158 174
159layer_state_t layer_state_set_rgb_light(layer_state_t state) { 175layer_state_t layer_state_set_rgb_light(layer_state_t state) {
160#ifdef RGBLIGHT_ENABLE 176#ifdef RGBLIGHT_ENABLE
161 if (userspace_config.rgb_layer_change) { 177 if (userspace_config.rgb_layer_change) {
162 switch (get_highest_layer(state)) { 178 uint8_t mode = layer_state_cmp(state,_MODS) ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT;
179 switch (get_highest_layer(state|default_layer_state)) {
163 case _MACROS: 180 case _MACROS:
164 rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3); 181 rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3);
165 break; 182 break;
@@ -181,37 +198,30 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
181 case _ADJUST: 198 case _ADJUST:
182 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2); 199 rgblight_set_hsv_and_mode(HSV_RED, RGBLIGHT_MODE_KNIGHT + 2);
183 break; 200 break;
184 default: // for any other layers, or the default layer 201 case _COLEMAK:
185 { 202 rgblight_set_hsv_and_mode(HSV_MAGENTA, mode);
186 uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT; 203 break;
187 switch (get_highest_layer(default_layer_state)) { 204 case _DVORAK:
188 case _COLEMAK: 205 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode);
189 rgblight_set_hsv_and_mode(HSV_MAGENTA, mode); 206 break;
190 break; 207 case _WORKMAN:
191 case _DVORAK: 208 rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode);
192 rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode); 209 break;
193 break; 210 case _NORMAN:
194 case _WORKMAN: 211 rgblight_set_hsv_and_mode(HSV_CORAL, mode);
195 rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode); 212 break;
196 break; 213 case _MALTRON:
197 case _NORMAN: 214 rgblight_set_hsv_and_mode(HSV_YELLOW, mode);
198 rgblight_set_hsv_and_mode(HSV_CORAL, mode); 215 break;
199 break; 216 case _EUCALYN:
200 case _MALTRON: 217 rgblight_set_hsv_and_mode(HSV_PINK, mode);
201 rgblight_set_hsv_and_mode(HSV_YELLOW, mode); 218 break;
202 break; 219 case _CARPLAX:
203 case _EUCALYN: 220 rgblight_set_hsv_and_mode(HSV_BLUE, mode);
204 rgblight_set_hsv_and_mode(HSV_PINK, mode); 221 break;
205 break; 222 default:
206 case _CARPLAX: 223 rgblight_set_hsv_and_mode(HSV_CYAN, mode);
207 rgblight_set_hsv_and_mode(HSV_BLUE, mode);
208 break;
209 default:
210 rgblight_set_hsv_and_mode(HSV_CYAN, mode);
211 break;
212 }
213 break; 224 break;
214 }
215 } 225 }
216 } 226 }
217#endif // RGBLIGHT_ENABLE 227#endif // RGBLIGHT_ENABLE
diff --git a/users/drashna/rgb_stuff.h b/users/drashna/rgb_stuff.h
index 98a552db1..0153adb54 100644
--- a/users/drashna/rgb_stuff.h
+++ b/users/drashna/rgb_stuff.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2#include "quantum.h" 18#include "quantum.h"
3 19
diff --git a/users/drashna/rgblight_breathe_table.h b/users/drashna/rgblight_breathe_table.h
index 4c6ae38fa..b6f7a13ac 100644
--- a/users/drashna/rgblight_breathe_table.h
+++ b/users/drashna/rgblight_breathe_table.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE 17#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE
2#define RGBLIGHT_EFFECT_BREATHE_TABLE 18#define RGBLIGHT_EFFECT_BREATHE_TABLE
3 19
diff --git a/users/drashna/tap_dances.c b/users/drashna/tap_dances.c
index 65019ab75..01873489d 100644
--- a/users/drashna/tap_dances.c
+++ b/users/drashna/tap_dances.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "tap_dances.h" 17#include "tap_dances.h"
2 18
3#define NUM_OF_DIABLO_KEYS 4 19#define NUM_OF_DIABLO_KEYS 4
diff --git a/users/drashna/tap_dances.h b/users/drashna/tap_dances.h
index 44fa0b934..7f73f2803 100644
--- a/users/drashna/tap_dances.h
+++ b/users/drashna/tap_dances.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2#include "drashna.h" 18#include "drashna.h"
3 19
diff --git a/users/drashna/template.c b/users/drashna/template.c
index 833447daa..f98964ae4 100644
--- a/users/drashna/template.c
+++ b/users/drashna/template.c
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#include "template.h" 17#include "template.h"
2 18
3// Add reconfigurable functions here, for keymap customization 19// Add reconfigurable functions here, for keymap customization
diff --git a/users/drashna/template.h b/users/drashna/template.h
index 178f96e22..cb1ad75d8 100644
--- a/users/drashna/template.h
+++ b/users/drashna/template.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2 18
3#include QMK_KEYBOARD_H 19#include QMK_KEYBOARD_H
diff --git a/users/drashna/wrappers.h b/users/drashna/wrappers.h
index d22e2959c..ed4022aaa 100644
--- a/users/drashna/wrappers.h
+++ b/users/drashna/wrappers.h
@@ -1,3 +1,19 @@
1/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
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
1#pragma once 17#pragma once
2#include "drashna.h" 18#include "drashna.h"
3/* 19/*
@@ -17,6 +33,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro.
17#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__) 33#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
18#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__) 34#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
19#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__) 35#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
36#define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
20 37
21/* 38/*
22Blocks for each of the four major keyboard layouts 39Blocks for each of the four major keyboard layouts