summaryrefslogtreecommitdiff
path: root/keyboards/takashicompany
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/takashicompany')
-rw-r--r--keyboards/takashicompany/center_enter/config.h5
-rw-r--r--keyboards/takashicompany/center_enter/info.json6
-rw-r--r--keyboards/takashicompany/compacx/config.h6
-rw-r--r--keyboards/takashicompany/compacx/info.json7
-rw-r--r--keyboards/takashicompany/dogtag/dogtag.c48
-rw-r--r--keyboards/takashicompany/dogtag/info.json8
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/default/keymap.c17
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/default/rules.mk1
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/via/keymap.c13
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/via/rules.mk1
-rw-r--r--keyboards/takashicompany/endzone34/config.h5
-rw-r--r--keyboards/takashicompany/endzone34/info.json6
-rw-r--r--keyboards/takashicompany/endzone34/rules.mk1
-rw-r--r--keyboards/takashicompany/heavy_left/config.h6
-rw-r--r--keyboards/takashicompany/heavy_left/info.json7
-rw-r--r--keyboards/takashicompany/minizone/config.h5
-rw-r--r--keyboards/takashicompany/minizone/info.json6
-rw-r--r--keyboards/takashicompany/minizone/rules.mk2
-rw-r--r--keyboards/takashicompany/qoolee/config.h5
-rw-r--r--keyboards/takashicompany/qoolee/info.json6
-rw-r--r--keyboards/takashicompany/radialex/config.h5
-rw-r--r--keyboards/takashicompany/radialex/info.json6
-rw-r--r--keyboards/takashicompany/spreadwriter/info.json4
-rw-r--r--keyboards/takashicompany/spreadwriter/keymaps/default/keymap.c30
-rw-r--r--keyboards/takashicompany/spreadwriter/keymaps/via/config.h11
-rw-r--r--keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c71
-rw-r--r--keyboards/takashicompany/spreadwriter/keymaps/via/rules.mk3
27 files changed, 95 insertions, 196 deletions
diff --git a/keyboards/takashicompany/center_enter/config.h b/keyboards/takashicompany/center_enter/config.h
index 83952009e5..db24eec2fc 100644
--- a/keyboards/takashicompany/center_enter/config.h
+++ b/keyboards/takashicompany/center_enter/config.h
@@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-# define RGBLED_NUM 6
-# 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/takashicompany/center_enter/info.json b/keyboards/takashicompany/center_enter/info.json
index 3521b24218..f0c0068e93 100644
--- a/keyboards/takashicompany/center_enter/info.json
+++ b/keyboards/takashicompany/center_enter/info.json
@@ -8,6 +8,12 @@
"pid": "0x0012",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 6,
+ "sleep": true
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/compacx/config.h b/keyboards/takashicompany/compacx/config.h
index 07287712f3..9d9d494c84 100644
--- a/keyboards/takashicompany/compacx/config.h
+++ b/keyboards/takashicompany/compacx/config.h
@@ -17,12 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-# define RGBLED_NUM 12
-# define RGBLED_SPLIT {6, 6}
-# 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/takashicompany/compacx/info.json b/keyboards/takashicompany/compacx/info.json
index 2e7ef2f7a6..0446ac24bb 100644
--- a/keyboards/takashicompany/compacx/info.json
+++ b/keyboards/takashicompany/compacx/info.json
@@ -8,6 +8,13 @@
"pid": "0x0014",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 12,
+ "sleep": true,
+ "split_count": [6, 6]
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/dogtag/dogtag.c b/keyboards/takashicompany/dogtag/dogtag.c
deleted file mode 100644
index 0ca5f7c3e8..0000000000
--- a/keyboards/takashicompany/dogtag/dogtag.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* Copyright 2021 takashicompany
- *
- * 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"
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- keypos_t key;
- if (index == 0) {
- if (clockwise) {
- key.row = 2;
- key.col = 1;
- } else {
- key.row = 2;
- key.col = 0;
- }
- uint8_t layer = layer_switch_get_layer(key);
- uint16_t keycode = keymap_key_to_keycode(layer, key);
-
- tap_code16(keycode);
- } else {
- if (clockwise) {
- key.row = 5;
- key.col = 0;
- } else {
- key.row = 5;
- key.col = 1;
- }
- uint8_t layer = layer_switch_get_layer(key);
- uint16_t keycode = keymap_key_to_keycode(layer, key);
-
- tap_code16(keycode);
- }
-
- return true;
-}
diff --git a/keyboards/takashicompany/dogtag/info.json b/keyboards/takashicompany/dogtag/info.json
index 6827375d84..d65092ecca 100644
--- a/keyboards/takashicompany/dogtag/info.json
+++ b/keyboards/takashicompany/dogtag/info.json
@@ -80,13 +80,7 @@
{"matrix": [4, 1], "x": 8, "y": 1},
{"matrix": [4, 2], "x": 9, "y": 1},
{"matrix": [4, 3], "x": 10, "y": 1},
- {"matrix": [4, 4], "x": 11, "y": 1},
-
- {"matrix": [2, 0], "x": 3.5, "y": 3.25},
- {"matrix": [2, 1], "x": 4.5, "y": 3.25},
-
- {"matrix": [5, 0], "x": 6.5, "y": 3.25},
- {"matrix": [5, 1], "x": 7.5, "y": 3.25}
+ {"matrix": [4, 4], "x": 11, "y": 1}
]
}
}
diff --git a/keyboards/takashicompany/dogtag/keymaps/default/keymap.c b/keyboards/takashicompany/dogtag/keymaps/default/keymap.c
index 865e6a2290..8eb6b433b3 100644
--- a/keyboards/takashicompany/dogtag/keymaps/default/keymap.c
+++ b/keyboards/takashicompany/dogtag/keymaps/default/keymap.c
@@ -16,15 +16,20 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- LAYOUT(
+ [0] = LAYOUT(
LT(1, KC_ESC), KC_Q, KC_W, KC_E, KC_Y, KC_U, KC_I, KC_O,
- KC_LSFT, KC_A, KC_S, KC_D, KC_SPC, KC_TAB, KC_H, KC_J, KC_K, KC_L,
- KC_WH_U, KC_WH_D, KC_WH_U, KC_WH_D
+ KC_LSFT, KC_A, KC_S, KC_D, KC_SPC, KC_TAB, KC_H, KC_J, KC_K, KC_L
),
- LAYOUT(
+ [1] = LAYOUT(
KC_TRNS, RGB_MOD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, RGB_M_P, RGB_M_K, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_WH_L, KC_WH_R, KC_WH_L, KC_WH_R
+ KC_TRNS, RGB_M_P, RGB_M_K, RGB_TOG, 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_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
+ [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+};
+#endif
diff --git a/keyboards/takashicompany/dogtag/keymaps/default/rules.mk b/keyboards/takashicompany/dogtag/keymaps/default/rules.mk
new file mode 100644
index 0000000000..ee32568148
--- /dev/null
+++ b/keyboards/takashicompany/dogtag/keymaps/default/rules.mk
@@ -0,0 +1 @@
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/takashicompany/dogtag/keymaps/via/keymap.c b/keyboards/takashicompany/dogtag/keymaps/via/keymap.c
index 865e6a2290..969aec92a5 100644
--- a/keyboards/takashicompany/dogtag/keymaps/via/keymap.c
+++ b/keyboards/takashicompany/dogtag/keymaps/via/keymap.c
@@ -18,13 +18,18 @@
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT(
LT(1, KC_ESC), KC_Q, KC_W, KC_E, KC_Y, KC_U, KC_I, KC_O,
- KC_LSFT, KC_A, KC_S, KC_D, KC_SPC, KC_TAB, KC_H, KC_J, KC_K, KC_L,
- KC_WH_U, KC_WH_D, KC_WH_U, KC_WH_D
+ KC_LSFT, KC_A, KC_S, KC_D, KC_SPC, KC_TAB, KC_H, KC_J, KC_K, KC_L
),
LAYOUT(
KC_TRNS, RGB_MOD, RGB_HUI, RGB_SAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, RGB_M_P, RGB_M_K, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_WH_L, KC_WH_R, KC_WH_L, KC_WH_R
+ KC_TRNS, RGB_M_P, RGB_M_K, RGB_TOG, 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_MS_WH_UP, KC_MS_WH_DOWN), ENCODER_CCW_CW(KC_MS_WH_UP, KC_MS_WH_DOWN) },
+ [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
+};
+#endif
diff --git a/keyboards/takashicompany/dogtag/keymaps/via/rules.mk b/keyboards/takashicompany/dogtag/keymaps/via/rules.mk
index 36b7ba9cbc..1189f4ad19 100644
--- a/keyboards/takashicompany/dogtag/keymaps/via/rules.mk
+++ b/keyboards/takashicompany/dogtag/keymaps/via/rules.mk
@@ -1,2 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/takashicompany/endzone34/config.h b/keyboards/takashicompany/endzone34/config.h
index ccd72051a7..0ed1f94324 100644
--- a/keyboards/takashicompany/endzone34/config.h
+++ b/keyboards/takashicompany/endzone34/config.h
@@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
- #define RGBLED_NUM 9
- #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 */
/*== all animations enable ==*/
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
diff --git a/keyboards/takashicompany/endzone34/info.json b/keyboards/takashicompany/endzone34/info.json
index 8eb5b4dd57..536abee80d 100644
--- a/keyboards/takashicompany/endzone34/info.json
+++ b/keyboards/takashicompany/endzone34/info.json
@@ -8,6 +8,12 @@
"pid": "0x0006",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 9,
+ "sleep": true
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/endzone34/rules.mk b/keyboards/takashicompany/endzone34/rules.mk
index f8fbdec9bd..e6ed3b4b03 100644
--- a/keyboards/takashicompany/endzone34/rules.mk
+++ b/keyboards/takashicompany/endzone34/rules.mk
@@ -11,4 +11,3 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
OLED_ENABLE = yes
-OLED_DRIVER = SSD1306
diff --git a/keyboards/takashicompany/heavy_left/config.h b/keyboards/takashicompany/heavy_left/config.h
index df15f55f72..0617a5c602 100644
--- a/keyboards/takashicompany/heavy_left/config.h
+++ b/keyboards/takashicompany/heavy_left/config.h
@@ -17,12 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-# define RGBLED_NUM 6 * 2
-# define RGBLED_SPLIT {6, 6}
-# 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/takashicompany/heavy_left/info.json b/keyboards/takashicompany/heavy_left/info.json
index 1afa2b1280..ffdd1d400a 100644
--- a/keyboards/takashicompany/heavy_left/info.json
+++ b/keyboards/takashicompany/heavy_left/info.json
@@ -8,6 +8,13 @@
"pid": "0x0015",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 12,
+ "sleep": true,
+ "split_count": [6, 6]
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/minizone/config.h b/keyboards/takashicompany/minizone/config.h
index 2c494ea329..6f2f5bf698 100644
--- a/keyboards/takashicompany/minizone/config.h
+++ b/keyboards/takashicompany/minizone/config.h
@@ -3,11 +3,6 @@
#pragma once
-# define RGBLED_NUM 11
-# 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/takashicompany/minizone/info.json b/keyboards/takashicompany/minizone/info.json
index 806a255bcb..b6e8266f81 100644
--- a/keyboards/takashicompany/minizone/info.json
+++ b/keyboards/takashicompany/minizone/info.json
@@ -8,6 +8,12 @@
"pid": "0x0021",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 11,
+ "sleep": true
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/minizone/rules.mk b/keyboards/takashicompany/minizone/rules.mk
index 60c7bb59b5..e6ed3b4b03 100644
--- a/keyboards/takashicompany/minizone/rules.mk
+++ b/keyboards/takashicompany/minizone/rules.mk
@@ -10,6 +10,4 @@ NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
-
OLED_ENABLE = yes
-OLED_DRIVER = SSD1306 \ No newline at end of file
diff --git a/keyboards/takashicompany/qoolee/config.h b/keyboards/takashicompany/qoolee/config.h
index 83952009e5..db24eec2fc 100644
--- a/keyboards/takashicompany/qoolee/config.h
+++ b/keyboards/takashicompany/qoolee/config.h
@@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-# define RGBLED_NUM 6
-# 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/takashicompany/qoolee/info.json b/keyboards/takashicompany/qoolee/info.json
index c9aacaabc2..d39f22d928 100644
--- a/keyboards/takashicompany/qoolee/info.json
+++ b/keyboards/takashicompany/qoolee/info.json
@@ -8,6 +8,12 @@
"pid": "0x0013",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 6,
+ "sleep": true
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/radialex/config.h b/keyboards/takashicompany/radialex/config.h
index 34ab4a1239..9d9d494c84 100644
--- a/keyboards/takashicompany/radialex/config.h
+++ b/keyboards/takashicompany/radialex/config.h
@@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-# 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/takashicompany/radialex/info.json b/keyboards/takashicompany/radialex/info.json
index d6852033b1..1cc0124ecc 100644
--- a/keyboards/takashicompany/radialex/info.json
+++ b/keyboards/takashicompany/radialex/info.json
@@ -8,6 +8,12 @@
"pid": "0x0019",
"device_version": "0.0.1"
},
+ "rgblight": {
+ "saturation_steps": 8,
+ "brightness_steps": 8,
+ "led_count": 12,
+ "sleep": true
+ },
"ws2812": {
"pin": "D3"
},
diff --git a/keyboards/takashicompany/spreadwriter/info.json b/keyboards/takashicompany/spreadwriter/info.json
index 1ab624ebcd..da5a95b895 100644
--- a/keyboards/takashicompany/spreadwriter/info.json
+++ b/keyboards/takashicompany/spreadwriter/info.json
@@ -105,9 +105,7 @@
{"matrix": [7, 3], "x": 12, "y": 3},
{"matrix": [7, 4], "x": 13, "y": 3.25},
{"matrix": [7, 5], "x": 14, "y": 3.5},
- {"matrix": [7, 6], "x": 15, "y": 3.5},
- {"matrix": [0, 6], "x": 7, "y": 4.25},
- {"matrix": [4, 0], "x": 8, "y": 4.25}
+ {"matrix": [7, 6], "x": 15, "y": 3.5}
]
}
}
diff --git a/keyboards/takashicompany/spreadwriter/keymaps/default/keymap.c b/keyboards/takashicompany/spreadwriter/keymaps/default/keymap.c
index f0ac6aa00b..fb74b6ee30 100644
--- a/keyboards/takashicompany/spreadwriter/keymaps/default/keymap.c
+++ b/keyboards/takashicompany/spreadwriter/keymaps/default/keymap.c
@@ -13,56 +13,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, LT(2, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_LCTL, KC_A, KC_S, LT(2, KC_D), KC_F, KC_G, SPREADWRITER, KC_H, KC_J, LT(2, KC_K), KC_L, KC_ENT, KC_ENT,
KC_LSFT, SFT_T(KC_Z), GUI_T(KC_X), KC_C, KC_V, KC_B, MEH(KC_4), LSA(KC_5), KC_N, KC_M, KC_COMM, CTL_T(KC_DOT), KC_BSPC, KC_DEL,
- KC_LCTL, KC_LGUI, KC_LALT, MO(5), MO(4), ALT_T(KC_LNG2), SFT_T(KC_TAB), WEB, LT(6, KC_SPC), LT(1, KC_LNG1), KC_RALT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,
- KC_WH_U, KC_WH_D
+ KC_LCTL, KC_LGUI, KC_LALT, MO(5), MO(4), ALT_T(KC_LNG2), SFT_T(KC_TAB), WEB, LT(6, KC_SPC), LT(1, KC_LNG1), KC_RALT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
),
LAYOUT(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_LCTL, CTL_T(KC_EQL), KC_LBRC, KC_SLSH, KC_MINS, KC_INT1, KC_TRNS, KC_SCLN, KC_QUOT, KC_RBRC, KC_NUHS, KC_INT3, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
LAYOUT(
KC_ESC, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_LCTL, KC_TRNS, KC_QUES, KC_EXLM, KC_NO, KC_TRNS, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_BSPC, KC_SPC
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
LAYOUT(
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
- KC_TRNS, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_M_T, KC_TRNS, QK_BOOT, KC_F11, KC_F12, KC_CAPS, KC_NO, KC_NO, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_M_T, KC_TRNS, QK_BOOT, KC_F11, KC_F12, KC_CAPS, KC_NO, KC_NO, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
LAYOUT(
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_INT3, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_NUHS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_TRNS
),
LAYOUT(
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_INT3), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_LBRC), S(KC_RBRC), KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_SCLN), S(KC_QUOT), S(KC_NUHS), KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_INT1), KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_INT1), KC_TRNS
),
LAYOUT(
KC_TRNS, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), G(KC_INT3), KC_TRNS,
KC_LCTL, S(KC_EQL), S(KC_LBRC), S(KC_SLSH), S(KC_MINS), S(KC_INT1), KC_TRNS, S(KC_SCLN), S(KC_QUOT), S(KC_RBRC), S(KC_NUHS), S(KC_INT3), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
@@ -81,7 +74,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
}
-
+
return true;
}
@@ -92,6 +85,5 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
} else {
tap_code(KC_MS_WH_UP);
}
-
- return true;
-} \ No newline at end of file
+ return false;
+}
diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/config.h b/keyboards/takashicompany/spreadwriter/keymaps/via/config.h
index 9587fd7b6b..b0e0cc3ee7 100644
--- a/keyboards/takashicompany/spreadwriter/keymaps/via/config.h
+++ b/keyboards/takashicompany/spreadwriter/keymaps/via/config.h
@@ -4,14 +4,3 @@
#pragma once
#define DYNAMIC_KEYMAP_LAYER_COUNT 7
-
-//------------------------------------------------------------------------------
-// Rotary Encoder
-//------------------------------------------------------------------------------
-// Encoder triggers specific key matrix position,
-// when turn knob clockwise or counterclockwise.
-// This is handy to assign key codes by VIA.
-
-// Mappings of encoder rotation to key position in key matrix.
-#define ENCODERS_CW_KEY { { 0, 4 }}
-#define ENCODERS_CCW_KEY { { 6, 0 }} \ No newline at end of file
diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c
index c0d4a0003d..cf031394f1 100644
--- a/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c
+++ b/keyboards/takashicompany/spreadwriter/keymaps/via/keymap.c
@@ -13,56 +13,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_ESC, LT(2, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
KC_LCTL, KC_A, KC_S, LT(2, KC_D), KC_F, KC_G, SPREADWRITER, KC_H, KC_J, LT(2, KC_K), KC_L, KC_ENT, KC_ENT,
KC_LSFT, SFT_T(KC_Z), GUI_T(KC_X), KC_C, KC_V, KC_B, MEH(KC_4), LSA(KC_5), KC_N, KC_M, KC_COMM, CTL_T(KC_DOT), KC_BSPC, KC_DEL,
- KC_LCTL, KC_LGUI, KC_LALT, MO(5), MO(4), ALT_T(KC_LNG2), SFT_T(KC_TAB), WEB, LT(6, KC_SPC), LT(1, KC_LNG1), KC_RALT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT,
- KC_WH_U, KC_WH_D
+ KC_LCTL, KC_LGUI, KC_LALT, MO(5), MO(4), ALT_T(KC_LNG2), SFT_T(KC_TAB), WEB, LT(6, KC_SPC), LT(1, KC_LNG1), KC_RALT, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT
),
LAYOUT(
KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
KC_LCTL, CTL_T(KC_EQL), KC_LBRC, KC_SLSH, KC_MINS, KC_INT1, KC_TRNS, KC_SCLN, KC_QUOT, KC_RBRC, KC_NUHS, KC_INT3, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
LAYOUT(
KC_ESC, KC_TAB, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO,
KC_TRNS, KC_LCTL, KC_TRNS, KC_QUES, KC_EXLM, KC_NO, KC_TRNS, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(3), KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_BSPC, KC_SPC
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
LAYOUT(
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6,
KC_TRNS, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
- KC_TRNS, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_M_T, KC_TRNS, QK_BOOT, KC_F11, KC_F12, KC_CAPS, KC_NO, KC_NO, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, RGB_M_K, RGB_M_X, RGB_M_G, RGB_M_T, RGB_M_T, KC_TRNS, QK_BOOT, KC_F11, KC_F12, KC_CAPS, KC_NO, KC_NO, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
LAYOUT(
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_INT3, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_NUHS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COMM, KC_DOT, KC_SLSH, KC_INT1, KC_TRNS
),
LAYOUT(
KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_INT3), KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_6, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_LBRC), S(KC_RBRC), KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_SCLN), S(KC_QUOT), S(KC_NUHS), KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_INT1), KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_P0, KC_COMM, KC_DOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_INT1), KC_TRNS
),
LAYOUT(
KC_TRNS, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), G(KC_INT3), KC_TRNS,
KC_LCTL, S(KC_EQL), S(KC_LBRC), S(KC_SLSH), S(KC_MINS), S(KC_INT1), KC_TRNS, S(KC_SCLN), S(KC_QUOT), S(KC_RBRC), S(KC_NUHS), S(KC_INT3), KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
- KC_TRNS, KC_TRNS
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
)
};
@@ -81,49 +74,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return false;
}
-
- return true;
-}
-
-//------------------------------------------------------------------------------
-// Rotary Encoder
-//------------------------------------------------------------------------------
-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);
-}
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
+ return true;
}
-bool encoder_update_user(uint8_t index, bool clockwise) {
- encoder_action_register(index, clockwise);
- return true;
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
+ [0] = { ENCODER_CCW_CW(KC_WH_U, KC_WH_D) },
+ [1 ... 6] = { ENCODER_CCW_CW(_______, _______) },
};
+#endif
diff --git a/keyboards/takashicompany/spreadwriter/keymaps/via/rules.mk b/keyboards/takashicompany/spreadwriter/keymaps/via/rules.mk
index 036bd6d1c3..f1adcab005 100644
--- a/keyboards/takashicompany/spreadwriter/keymaps/via/rules.mk
+++ b/keyboards/takashicompany/spreadwriter/keymaps/via/rules.mk
@@ -1 +1,2 @@
-VIA_ENABLE = yes \ No newline at end of file
+VIA_ENABLE = yes
+ENCODER_MAP_ENABLE = yes