Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DogTag Macro Pad #16446

Merged
merged 10 commits into from
Mar 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions keyboards/takashicompany/dogtag/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

/*
Expand All @@ -40,17 +40,17 @@ 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

/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW

#define ENCODER_RESOLUTION 1
#define ENCODER_RESOLUTION 4
#define ENCODERS_PAD_A { D4 }
#define ENCODERS_PAD_B { C6 }

Expand All @@ -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
Expand Down
28 changes: 24 additions & 4 deletions keyboards/takashicompany/dogtag/dogtag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
15 changes: 9 additions & 6 deletions keyboards/takashicompany/dogtag/dogtag.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 } \
}
34 changes: 25 additions & 9 deletions keyboards/takashicompany/dogtag/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
"x": 3,
"y": 0
},
{
"x": 7,
"y": 0
},
{
"x": 8,
"y": 0
Expand All @@ -37,6 +33,10 @@
"x": 10,
"y": 0
},
{
"x": 11,
"y": 0
},
{
"x": 0,
"y": 1
Expand All @@ -53,10 +53,6 @@
"x": 3,
"y": 1
},
{
"x": 7,
"y": 1
},
{
"x": 8,
"y": 1
Expand All @@ -69,13 +65,33 @@
"x": 10,
"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
}
]
}
Expand Down
8 changes: 4 additions & 4 deletions keyboards/takashicompany/dogtag/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

};
2 changes: 1 addition & 1 deletion keyboards/takashicompany/dogtag/keymaps/via/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#pragma once

#define DYNAMIC_KEYMAP_LAYER_COUNT 16
#define DYNAMIC_KEYMAP_LAYER_COUNT 12
8 changes: 4 additions & 4 deletions keyboards/takashicompany/dogtag/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

};
1 change: 1 addition & 0 deletions keyboards/takashicompany/dogtag/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ AUDIO_ENABLE = no # Audio output

ENCODER_ENABLE = yes
SPLIT_KEYBOARD = yes
MOUSEKEY_ENABLE = yes