summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortakashicompany <t@kashi.company>2022-03-07 16:02:52 +0900
committerGitHub <noreply@github.com>2022-03-06 23:02:52 -0800
commit41fb9120d0aff73664da880871d4e168ad158ae2 (patch)
tree5cf2f2450c1ca127f35a547978c027a634524a49
parent6e61126e08a2219db81ab0fc2ad6b385e2bd6098 (diff)
[Keyboard] Update DogTag Macro Pad (#16446)
Co-authored-by: Drashna Jaelre <drashna@live.com>
-rw-r--r--keyboards/takashicompany/dogtag/config.h12
-rw-r--r--keyboards/takashicompany/dogtag/dogtag.c28
-rw-r--r--keyboards/takashicompany/dogtag/dogtag.h15
-rw-r--r--keyboards/takashicompany/dogtag/info.json34
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/default/keymap.c8
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/via/config.h2
-rw-r--r--keyboards/takashicompany/dogtag/keymaps/via/keymap.c8
-rw-r--r--keyboards/takashicompany/dogtag/rules.mk1
8 files changed, 74 insertions, 34 deletions
diff --git a/keyboards/takashicompany/dogtag/config.h b/keyboards/takashicompany/dogtag/config.h
index 542a44ce62..631435092d 100644
--- a/keyboards/takashicompany/dogtag/config.h
+++ b/keyboards/takashicompany/dogtag/config.h
@@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT DogTag
/* key matrix size */
-#define MATRIX_ROWS 2 * 2
+#define MATRIX_ROWS 6
#define MATRIX_COLS 5
/*
@@ -40,9 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
*/
-#define MATRIX_ROW_PINS { B2, B6 }
+#define MATRIX_ROW_PINS { B2, B6, B3 }
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 }
-#define MATRIX_ROW_PINS_RIGHT { B2, B6 }
+#define MATRIX_ROW_PINS_RIGHT { B2, B6, B3 }
#define MATRIX_COL_PINS_RIGHT { B1, F7, F6, F5, F4 }
#define UNUSED_PINS
@@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
-#define ENCODER_RESOLUTION 1
+#define ENCODER_RESOLUTION 4
#define ENCODERS_PAD_A { D4 }
#define ENCODERS_PAD_B { C6 }
@@ -71,8 +71,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGB_DI_PIN D3
#ifdef RGB_DI_PIN
-# define RGBLED_NUM 3 * 2
-# define RGBLED_SPLIT {3, 3}
+# define RGBLED_NUM 4 * 2
+# define RGBLED_SPLIT { 4, 4 }
# define RGBLIGHT_HUE_STEP 8
# define RGBLIGHT_SAT_STEP 8
# define RGBLIGHT_VAL_STEP 8
diff --git a/keyboards/takashicompany/dogtag/dogtag.c b/keyboards/takashicompany/dogtag/dogtag.c
index 459ca9d3f8..e5d0779c08 100644
--- a/keyboards/takashicompany/dogtag/dogtag.c
+++ b/keyboards/takashicompany/dogtag/dogtag.c
@@ -17,11 +17,31 @@
#include "dogtag.h"
bool encoder_update_kb(uint8_t index, bool clockwise) {
- if (!encoder_update_user(index, clockwise)) { return false; }
- if (clockwise) {
- tap_code(KC_MS_WH_DOWN);
+ 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 {
- tap_code(KC_MS_WH_UP);
+ 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/dogtag.h b/keyboards/takashicompany/dogtag/dogtag.h
index f2b7f5f601..fb5ae151ea 100644
--- a/keyboards/takashicompany/dogtag/dogtag.h
+++ b/keyboards/takashicompany/dogtag/dogtag.h
@@ -27,11 +27,14 @@
* represents the switch matrix.
*/
#define LAYOUT( \
- l01, l02, l03, l04, r01, r02, r03, r04,\
- l05, l06, l07, l08, l09, r05, r06, r07, r08, r09 \
+ l01, l02, l03, l04, r01, r02, r03, r04, \
+ l05, l06, l07, l08, l09, r05, r06, r07, r08, r09, \
+ l10, l11, r10, r11 \
) { \
- { l01, l02, l03, l04, KC_NO }, \
- { l05, l06, l07, l08, l09 }, \
- { KC_NO, r01, r02, r03, r04,}, \
- { r05, r06, r07, r08, r09 } \
+ { l01, l02, l03, l04, KC_NO }, \
+ { l05, l06, l07, l08, l09 }, \
+ { l10, l11, KC_NO, KC_NO, KC_NO }, \
+ { KC_NO, r01, r02, r03, r04}, \
+ { r05, r06, r07, r08, r09 }, \
+ { r10, r11, KC_NO, KC_NO, KC_NO } \
}
diff --git a/keyboards/takashicompany/dogtag/info.json b/keyboards/takashicompany/dogtag/info.json
index 9dad380b70..64079408a8 100644
--- a/keyboards/takashicompany/dogtag/info.json
+++ b/keyboards/takashicompany/dogtag/info.json
@@ -22,10 +22,6 @@
"y": 0
},
{
- "x": 7,
- "y": 0
- },
- {
"x": 8,
"y": 0
},
@@ -38,6 +34,10 @@
"y": 0
},
{
+ "x": 11,
+ "y": 0
+ },
+ {
"x": 0,
"y": 1
},
@@ -54,10 +54,6 @@
"y": 1
},
{
- "x": 7,
- "y": 1
- },
- {
"x": 8,
"y": 1
},
@@ -70,12 +66,32 @@
"y": 1
},
{
+ "x": 11,
+ "y": 1
+ },
+ {
"x": 4,
"y": 2
},
{
- "x": 6,
+ "x": 7,
"y": 2
+ },
+ {
+ "x": 3.5,
+ "y": 3.25
+ },
+ {
+ "x": 4.5,
+ "y": 3.25
+ },
+ {
+ "x": 6.5,
+ "y": 3.25
+ },
+ {
+ "x": 7.5,
+ "y": 3.25
}
]
}
diff --git a/keyboards/takashicompany/dogtag/keymaps/default/keymap.c b/keyboards/takashicompany/dogtag/keymaps/default/keymap.c
index 790d1b8126..865e6a2290 100644
--- a/keyboards/takashicompany/dogtag/keymaps/default/keymap.c
+++ b/keyboards/takashicompany/dogtag/keymaps/default/keymap.c
@@ -16,15 +16,15 @@
#include QMK_KEYBOARD_H
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_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
),
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_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
)
-
};
diff --git a/keyboards/takashicompany/dogtag/keymaps/via/config.h b/keyboards/takashicompany/dogtag/keymaps/via/config.h
index 2ae708b32d..60e30a615f 100644
--- a/keyboards/takashicompany/dogtag/keymaps/via/config.h
+++ b/keyboards/takashicompany/dogtag/keymaps/via/config.h
@@ -17,4 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-#define DYNAMIC_KEYMAP_LAYER_COUNT 16 \ No newline at end of file
+#define DYNAMIC_KEYMAP_LAYER_COUNT 12 \ No newline at end of file
diff --git a/keyboards/takashicompany/dogtag/keymaps/via/keymap.c b/keyboards/takashicompany/dogtag/keymaps/via/keymap.c
index 790d1b8126..865e6a2290 100644
--- a/keyboards/takashicompany/dogtag/keymaps/via/keymap.c
+++ b/keyboards/takashicompany/dogtag/keymaps/via/keymap.c
@@ -16,15 +16,15 @@
#include QMK_KEYBOARD_H
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_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
),
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_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
)
-
};
diff --git a/keyboards/takashicompany/dogtag/rules.mk b/keyboards/takashicompany/dogtag/rules.mk
index dc6f5127fc..08b1ffe09c 100644
--- a/keyboards/takashicompany/dogtag/rules.mk
+++ b/keyboards/takashicompany/dogtag/rules.mk
@@ -19,3 +19,4 @@ AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = yes
SPLIT_KEYBOARD = yes
+MOUSEKEY_ENABLE = yes \ No newline at end of file