summaryrefslogtreecommitdiff
path: root/keyboards/nightly_boards
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/nightly_boards')
-rw-r--r--keyboards/nightly_boards/adellein/adellein.c28
-rw-r--r--keyboards/nightly_boards/adellein/adellein.h20
-rw-r--r--keyboards/nightly_boards/adellein/config.h5
-rw-r--r--keyboards/nightly_boards/adellein/encoder_action.c47
-rw-r--r--keyboards/nightly_boards/adellein/encoder_action.h23
-rw-r--r--keyboards/nightly_boards/adellein/info.json63
-rw-r--r--keyboards/nightly_boards/adellein/keymaps/via/keymap.c30
-rw-r--r--keyboards/nightly_boards/adellein/keymaps/via/rules.mk3
-rw-r--r--keyboards/nightly_boards/adellein/rules.mk3
-rw-r--r--keyboards/nightly_boards/alter/rev1/config.h5
-rw-r--r--keyboards/nightly_boards/alter/rev1/info.json6
-rw-r--r--keyboards/nightly_boards/conde60/config.h1
-rw-r--r--keyboards/nightly_boards/conde60/info.json3
-rw-r--r--keyboards/nightly_boards/n2/config.h5
-rw-r--r--keyboards/nightly_boards/n2/info.json6
-rw-r--r--keyboards/nightly_boards/n40_o/config.h20
-rw-r--r--keyboards/nightly_boards/n40_o/encoder_action.c47
-rw-r--r--keyboards/nightly_boards/n40_o/encoder_action.h23
-rw-r--r--keyboards/nightly_boards/n40_o/info.json95
-rw-r--r--keyboards/nightly_boards/n40_o/keymaps/default/keymap.c5
-rw-r--r--keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_1x2u_c/keymap.c5
-rw-r--r--keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_encoders/keymap.c26
-rw-r--r--keyboards/nightly_boards/n40_o/keymaps/via/config.h1
-rw-r--r--keyboards/nightly_boards/n40_o/keymaps/via/keymap.c48
-rw-r--r--keyboards/nightly_boards/n40_o/keymaps/via/rules.mk2
-rw-r--r--keyboards/nightly_boards/n40_o/n40_o.c29
-rw-r--r--keyboards/nightly_boards/n40_o/rules.mk18
-rw-r--r--keyboards/nightly_boards/n60_s/config.h10
-rw-r--r--keyboards/nightly_boards/n60_s/encoder_action.c47
-rw-r--r--keyboards/nightly_boards/n60_s/encoder_action.h23
-rw-r--r--keyboards/nightly_boards/n60_s/info.json155
-rw-r--r--keyboards/nightly_boards/n60_s/keymaps/ansi_encoder/keymap.c34
-rw-r--r--keyboards/nightly_boards/n60_s/keymaps/tsangan_encoder/keymap.c34
-rw-r--r--keyboards/nightly_boards/n60_s/keymaps/via/keymap.c27
-rw-r--r--keyboards/nightly_boards/n60_s/keymaps/via/rules.mk1
-rw-r--r--keyboards/nightly_boards/n60_s/n60_s.c28
-rw-r--r--keyboards/nightly_boards/n60_s/n60_s.h20
-rw-r--r--keyboards/nightly_boards/n60_s/rules.mk3
-rw-r--r--keyboards/nightly_boards/n87/config.h5
-rw-r--r--keyboards/nightly_boards/n87/info.json6
-rw-r--r--keyboards/nightly_boards/n9/config.h5
-rw-r--r--keyboards/nightly_boards/n9/info.json6
-rw-r--r--keyboards/nightly_boards/octopad/config.h5
-rw-r--r--keyboards/nightly_boards/octopad/encoder_action.c47
-rw-r--r--keyboards/nightly_boards/octopad/encoder_action.h23
-rw-r--r--keyboards/nightly_boards/octopad/info.json29
-rw-r--r--keyboards/nightly_boards/octopad/keymaps/default/keymap.c15
-rw-r--r--keyboards/nightly_boards/octopad/keymaps/default/rules.mk1
-rw-r--r--keyboards/nightly_boards/octopad/keymaps/via/keymap.c62
-rw-r--r--keyboards/nightly_boards/octopad/keymaps/via/rules.mk3
-rw-r--r--keyboards/nightly_boards/octopad/octopad.c28
-rw-r--r--keyboards/nightly_boards/octopad/octopad.h20
-rw-r--r--keyboards/nightly_boards/octopad/rules.mk3
-rw-r--r--keyboards/nightly_boards/octopadplus/config.h2
-rw-r--r--keyboards/nightly_boards/octopadplus/info.json3
55 files changed, 169 insertions, 1043 deletions
diff --git a/keyboards/nightly_boards/adellein/adellein.c b/keyboards/nightly_boards/adellein/adellein.c
deleted file mode 100644
index 8ae826d49e..0000000000
--- a/keyboards/nightly_boards/adellein/adellein.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "adellein.h"
-
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
-}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
-// if (!encoder_update_user(index, clockwise)) return false;
- encoder_action_register(index, clockwise);
- return true;
-};
diff --git a/keyboards/nightly_boards/adellein/adellein.h b/keyboards/nightly_boards/adellein/adellein.h
deleted file mode 100644
index 33cf8e0b68..0000000000
--- a/keyboards/nightly_boards/adellein/adellein.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-#include "encoder_action.h"
diff --git a/keyboards/nightly_boards/adellein/config.h b/keyboards/nightly_boards/adellein/config.h
index d1703c1c80..6bcd3aafa3 100644
--- a/keyboards/nightly_boards/adellein/config.h
+++ b/keyboards/nightly_boards/adellein/config.h
@@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 14
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
@@ -29,10 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
-/* Encoders */
-#define ENCODERS_CW_KEY { { 3, 3 } }
-#define ENCODERS_CCW_KEY { { 1, 3 } }
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/nightly_boards/adellein/encoder_action.c b/keyboards/nightly_boards/adellein/encoder_action.c
deleted file mode 100644
index 522fb58d5a..0000000000
--- a/keyboards/nightly_boards/adellein/encoder_action.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "encoder_action.h"
-
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;
-
-void encoder_action_unregister(void) {
- for (int index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
diff --git a/keyboards/nightly_boards/adellein/encoder_action.h b/keyboards/nightly_boards/adellein/encoder_action.h
deleted file mode 100644
index fb22632632..0000000000
--- a/keyboards/nightly_boards/adellein/encoder_action.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-void encoder_action_unregister(void);
-
-void encoder_action_register(uint8_t index, bool clockwise); \ No newline at end of file
diff --git a/keyboards/nightly_boards/adellein/info.json b/keyboards/nightly_boards/adellein/info.json
index 81e21e9377..8d29f87163 100644
--- a/keyboards/nightly_boards/adellein/info.json
+++ b/keyboards/nightly_boards/adellein/info.json
@@ -18,6 +18,9 @@
{"pin_a": "C7", "pin_b": "C6"}
]
},
+ "rgblight": {
+ "led_count": 14
+ },
"ws2812": {
"pin": "D5"
},
@@ -80,66 +83,6 @@
{"matrix": [3, 9], "x": 10.75, "y": 3, "w": 1.25},
{"matrix": [3, 12], "x": 14.75, "y": 3, "w": 1.25}
]
- },
- "LAYOUT_40ergo_split_ent_encoder": {
- "layout": [
- {"matrix": [0, 0], "x": 0.5, "y": 0},
- {"matrix": [0, 1], "x": 1.5, "y": 0},
- {"matrix": [0, 2], "x": 2.5, "y": 0},
- {"matrix": [0, 3], "x": 3.5, "y": 0},
- {"matrix": [0, 4], "x": 4.5, "y": 0},
- {"matrix": [0, 5], "x": 5.5, "y": 0},
-
- {"matrix": [0, 6], "x": 8.25, "y": 0},
- {"matrix": [0, 7], "x": 9.25, "y": 0},
- {"matrix": [0, 8], "x": 10.25, "y": 0},
- {"matrix": [0, 9], "x": 11.25, "y": 0},
- {"matrix": [0, 10], "x": 12.25, "y": 0},
- {"matrix": [0, 11], "x": 13.25, "y": 0},
- {"matrix": [0, 12], "x": 14.25, "y": 0, "w": 1.5},
-
- {"matrix": [1, 0], "x": 0.25, "y": 1, "w": 1.25},
- {"matrix": [1, 1], "x": 1.5, "y": 1},
- {"matrix": [1, 2], "x": 2.5, "y": 1},
- {"matrix": [1, 3], "x": 3.5, "y": 1},
- {"matrix": [1, 4], "x": 4.5, "y": 1},
- {"matrix": [1, 5], "x": 5.5, "y": 1},
-
- {"matrix": [1, 6], "x": 8.75, "y": 1},
- {"matrix": [1, 7], "x": 9.75, "y": 1},
- {"matrix": [1, 8], "x": 10.75, "y": 1},
- {"matrix": [1, 9], "x": 11.75, "y": 1},
- {"matrix": [1, 10], "x": 12.75, "y": 1},
- {"matrix": [1, 11], "x": 13.75, "y": 1},
- {"matrix": [1, 12], "x": 14.75, "y": 1, "w": 1.25},
-
- {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"matrix": [2, 1], "x": 1.75, "y": 2},
- {"matrix": [2, 2], "x": 2.75, "y": 2},
- {"matrix": [2, 3], "x": 3.75, "y": 2},
- {"matrix": [2, 4], "x": 4.75, "y": 2},
- {"matrix": [2, 5], "x": 5.75, "y": 2},
-
- {"matrix": [2, 6], "x": 8.5, "y": 2},
- {"matrix": [2, 7], "x": 9.5, "y": 2},
- {"matrix": [2, 8], "x": 10.5, "y": 2},
- {"matrix": [2, 9], "x": 11.5, "y": 2},
- {"matrix": [2, 10], "x": 12.5, "y": 2},
- {"matrix": [2, 11], "x": 13.5, "y": 2},
- {"matrix": [2, 12], "x": 14.5, "y": 2, "w": 1.75},
-
- {"matrix": [3, 0], "x": 0.25, "y": 3, "w": 1.25},
- {"matrix": [3, 2], "x": 2.75, "y": 3, "w": 1.25},
- {"matrix": [3, 4], "x": 4, "y": 3, "w": 2.25},
- {"matrix": [3, 5], "x": 6.25, "y": 3},
-
- {"matrix": [3, 7], "x": 8, "y": 3, "w": 2.75},
- {"matrix": [3, 9], "x": 10.75, "y": 3, "w": 1.25},
- {"matrix": [3, 12], "x": 14.75, "y": 3, "w": 1.25},
-
- {"matrix": [3, 1], "x": 5.75, "y": 4},
- {"matrix": [3, 3], "x": 6.75, "y": 4}
- ]
}
}
}
diff --git a/keyboards/nightly_boards/adellein/keymaps/via/keymap.c b/keyboards/nightly_boards/adellein/keymaps/via/keymap.c
index c4c0adffe3..acfac215a4 100644
--- a/keyboards/nightly_boards/adellein/keymaps/via/keymap.c
+++ b/keyboards/nightly_boards/adellein/keymaps/via/keymap.c
@@ -15,35 +15,39 @@
*/
#include QMK_KEYBOARD_H
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_40ergo_split_ent_encoder(
+ [0] = LAYOUT_40ergo_split_ent(
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC,
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
- KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL,
- KC_VOLD, KC_VOLU
+ KC_LCTL, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL
),
- [1] = LAYOUT_40ergo_split_ent_encoder(
+ [1] = LAYOUT_40ergo_split_ent(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [2] = LAYOUT_40ergo_split_ent_encoder(
+ [2] = LAYOUT_40ergo_split_ent(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
- [3] = LAYOUT_40ergo_split_ent_encoder(
+ [3] = LAYOUT_40ergo_split_ent(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
+};
+#endif
diff --git a/keyboards/nightly_boards/adellein/keymaps/via/rules.mk b/keyboards/nightly_boards/adellein/keymaps/via/rules.mk
index 43061db1dd..1189f4ad19 100644
--- a/keyboards/nightly_boards/adellein/keymaps/via/rules.mk
+++ b/keyboards/nightly_boards/adellein/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
-LTO_ENABLE = yes \ No newline at end of file
+LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/nightly_boards/adellein/rules.mk b/keyboards/nightly_boards/adellein/rules.mk
index 8daf6a353a..aa619121b9 100644
--- a/keyboards/nightly_boards/adellein/rules.mk
+++ b/keyboards/nightly_boards/adellein/rules.mk
@@ -11,6 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
ENCODER_ENABLE = yes # Enable Rotary Encoders
LTO_ENABLE = yes
-
-# Added encoder Action
-SRC += encoder_action.c \ No newline at end of file
diff --git a/keyboards/nightly_boards/alter/rev1/config.h b/keyboards/nightly_boards/alter/rev1/config.h
index 6588633890..03c7b48e8e 100644
--- a/keyboards/nightly_boards/alter/rev1/config.h
+++ b/keyboards/nightly_boards/alter/rev1/config.h
@@ -14,11 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 18
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/nightly_boards/alter/rev1/info.json b/keyboards/nightly_boards/alter/rev1/info.json
index e0ea3294e9..3fcbc36a0b 100644
--- a/keyboards/nightly_boards/alter/rev1/info.json
+++ b/keyboards/nightly_boards/alter/rev1/info.json
@@ -18,6 +18,12 @@
"num_lock": "D7",
"scroll_lock": "B4"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 18,
+ "sleep": true
+ },
"ws2812": {
"pin": "F1"
},
diff --git a/keyboards/nightly_boards/conde60/config.h b/keyboards/nightly_boards/conde60/config.h
index 541d2e289e..3204c5492b 100644
--- a/keyboards/nightly_boards/conde60/config.h
+++ b/keyboards/nightly_boards/conde60/config.h
@@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 12
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/nightly_boards/conde60/info.json b/keyboards/nightly_boards/conde60/info.json
index e318151c8c..3c6369c243 100644
--- a/keyboards/nightly_boards/conde60/info.json
+++ b/keyboards/nightly_boards/conde60/info.json
@@ -13,6 +13,9 @@
"rows": ["B1", "B2", "F0", "F1", "F4"]
},
"diode_direction": "COL2ROW",
+ "rgblight": {
+ "led_count": 12
+ },
"ws2812": {
"pin": "D5"
},
diff --git a/keyboards/nightly_boards/n2/config.h b/keyboards/nightly_boards/n2/config.h
index 0fec21c752..03c7b48e8e 100644
--- a/keyboards/nightly_boards/n2/config.h
+++ b/keyboards/nightly_boards/n2/config.h
@@ -14,11 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 2
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/nightly_boards/n2/info.json b/keyboards/nightly_boards/n2/info.json
index f925eba577..ed30ba981f 100644
--- a/keyboards/nightly_boards/n2/info.json
+++ b/keyboards/nightly_boards/n2/info.json
@@ -13,6 +13,12 @@
"rows": ["F1", "C7"]
},
"diode_direction": "COL2ROW",
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 2,
+ "sleep": true
+ },
"ws2812": {
"pin": "D4"
},
diff --git a/keyboards/nightly_boards/n40_o/config.h b/keyboards/nightly_boards/n40_o/config.h
index 474742b6af..27a82c8acd 100644
--- a/keyboards/nightly_boards/n40_o/config.h
+++ b/keyboards/nightly_boards/n40_o/config.h
@@ -17,26 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 12
-#define RGBLIGHT_EFFECT_BREATHING
-#define RGBLIGHT_EFFECT_RAINBOW_MOOD
-#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
-#define RGBLIGHT_EFFECT_SNAKE
-#define RGBLIGHT_EFFECT_KNIGHT
-#define RGBLIGHT_EFFECT_CHRISTMAS
-#define RGBLIGHT_EFFECT_STATIC_GRADIENT
-#define RGBLIGHT_EFFECT_RGB_TEST
-#define RGBLIGHT_EFFECT_ALTERNATING
-#define RGBLIGHT_EFFECT_TWINKLE
-
-/* Encoders */
-#define ENCODERS_CW_KEY { { 2, 4 },{ 4, 4 },{ 6, 4 } }
-#define ENCODERS_CCW_KEY { { 1, 4 },{ 3, 4 },{ 5, 4 } }
-
-/* Audio */
-
-#define AUDIO_PIN B7
-
#define AUDIO_CLICKY
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
diff --git a/keyboards/nightly_boards/n40_o/encoder_action.c b/keyboards/nightly_boards/n40_o/encoder_action.c
deleted file mode 100644
index 522fb58d5a..0000000000
--- a/keyboards/nightly_boards/n40_o/encoder_action.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "encoder_action.h"
-
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;
-
-void encoder_action_unregister(void) {
- for (int index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
diff --git a/keyboards/nightly_boards/n40_o/encoder_action.h b/keyboards/nightly_boards/n40_o/encoder_action.h
deleted file mode 100644
index fb22632632..0000000000
--- a/keyboards/nightly_boards/n40_o/encoder_action.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-void encoder_action_unregister(void);
-
-void encoder_action_register(uint8_t index, bool clockwise); \ No newline at end of file
diff --git a/keyboards/nightly_boards/n40_o/info.json b/keyboards/nightly_boards/n40_o/info.json
index ec403fb647..1f341441a4 100644
--- a/keyboards/nightly_boards/n40_o/info.json
+++ b/keyboards/nightly_boards/n40_o/info.json
@@ -3,6 +3,16 @@
"manufacturer": "Neil Brian Ramirez",
"url": "",
"maintainer": "Neil Brian Ramirez",
+ "features": {
+ "bootmagic": true,
+ "mousekey": true,
+ "extrakey": true,
+ "rgblight": true,
+ "encoder": true
+ },
+ "build": {
+ "lto": true
+ },
"usb": {
"vid": "0xD812",
"pid": "0x0009",
@@ -10,7 +20,7 @@
},
"matrix_pins": {
"cols": ["B5", "C7", "D6", "D4", "B3", "B2", "B1", "B0", "D5", "D3", "D2", "D1", "D0"],
- "rows": ["E6", "F0", "F1", "D7", null]
+ "rows": ["E6", "F0", "F1", "D7"]
},
"diode_direction": "COL2ROW",
"encoder": {
@@ -20,77 +30,30 @@
{"pin_a": "B6", "pin_b": "C6"}
]
},
+ "rgblight": {
+ "led_count": 12,
+ "animations": {
+ "alternating": true,
+ "breathing": true,
+ "christmas": true,
+ "knight": true,
+ "rainbow_mood": true,
+ "rainbow_swirl": true,
+ "rgb_test": true,
+ "snake": true,
+ "static_gradient": true,
+ "twinkle": true
+ }
+ },
"ws2812": {
"pin": "B4"
},
+ "audio": {
+ "pins": ["B7"]
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
- "LAYOUT_ortho_4x13_encoders": {
- "layout": [
- {"matrix": [4, 1], "x": 0, "y": 0},
- {"matrix": [4, 2], "x": 1, "y": 0},
- {"matrix": [0, 0], "x": 2.25, "y": 0},
- {"matrix": [0, 1], "x": 3.5, "y": 0},
- {"matrix": [0, 2], "x": 4.5, "y": 0},
- {"matrix": [0, 3], "x": 5.5, "y": 0},
- {"matrix": [0, 4], "x": 6.5, "y": 0},
- {"matrix": [0, 5], "x": 7.5, "y": 0},
- {"matrix": [0, 6], "x": 8.5, "y": 0},
- {"matrix": [0, 7], "x": 9.5, "y": 0},
- {"matrix": [0, 8], "x": 10.5, "y": 0},
- {"matrix": [0, 9], "x": 11.5, "y": 0},
- {"matrix": [0, 10], "x": 12.5, "y": 0},
- {"matrix": [0, 11], "x": 13.5, "y": 0},
- {"matrix": [0, 12], "x": 14.5, "y": 0},
-
- {"matrix": [4, 3], "x": 0, "y": 1},
- {"matrix": [4, 4], "x": 1, "y": 1},
- {"matrix": [1, 0], "x": 2.25, "y": 1},
- {"matrix": [1, 1], "x": 3.5, "y": 1},
- {"matrix": [1, 2], "x": 4.5, "y": 1},
- {"matrix": [1, 3], "x": 5.5, "y": 1},
- {"matrix": [1, 4], "x": 6.5, "y": 1},
- {"matrix": [1, 5], "x": 7.5, "y": 1},
- {"matrix": [1, 6], "x": 8.5, "y": 1},
- {"matrix": [1, 7], "x": 9.5, "y": 1},
- {"matrix": [1, 8], "x": 10.5, "y": 1},
- {"matrix": [1, 9], "x": 11.5, "y": 1},
- {"matrix": [1, 10], "x": 12.5, "y": 1},
- {"matrix": [1, 11], "x": 13.5, "y": 1},
- {"matrix": [1, 12], "x": 14.5, "y": 1},
-
- {"matrix": [4, 5], "x": 0, "y": 2},
- {"matrix": [4, 6], "x": 1, "y": 2},
- {"matrix": [2, 0], "x": 2.25, "y": 2},
- {"matrix": [2, 1], "x": 3.5, "y": 2},
- {"matrix": [2, 2], "x": 4.5, "y": 2},
- {"matrix": [2, 3], "x": 5.5, "y": 2},
- {"matrix": [2, 4], "x": 6.5, "y": 2},
- {"matrix": [2, 5], "x": 7.5, "y": 2},
- {"matrix": [2, 6], "x": 8.5, "y": 2},
- {"matrix": [2, 7], "x": 9.5, "y": 2},
- {"matrix": [2, 8], "x": 10.5, "y": 2},
- {"matrix": [2, 9], "x": 11.5, "y": 2},
- {"matrix": [2, 10], "x": 12.5, "y": 2},
- {"matrix": [2, 11], "x": 13.5, "y": 2},
- {"matrix": [2, 12], "x": 14.5, "y": 2},
-
- {"matrix": [3, 0], "x": 2.25, "y": 3},
- {"matrix": [3, 1], "x": 3.5, "y": 3},
- {"matrix": [3, 2], "x": 4.5, "y": 3},
- {"matrix": [3, 3], "x": 5.5, "y": 3},
- {"matrix": [3, 4], "x": 6.5, "y": 3},
- {"matrix": [3, 5], "x": 7.5, "y": 3},
- {"matrix": [3, 6], "x": 8.5, "y": 3},
- {"matrix": [3, 7], "x": 9.5, "y": 3},
- {"matrix": [3, 8], "x": 10.5, "y": 3},
- {"matrix": [3, 9], "x": 11.5, "y": 3},
- {"matrix": [3, 10], "x": 12.5, "y": 3},
- {"matrix": [3, 11], "x": 13.5, "y": 3},
- {"matrix": [3, 12], "x": 14.5, "y": 3}
- ]
- },
"LAYOUT_ortho_4x13": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
diff --git a/keyboards/nightly_boards/n40_o/keymaps/default/keymap.c b/keyboards/nightly_boards/n40_o/keymaps/default/keymap.c
index 658b43689a..bd57f61055 100644
--- a/keyboards/nightly_boards/n40_o/keymaps/default/keymap.c
+++ b/keyboards/nightly_boards/n40_o/keymaps/default/keymap.c
@@ -15,12 +15,11 @@
*/
#include QMK_KEYBOARD_H
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x13(
KC_SPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_SPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_SPC, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
- ),
+ KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ )
};
diff --git a/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_1x2u_c/keymap.c b/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_1x2u_c/keymap.c
index 55f22cdc49..cda2bb6050 100644
--- a/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_1x2u_c/keymap.c
+++ b/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_1x2u_c/keymap.c
@@ -15,12 +15,11 @@
*/
#include QMK_KEYBOARD_H
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_ortho_4x13_1x2u_c(
KC_SPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_SPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_SPC, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
- ),
+ KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ )
};
diff --git a/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_encoders/keymap.c b/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_encoders/keymap.c
deleted file mode 100644
index f6e0dc23ee..0000000000
--- a/keyboards/nightly_boards/n40_o/keymaps/ortho_4x13_encoders/keymap.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include QMK_KEYBOARD_H
-
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_ortho_4x13_encoders(
- KC_SPC, KC_SPC, KC_SPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_SPC, KC_SPC, KC_SPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
- KC_SPC, KC_SPC, KC_SPC, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
- ),
-};
diff --git a/keyboards/nightly_boards/n40_o/keymaps/via/config.h b/keyboards/nightly_boards/n40_o/keymaps/via/config.h
deleted file mode 100644
index 1208e2769f..0000000000
--- a/keyboards/nightly_boards/n40_o/keymaps/via/config.h
+++ /dev/null
@@ -1 +0,0 @@
-#define LAYER_STATE_8BIT \ No newline at end of file
diff --git a/keyboards/nightly_boards/n40_o/keymaps/via/keymap.c b/keyboards/nightly_boards/n40_o/keymaps/via/keymap.c
index 830d8d8782..e9ddb71401 100644
--- a/keyboards/nightly_boards/n40_o/keymaps/via/keymap.c
+++ b/keyboards/nightly_boards/n40_o/keymaps/via/keymap.c
@@ -15,34 +15,24 @@
*/
#include QMK_KEYBOARD_H
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_ortho_4x13_encoders(
- KC_SPC, KC_SPC, KC_SPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- KC_SPC, KC_SPC, KC_SPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
- KC_SPC, KC_SPC, KC_SPC, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
- KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
-
- ),
- [1] = LAYOUT_ortho_4x13_encoders(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [2] = LAYOUT_ortho_4x13_encoders(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [3] = LAYOUT_ortho_4x13_encoders(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
+ [0] = LAYOUT_ortho_4x13(
+ KC_SPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_SPC, KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_SPC, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ KC_SPC, KC_SPC, KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+ ),
+ [1] = LAYOUT_ortho_4x13(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+ )
+};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT) },
+ [1] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI), ENCODER_CCW_CW(RGB_SAD, RGB_SAI), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) }
};
+#endif
diff --git a/keyboards/nightly_boards/n40_o/keymaps/via/rules.mk b/keyboards/nightly_boards/n40_o/keymaps/via/rules.mk
index 43061db1dd..f1adcab005 100644
--- a/keyboards/nightly_boards/n40_o/keymaps/via/rules.mk
+++ b/keyboards/nightly_boards/n40_o/keymaps/via/rules.mk
@@ -1,2 +1,2 @@
VIA_ENABLE = yes
-LTO_ENABLE = yes \ No newline at end of file
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/nightly_boards/n40_o/n40_o.c b/keyboards/nightly_boards/n40_o/n40_o.c
deleted file mode 100644
index 643803f903..0000000000
--- a/keyboards/nightly_boards/n40_o/n40_o.c
+++ /dev/null
@@ -1,29 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-#include "encoder_action.h"
-
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
-}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
-// if (!encoder_update_user(index, clockwise)) return false;
- encoder_action_register(index, clockwise);
- return true;
-};
diff --git a/keyboards/nightly_boards/n40_o/rules.mk b/keyboards/nightly_boards/n40_o/rules.mk
index f1189a87d2..6e7633bfe0 100644
--- a/keyboards/nightly_boards/n40_o/rules.mk
+++ b/keyboards/nightly_boards/n40_o/rules.mk
@@ -1,17 +1 @@
-# Build Options
-# change yes to no to disable
-#
-BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
-MOUSEKEY_ENABLE = yes # Mouse keys
-EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = no # Console for debug
-COMMAND_ENABLE = no # Commands for debug and configuration
-NKRO_ENABLE = no # Enable N-Key Rollover
-BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
-RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
-AUDIO_ENABLE = yes # Audio output
-ENCODER_ENABLE = yes # Enable Rotary Encoders
-LTO_ENABLE = yes
-
-# Added encoder Action
-SRC += encoder_action.c \ No newline at end of file
+# This file intentionally left blank
diff --git a/keyboards/nightly_boards/n60_s/config.h b/keyboards/nightly_boards/n60_s/config.h
index 75f803f548..26f02e471f 100644
--- a/keyboards/nightly_boards/n60_s/config.h
+++ b/keyboards/nightly_boards/n60_s/config.h
@@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-/* Encoders */
-#define ENCODERS_CW_KEY { { 1, 5 } }
-#define ENCODERS_CCW_KEY { { 0, 5 } }
-
/* Audio */
#define B7_AUDIO
@@ -28,12 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* Underglow */
-#define RGBLED_NUM 12
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
-
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/nightly_boards/n60_s/encoder_action.c b/keyboards/nightly_boards/n60_s/encoder_action.c
deleted file mode 100644
index 522fb58d5a..0000000000
--- a/keyboards/nightly_boards/n60_s/encoder_action.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "encoder_action.h"
-
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;
-
-void encoder_action_unregister(void) {
- for (int index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
diff --git a/keyboards/nightly_boards/n60_s/encoder_action.h b/keyboards/nightly_boards/n60_s/encoder_action.h
deleted file mode 100644
index fb22632632..0000000000
--- a/keyboards/nightly_boards/n60_s/encoder_action.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-void encoder_action_unregister(void);
-
-void encoder_action_register(uint8_t index, bool clockwise); \ No newline at end of file
diff --git a/keyboards/nightly_boards/n60_s/info.json b/keyboards/nightly_boards/n60_s/info.json
index 2e49134300..c17db5701b 100644
--- a/keyboards/nightly_boards/n60_s/info.json
+++ b/keyboards/nightly_boards/n60_s/info.json
@@ -10,7 +10,7 @@
},
"matrix_pins": {
"cols": ["F7", "F6", "F5", "F4", "F1", "F0", "B0", "B1", "B2", "B3", "B5", "B6", "C6", "C7"],
- "rows": ["B4", "D7", "D6", "D0", "E6", null]
+ "rows": ["B4", "D7", "D6", "D0", "E6"]
},
"diode_direction": "COL2ROW",
"encoder": {
@@ -18,6 +18,12 @@
{"pin_a": "D3", "pin_b": "D5"}
]
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 12,
+ "sleep": true
+ },
"ws2812": {
"pin": "D1"
},
@@ -95,80 +101,6 @@
{"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
]
},
- "LAYOUT_60_ansi_split_bs_rshift_encoder": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 1], "x": 1, "y": 0},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0},
- {"matrix": [0, 5], "x": 5, "y": 0},
- {"matrix": [0, 6], "x": 6, "y": 0},
- {"matrix": [0, 7], "x": 7, "y": 0},
- {"matrix": [0, 8], "x": 8, "y": 0},
- {"matrix": [0, 9], "x": 9, "y": 0},
- {"matrix": [0, 10], "x": 10, "y": 0},
- {"matrix": [0, 11], "x": 11, "y": 0},
- {"matrix": [0, 12], "x": 12, "y": 0},
- {"matrix": [0, 13], "x": 13, "y": 0},
- {"matrix": [1, 13], "x": 14, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"matrix": [1, 1], "x": 1.5, "y": 1},
- {"matrix": [1, 2], "x": 2.5, "y": 1},
- {"matrix": [1, 3], "x": 3.5, "y": 1},
- {"matrix": [1, 4], "x": 4.5, "y": 1},
- {"matrix": [1, 5], "x": 5.5, "y": 1},
- {"matrix": [1, 6], "x": 6.5, "y": 1},
- {"matrix": [1, 7], "x": 7.5, "y": 1},
- {"matrix": [1, 8], "x": 8.5, "y": 1},
- {"matrix": [1, 9], "x": 9.5, "y": 1},
- {"matrix": [1, 10], "x": 10.5, "y": 1},
- {"matrix": [1, 11], "x": 11.5, "y": 1},
- {"matrix": [1, 12], "x": 12.5, "y": 1},
- {"matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"matrix": [2, 1], "x": 1.75, "y": 2},
- {"matrix": [2, 2], "x": 2.75, "y": 2},
- {"matrix": [2, 3], "x": 3.75, "y": 2},
- {"matrix": [2, 4], "x": 4.75, "y": 2},
- {"matrix": [2, 5], "x": 5.75, "y": 2},
- {"matrix": [2, 6], "x": 6.75, "y": 2},
- {"matrix": [2, 7], "x": 7.75, "y": 2},
- {"matrix": [2, 8], "x": 8.75, "y": 2},
- {"matrix": [2, 9], "x": 9.75, "y": 2},
- {"matrix": [2, 10], "x": 10.75, "y": 2},
- {"matrix": [2, 11], "x": 11.75, "y": 2},
- {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25},
-
- {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"matrix": [3, 2], "x": 2.25, "y": 3},
- {"matrix": [3, 3], "x": 3.25, "y": 3},
- {"matrix": [3, 4], "x": 4.25, "y": 3},
- {"matrix": [3, 5], "x": 5.25, "y": 3},
- {"matrix": [3, 6], "x": 6.25, "y": 3},
- {"matrix": [3, 7], "x": 7.25, "y": 3},
- {"matrix": [3, 8], "x": 8.25, "y": 3},
- {"matrix": [3, 9], "x": 9.25, "y": 3},
- {"matrix": [3, 10], "x": 10.25, "y": 3},
- {"matrix": [3, 11], "x": 11.25, "y": 3},
- {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
- {"matrix": [3, 13], "x": 14, "y": 3},
-
- {"matrix": [5, 0], "x": 15.25, "y": 3},
- {"matrix": [5, 1], "x": 16.25, "y": 3},
-
- {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.25},
- {"matrix": [4, 2], "x": 1.25, "y": 4, "w": 1.25},
- {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.25},
- {"matrix": [4, 7], "x": 3.75, "y": 4, "w": 6.25},
- {"matrix": [4, 10], "x": 10, "y": 4, "w": 1.25},
- {"matrix": [4, 11], "x": 11.25, "y": 4, "w": 1.25},
- {"matrix": [4, 12], "x": 12.5, "y": 4, "w": 1.25},
- {"matrix": [4, 13], "x": 13.75, "y": 4, "w": 1.25}
- ]
- },
"LAYOUT_60_ansi_split_bs_rshift_tsangan": {
"layout": [
{"matrix": [0, 0], "x": 0, "y": 0},
@@ -238,79 +170,6 @@
{"matrix": [4, 12], "x": 12.5, "y": 4},
{"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
]
- },
- "LAYOUT_60_ansi_split_bs_rshift_tsangan_encoder": {
- "layout": [
- {"matrix": [0, 0], "x": 0, "y": 0},
- {"matrix": [0, 1], "x": 1, "y": 0},
- {"matrix": [0, 2], "x": 2, "y": 0},
- {"matrix": [0, 3], "x": 3, "y": 0},
- {"matrix": [0, 4], "x": 4, "y": 0},
- {"matrix": [0, 5], "x": 5, "y": 0},
- {"matrix": [0, 6], "x": 6, "y": 0},
- {"matrix": [0, 7], "x": 7, "y": 0},
- {"matrix": [0, 8], "x": 8, "y": 0},
- {"matrix": [0, 9], "x": 9, "y": 0},
- {"matrix": [0, 10], "x": 10, "y": 0},
- {"matrix": [0, 11], "x": 11, "y": 0},
- {"matrix": [0, 12], "x": 12, "y": 0},
- {"matrix": [0, 13], "x": 13, "y": 0},
- {"matrix": [1, 13], "x": 14, "y": 0},
-
- {"matrix": [1, 0], "x": 0, "y": 1, "w": 1.5},
- {"matrix": [1, 1], "x": 1.5, "y": 1},
- {"matrix": [1, 2], "x": 2.5, "y": 1},
- {"matrix": [1, 3], "x": 3.5, "y": 1},
- {"matrix": [1, 4], "x": 4.5, "y": 1},
- {"matrix": [1, 5], "x": 5.5, "y": 1},
- {"matrix": [1, 6], "x": 6.5, "y": 1},
- {"matrix": [1, 7], "x": 7.5, "y": 1},
- {"matrix": [1, 8], "x": 8.5, "y": 1},
- {"matrix": [1, 9], "x": 9.5, "y": 1},
- {"matrix": [1, 10], "x": 10.5, "y": 1},
- {"matrix": [1, 11], "x": 11.5, "y": 1},
- {"matrix": [1, 12], "x": 12.5, "y": 1},
- {"matrix": [2, 13], "x": 13.5, "y": 1, "w": 1.5},
-
- {"matrix": [2, 0], "x": 0, "y": 2, "w": 1.75},
- {"matrix": [2, 1], "x": 1.75, "y": 2},
- {"matrix": [2, 2], "x": 2.75, "y": 2},
- {"matrix": [2, 3], "x": 3.75, "y": 2},
- {"matrix": [2, 4], "x": 4.75, "y": 2},
- {"matrix": [2, 5], "x": 5.75, "y": 2},
- {"matrix": [2, 6], "x": 6.75, "y": 2},
- {"matrix": [2, 7], "x": 7.75, "y": 2},
- {"matrix": [2, 8], "x": 8.75, "y": 2},
- {"matrix": [2, 9], "x": 9.75, "y": 2},
- {"matrix": [2, 10], "x": 10.75, "y": 2},
- {"matrix": [2, 11], "x": 11.75, "y": 2},
- {"matrix": [2, 12], "x": 12.75, "y": 2, "w": 2.25},
-
- {"matrix": [3, 0], "x": 0, "y": 3, "w": 2.25},
- {"matrix": [3, 2], "x": 2.25, "y": 3},
- {"matrix": [3, 3], "x": 3.25, "y": 3},
- {"matrix": [3, 4], "x": 4.25, "y": 3},
- {"matrix": [3, 5], "x": 5.25, "y": 3},
- {"matrix": [3, 6], "x": 6.25, "y": 3},
- {"matrix": [3, 7], "x": 7.25, "y": 3},
- {"matrix": [3, 8], "x": 8.25, "y": 3},
- {"matrix": [3, 9], "x": 9.25, "y": 3},
- {"matrix": [3, 10], "x": 10.25, "y": 3},
- {"matrix": [3, 11], "x": 11.25, "y": 3},
- {"matrix": [3, 12], "x": 12.25, "y": 3, "w": 1.75},
- {"matrix": [3, 13], "x": 14, "y": 3},
-
- {"matrix": [5, 0], "x": 15.25, "y": 3},
- {"matrix": [5, 1], "x": 16.25, "y": 3},
-
- {"matrix": [4, 0], "x": 0, "y": 4, "w": 1.5},
- {"matrix": [4, 2], "x": 1.5, "y": 4},
- {"matrix": [4, 3], "x": 2.5, "y": 4, "w": 1.5},
- {"matrix": [4, 7], "x": 4, "y": 4, "w": 7},
- {"matrix": [4, 11], "x": 11, "y": 4, "w": 1.5},
- {"matrix": [4, 12], "x": 12.5, "y": 4},
- {"matrix": [4, 13], "x": 13.5, "y": 4, "w": 1.5}
- ]
}
}
}
diff --git a/keyboards/nightly_boards/n60_s/keymaps/ansi_encoder/keymap.c b/keyboards/nightly_boards/n60_s/keymaps/ansi_encoder/keymap.c
deleted file mode 100644
index 9316b20c75..0000000000
--- a/keyboards/nightly_boards/n60_s/keymaps/ansi_encoder/keymap.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Base */
- [0] = LAYOUT_60_ansi_split_bs_rshift_encoder(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_VOLD, KC_VOLU,
- KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_APP, KC_RGUI, KC_RCTL
- ),
- [1] = LAYOUT_60_ansi_split_bs_rshift_encoder(
- QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
- KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
- )
-};
diff --git a/keyboards/nightly_boards/n60_s/keymaps/tsangan_encoder/keymap.c b/keyboards/nightly_boards/n60_s/keymaps/tsangan_encoder/keymap.c
deleted file mode 100644
index cc25ac42e7..0000000000
--- a/keyboards/nightly_boards/n60_s/keymaps/tsangan_encoder/keymap.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-#include QMK_KEYBOARD_H
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Base */
- [0] = LAYOUT_60_ansi_split_bs_rshift_tsangan_encoder(
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_VOLD, KC_VOLU,
- KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL
- ),
- [1] = LAYOUT_60_ansi_split_bs_rshift_tsangan_encoder(
- QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
- KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
- )
-};
diff --git a/keyboards/nightly_boards/n60_s/keymaps/via/keymap.c b/keyboards/nightly_boards/n60_s/keymaps/via/keymap.c
index d76c734782..04078c784e 100644
--- a/keyboards/nightly_boards/n60_s/keymaps/via/keymap.c
+++ b/keyboards/nightly_boards/n60_s/keymaps/via/keymap.c
@@ -17,32 +17,41 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
- [0] = LAYOUT_60_ansi_split_bs_rshift_encoder(
+ [0] = LAYOUT_60_ansi_split_bs_rshift(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT, KC_VOLD, KC_VOLU,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LSFT,
KC_LCTL, MO(1), KC_LALT, KC_SPC, KC_LALT, KC_APP, KC_RGUI, KC_LCTL
),
- [1] = LAYOUT_60_ansi_split_bs_rshift_encoder(
+ [1] = LAYOUT_60_ansi_split_bs_rshift(
QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_F12, KC_DEL, KC_DEL,
KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_PGDN, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
- ),
- [2] = LAYOUT_60_ansi_split_bs_rshift_encoder(
+ ),
+ [2] = LAYOUT_60_ansi_split_bs_rshift(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
),
- [3] = LAYOUT_60_ansi_split_bs_rshift_encoder(
+ [3] = LAYOUT_60_ansi_split_bs_rshift(
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS
)
};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
+ [1] = { ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) },
+};
+#endif
diff --git a/keyboards/nightly_boards/n60_s/keymaps/via/rules.mk b/keyboards/nightly_boards/n60_s/keymaps/via/rules.mk
index 36b7ba9cbc..1189f4ad19 100644
--- a/keyboards/nightly_boards/n60_s/keymaps/via/rules.mk
+++ b/keyboards/nightly_boards/n60_s/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/nightly_boards/n60_s/n60_s.c b/keyboards/nightly_boards/n60_s/n60_s.c
deleted file mode 100644
index dd0d23425b..0000000000
--- a/keyboards/nightly_boards/n60_s/n60_s.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "n60_s.h"
-
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
-}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
-// if (!encoder_update_user(index, clockwise)) return false;
- encoder_action_register(index, clockwise);
- return true;
-};
diff --git a/keyboards/nightly_boards/n60_s/n60_s.h b/keyboards/nightly_boards/n60_s/n60_s.h
deleted file mode 100644
index 33cf8e0b68..0000000000
--- a/keyboards/nightly_boards/n60_s/n60_s.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-#include "encoder_action.h"
diff --git a/keyboards/nightly_boards/n60_s/rules.mk b/keyboards/nightly_boards/n60_s/rules.mk
index a37378959e..f404ad0163 100644
--- a/keyboards/nightly_boards/n60_s/rules.mk
+++ b/keyboards/nightly_boards/n60_s/rules.mk
@@ -12,6 +12,3 @@ RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
ENCODER_ENABLE = yes # Enable Rotary Encoders
LTO_ENABLE = yes
-
-# Added encoder Action
-SRC += encoder_action.c \ No newline at end of file
diff --git a/keyboards/nightly_boards/n87/config.h b/keyboards/nightly_boards/n87/config.h
index 3ba7c40ea6..66fefbb2ef 100644
--- a/keyboards/nightly_boards/n87/config.h
+++ b/keyboards/nightly_boards/n87/config.h
@@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 16
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/nightly_boards/n87/info.json b/keyboards/nightly_boards/n87/info.json
index 1be9d83f1c..352719c253 100644
--- a/keyboards/nightly_boards/n87/info.json
+++ b/keyboards/nightly_boards/n87/info.json
@@ -13,6 +13,12 @@
"rows": ["B0", "B1", "B2", "B3", "F1", "F0", "D7", "B4", "D1", "D2", "D3", "D5"]
},
"diode_direction": "COL2ROW",
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 16,
+ "sleep": true
+ },
"ws2812": {
"pin": "D0"
},
diff --git a/keyboards/nightly_boards/n9/config.h b/keyboards/nightly_boards/n9/config.h
index 30f781e600..03c7b48e8e 100644
--- a/keyboards/nightly_boards/n9/config.h
+++ b/keyboards/nightly_boards/n9/config.h
@@ -14,11 +14,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 8
-#define RGBLIGHT_HUE_STEP 8
-#define RGBLIGHT_SAT_STEP 8
-#define RGBLIGHT_VAL_STEP 8
-#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
diff --git a/keyboards/nightly_boards/n9/info.json b/keyboards/nightly_boards/n9/info.json
index 1dfd4f6fda..0e26ab27af 100644
--- a/keyboards/nightly_boards/n9/info.json
+++ b/keyboards/nightly_boards/n9/info.json
@@ -13,6 +13,12 @@
"rows": ["F4", "B1", "B3"]
},
"diode_direction": "COL2ROW",
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 8,
+ "sleep": true
+ },
"ws2812": {
"pin": "F5"
},
diff --git a/keyboards/nightly_boards/octopad/config.h b/keyboards/nightly_boards/octopad/config.h
index 27c3d4bd02..b8b9535fb0 100644
--- a/keyboards/nightly_boards/octopad/config.h
+++ b/keyboards/nightly_boards/octopad/config.h
@@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define RGBLED_NUM 8
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
@@ -29,10 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_EFFECT_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
-/* Encoders */
-#define ENCODERS_CW_KEY { { 3, 2 },{ 1, 2 } }
-#define ENCODERS_CCW_KEY { { 2, 2 },{ 0, 2 } }
-
/* Audio */
#define AUDIO_PIN B5
diff --git a/keyboards/nightly_boards/octopad/encoder_action.c b/keyboards/nightly_boards/octopad/encoder_action.c
deleted file mode 100644
index 522fb58d5a..0000000000
--- a/keyboards/nightly_boards/octopad/encoder_action.c
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "encoder_action.h"
-
-static uint8_t encoder_state[NUM_ENCODERS] = {0};
-static keypos_t encoder_cw[NUM_ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[NUM_ENCODERS] = ENCODERS_CCW_KEY;
-
-void encoder_action_unregister(void) {
- for (int index = 0; index < NUM_ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = timer_read(),
- .type = KEY_EVENT
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-}
diff --git a/keyboards/nightly_boards/octopad/encoder_action.h b/keyboards/nightly_boards/octopad/encoder_action.h
deleted file mode 100644
index fb22632632..0000000000
--- a/keyboards/nightly_boards/octopad/encoder_action.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-
-void encoder_action_unregister(void);
-
-void encoder_action_register(uint8_t index, bool clockwise); \ No newline at end of file
diff --git a/keyboards/nightly_boards/octopad/info.json b/keyboards/nightly_boards/octopad/info.json
index c78a58937d..db2b62c165 100644
--- a/keyboards/nightly_boards/octopad/info.json
+++ b/keyboards/nightly_boards/octopad/info.json
@@ -10,7 +10,7 @@
},
"matrix_pins": {
"cols": ["F1", "F0", "D0", "D1", "B1"],
- "rows": ["B2", "B3", null]
+ "rows": ["B2", "B3"]
},
"diode_direction": "COL2ROW",
"encoder": {
@@ -19,6 +19,9 @@
{"pin_a": "F4", "pin_b": "F5"}
]
},
+ "rgblight": {
+ "led_count": 8
+ },
"ws2812": {
"pin": "F7"
},
@@ -27,23 +30,19 @@
"layouts": {
"LAYOUT": {
"layout": [
- {"matrix": [2, 0], "x": 0, "y": 0},
- {"matrix": [0, 4], "x": 1, "y": 0},
- {"matrix": [2, 1], "x": 2, "y": 0},
+ {"matrix": [0, 4], "x": 0, "y": 0},
- {"matrix": [2, 2], "x": 3.5, "y": 0},
- {"matrix": [1, 4], "x": 4.5, "y": 0},
- {"matrix": [2, 3], "x": 5.5, "y": 0},
+ {"matrix": [1, 4], "x": 3.5, "y": 0},
- {"matrix": [0, 0], "x": 1.25, "y": 1.25},
- {"matrix": [0, 1], "x": 2.25, "y": 1.25},
- {"matrix": [0, 2], "x": 3.25, "y": 1.25},
- {"matrix": [0, 3], "x": 4.25, "y": 1.25},
+ {"matrix": [0, 0], "x": 0.25, "y": 1.25},
+ {"matrix": [0, 1], "x": 1.25, "y": 1.25},
+ {"matrix": [0, 2], "x": 2.25, "y": 1.25},
+ {"matrix": [0, 3], "x": 3.25, "y": 1.25},
- {"matrix": [1, 0], "x": 1.25, "y": 2.25},
- {"matrix": [1, 1], "x": 2.25, "y": 2.25},
- {"matrix": [1, 2], "x": 3.25, "y": 2.25},
- {"matrix": [1, 3], "x": 4.25, "y": 2.25}
+ {"matrix": [1, 0], "x": 0.25, "y": 2.25},
+ {"matrix": [1, 1], "x": 1.25, "y": 2.25},
+ {"matrix": [1, 2], "x": 2.25, "y": 2.25},
+ {"matrix": [1, 3], "x": 3.25, "y": 2.25}
]
}
}
diff --git a/keyboards/nightly_boards/octopad/keymaps/default/keymap.c b/keyboards/nightly_boards/octopad/keymaps/default/keymap.c
index 7025c89375..94d8dc34f4 100644
--- a/keyboards/nightly_boards/octopad/keymaps/default/keymap.c
+++ b/keyboards/nightly_boards/octopad/keymaps/default/keymap.c
@@ -17,16 +17,15 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Base */
- /* ENC1_CCW, ENC1_P, ENC1_CW, ENC2_CCW, ENC2_P, ENC2_CW,
- MACRO1, MACRO2, MACRO3, MACRO4,
- MACRO5, MACRO6, MACRO7, MACRO8
- */
[0] = LAYOUT(
- KC_VOLD, KC_ESC, KC_VOLU, KC_BRID, QK_BOOT, KC_BRIU,
+ KC_ESC, QK_BOOT,
KC_Q, KC_W, KC_E, KC_R,
KC_A, KC_S, KC_D, KC_F
-
- ),
+ )
};
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }
+};
+#endif
diff --git a/keyboards/nightly_boards/octopad/keymaps/default/rules.mk b/keyboards/nightly_boards/octopad/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/nightly_boards/octopad/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/nightly_boards/octopad/keymaps/via/keymap.c b/keyboards/nightly_boards/octopad/keymaps/via/keymap.c
index 44c2d63cc7..2f831466fc 100644
--- a/keyboards/nightly_boards/octopad/keymaps/via/keymap.c
+++ b/keyboards/nightly_boards/octopad/keymaps/via/keymap.c
@@ -17,57 +17,21 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Base */
- /* ENC1_CCW, ENC1_P, ENC1_CW, ENC2_CCW, ENC2_P, ENC2_CW,
- MACRO1, MACRO2, MACRO3, MACRO4,
- MACRO5, MACRO6, MACRO7, MACRO8
- */
[0] = LAYOUT(
- KC_VOLD, KC_ESC, KC_VOLU, KC_BRID, QK_BOOT, KC_BRIU,
+ KC_ESC, QK_BOOT,
KC_Q, KC_W, KC_E, KC_R,
KC_A, KC_S, KC_D, KC_F
-
- ),
- [1] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [2] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [3] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [4] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [5] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [6] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
- ),
- [7] = LAYOUT(
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
-
),
+ [1 ... 7] = LAYOUT(
+ _______, _______,
+ _______, _______, _______, _______,
+ _______, _______, _______, _______
+ )
+};
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_BRID, KC_BRIU) },
+ [1 ... 7] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) }
};
+#endif
diff --git a/keyboards/nightly_boards/octopad/keymaps/via/rules.mk b/keyboards/nightly_boards/octopad/keymaps/via/rules.mk
index 43061db1dd..1189f4ad19 100644
--- a/keyboards/nightly_boards/octopad/keymaps/via/rules.mk
+++ b/keyboards/nightly_boards/octopad/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
-LTO_ENABLE = yes \ No newline at end of file
+LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/nightly_boards/octopad/octopad.c b/keyboards/nightly_boards/octopad/octopad.c
deleted file mode 100644
index e05782677e..0000000000
--- a/keyboards/nightly_boards/octopad/octopad.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "octopad.h"
-
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
-}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
-// if (!encoder_update_user(index, clockwise)) return false;
- encoder_action_register(index, clockwise);
- return true;
-};
diff --git a/keyboards/nightly_boards/octopad/octopad.h b/keyboards/nightly_boards/octopad/octopad.h
deleted file mode 100644
index 33cf8e0b68..0000000000
--- a/keyboards/nightly_boards/octopad/octopad.h
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#pragma once
-
-#include "quantum.h"
-#include "encoder_action.h"
diff --git a/keyboards/nightly_boards/octopad/rules.mk b/keyboards/nightly_boards/octopad/rules.mk
index d36fbdc860..660f934499 100644
--- a/keyboards/nightly_boards/octopad/rules.mk
+++ b/keyboards/nightly_boards/octopad/rules.mk
@@ -12,6 +12,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = yes # Audio output
ENCODER_ENABLE = yes # Enable Rotary Encoders
-
-# Added encoder Action
-SRC += encoder_action.c
diff --git a/keyboards/nightly_boards/octopadplus/config.h b/keyboards/nightly_boards/octopadplus/config.h
index 7547d5a97b..3d0b7f438c 100644
--- a/keyboards/nightly_boards/octopadplus/config.h
+++ b/keyboards/nightly_boards/octopadplus/config.h
@@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define TAP_CODE_DELAY 10
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/nightly_boards/octopadplus/info.json b/keyboards/nightly_boards/octopadplus/info.json
index 533cefc3c1..7a27cef020 100644
--- a/keyboards/nightly_boards/octopadplus/info.json
+++ b/keyboards/nightly_boards/octopadplus/info.json
@@ -19,6 +19,9 @@
{"pin_a": "D1", "pin_b": "D0", "resolution": 5}
]
},
+ "qmk": {
+ "tap_keycode_delay": 10
+ },
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"rgblight": {