[Keyboard] Update DogTag Macro Pad (#16446)
Co-authored-by: Drashna Jaelre <drashna@live.com>
This commit is contained in:
parent
6e61126e08
commit
41fb9120d0
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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 } \
|
||||
}
|
||||
|
@ -21,10 +21,6 @@
|
||||
"x": 3,
|
||||
"y": 0
|
||||
},
|
||||
{
|
||||
"x": 7,
|
||||
"y": 0
|
||||
},
|
||||
{
|
||||
"x": 8,
|
||||
"y": 0
|
||||
@ -37,6 +33,10 @@
|
||||
"x": 10,
|
||||
"y": 0
|
||||
},
|
||||
{
|
||||
"x": 11,
|
||||
"y": 0
|
||||
},
|
||||
{
|
||||
"x": 0,
|
||||
"y": 1
|
||||
@ -53,10 +53,6 @@
|
||||
"x": 3,
|
||||
"y": 1
|
||||
},
|
||||
{
|
||||
"x": 7,
|
||||
"y": 1
|
||||
},
|
||||
{
|
||||
"x": 8,
|
||||
"y": 1
|
||||
@ -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
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
};
|
||||
|
@ -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
|
@ -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
|
||||
)
|
||||
|
||||
};
|
||||
|
@ -19,3 +19,4 @@ AUDIO_ENABLE = no # Audio output
|
||||
|
||||
ENCODER_ENABLE = yes
|
||||
SPLIT_KEYBOARD = yes
|
||||
MOUSEKEY_ENABLE = yes
|
Loading…
Reference in New Issue
Block a user