Compare commits
4 commits
8c8aed5443
...
8d317f855d
Author | SHA1 | Date | |
---|---|---|---|
kemonine | 8d317f855d | ||
kemonine | 1af8e4d356 | ||
kemonine | 19dffff16d | ||
kemonine | e84ea636c2 |
|
@ -1,277 +1,287 @@
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "action_layer.h"
|
#include "action_layer.h"
|
||||||
#include "version.h"
|
#include "version.h"
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
#define TAPPING_TERM 200
|
#define TAPPING_TERM 200
|
||||||
|
|
||||||
#define CAPS_LED 30
|
#define CAPS_LED 30
|
||||||
#define LALT_LED 60
|
#define LALT_LED 60
|
||||||
|
|
||||||
#define RGB_KMN_NO_COLOR 0, 0, 0
|
#define RGB_KMN_NO_COLOR 0, 0, 0
|
||||||
#define RGB_KMN_CYAN 128, 255, 255
|
#define RGB_KMN_CYAN 128, 255, 255
|
||||||
#define RGB_KMN_PRPL 215, 195, 42
|
#define RGB_KMN_PRPL 215, 195, 42
|
||||||
#define RGB_KMN_CYAN_HILIGHT 0, 191, 255
|
#define RGB_KMN_CYAN_HILIGHT 0, 191, 255
|
||||||
|
|
||||||
#define HS_KMN_ORANGE 10,255
|
#define HS_KMN_ORANGE 10,255
|
||||||
#define HS_KMN_CYAN 128, 255
|
#define HS_KMN_CYAN 128, 255
|
||||||
|
|
||||||
keymap_config_t keymap_config;
|
keymap_config_t keymap_config;
|
||||||
rgb_config_t rgb_matrix_config;
|
rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
uint8_t cur_dance(qk_tap_dance_state_t *state);
|
||||||
void al_finished(qk_tap_dance_state_t *state, void *user_data);
|
void al_finished(qk_tap_dance_state_t *state, void *user_data);
|
||||||
void al_reset(qk_tap_dance_state_t *state, void *user_data);
|
void al_reset(qk_tap_dance_state_t *state, void *user_data);
|
||||||
|
|
||||||
enum alt_keycodes {
|
enum alt_keycodes {
|
||||||
U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
|
U_T_AUTO = SAFE_RANGE, //USB Extra Port Toggle Auto Detect / Always Active
|
||||||
U_T_AGCR, //USB Toggle Automatic GCR control
|
U_T_AGCR, //USB Toggle Automatic GCR control
|
||||||
DBG_TOG, //DEBUG Toggle On / Off
|
DBG_TOG, //DEBUG Toggle On / Off
|
||||||
DBG_MTRX, //DEBUG Toggle Matrix Prints
|
DBG_MTRX, //DEBUG Toggle Matrix Prints
|
||||||
DBG_KBD, //DEBUG Toggle Keyboard Prints
|
DBG_KBD, //DEBUG Toggle Keyboard Prints
|
||||||
DBG_MOU, //DEBUG Toggle Mouse Prints
|
DBG_MOU, //DEBUG Toggle Mouse Prints
|
||||||
MD_BOOT, //Restart into bootloader after hold timeout
|
MD_BOOT, //Restart into bootloader after hold timeout
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
bool is_press_action;
|
bool is_press_action;
|
||||||
uint8_t state;
|
uint8_t state;
|
||||||
} tap;
|
} tap;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SINGLE_TAP = 1,
|
SINGLE_TAP = 1,
|
||||||
SINGLE_HOLD,
|
SINGLE_HOLD,
|
||||||
DOUBLE_TAP
|
DOUBLE_TAP
|
||||||
};
|
};
|
||||||
|
|
||||||
enum td_keycodes {
|
enum td_keycodes {
|
||||||
LAYERS // Our example key: `MOD(1)` when held, `TG(2)` when tapped. Add additional keycodes for each tapdance.
|
LAYERS // Our example key: `MOD(1)` when held, `TG(2)` when tapped. Add additional keycodes for each tapdance.
|
||||||
};
|
};
|
||||||
|
|
||||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||||
[LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, al_finished, al_reset)
|
[LAYERS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, al_finished, al_reset)
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM layercolors[][2] = {
|
const uint8_t PROGMEM layercolors[][2] = {
|
||||||
[0] = {HS_KMN_ORANGE},
|
[0] = {HS_KMN_ORANGE},
|
||||||
[1] = {HS_KMN_CYAN},
|
[1] = {HS_KMN_CYAN},
|
||||||
[2] = {HS_KMN_CYAN}
|
[2] = {HS_KMN_CYAN}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
[0] = LAYOUT_65_ansi_blocker(KC_GESC, 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_HOME,
|
[0] = LAYOUT_65_ansi_blocker(KC_GESC, 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_HOME,
|
||||||
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_PGUP,
|
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_PGUP,
|
||||||
LM(1, MOD_LALT), 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_PGDN,
|
LM(1, MOD_LALT), 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_PGDN,
|
||||||
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_UP, KC_END,
|
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_UP, KC_END,
|
||||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TD(LAYERS), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, TD(LAYERS), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||||
[1] = LAYOUT_65_ansi_blocker(KC_GRV, 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,
|
[1] = LAYOUT_65_ansi_blocker(KC_GRV, 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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_INS,
|
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_INS,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PLAY_PAUSE, KC_RSFT, KC_VOLU, KC_MUTE,
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PLAY_PAUSE, KC_RSFT, KC_VOLU, KC_MUTE,
|
||||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, RGB_VAD, KC_VOLD, RGB_VAI),
|
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, RGB_VAD, KC_VOLD, RGB_VAI),
|
||||||
[2] = LAYOUT_65_ansi_blocker(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
[2] = LAYOUT_65_ansi_blocker(KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_NO, KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_NO, KC_NO, KC_NO, KC_MS_UP, KC_NO, KC_NO, KC_NO, KC_MS_WH_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_NO, KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_NO, KC_NO, KC_MS_BTN1, KC_MS_BTN2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_LSFT, KC_NO, KC_X, KC_C, KC_V, KC_NO, KC_NO, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
KC_LSFT, KC_NO, KC_X, KC_C, KC_V, KC_NO, KC_NO, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||||
KC_LCTL, KC_NO, TG(2), KC_NO, TG(2), KC_NO, KC_NO, KC_NO, KC_NO),
|
KC_LCTL, KC_NO, TG(2), KC_NO, TG(2), KC_NO, KC_NO, KC_NO, KC_NO),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM ledcolors[][DRIVER_LED_TOTAL][3] = {
|
const uint8_t PROGMEM ledcolors[][DRIVER_LED_TOTAL][3] = {
|
||||||
[1] = {
|
[1] = {
|
||||||
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
{RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN},
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
},
|
// Underglow == 38 LEDS
|
||||||
[2] = {
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}
|
||||||
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
},
|
||||||
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}
|
[2] = {
|
||||||
},
|
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
};
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
// Runs just one time when the keyboard initializes.
|
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
void matrix_init_user(void) {
|
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
rgb_matrix_config.raw = pgm_read_dword(EECONFIG_RGB_MATRIX);
|
// Underglow == 38 LEDS
|
||||||
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL},
|
||||||
rgb_matrix_enable();
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL},
|
||||||
rgb_matrix_sethsv(10, 255, 95);
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL},
|
||||||
rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR);
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}
|
||||||
};
|
},
|
||||||
|
};
|
||||||
// Runs constantly in the background, in a loop.
|
|
||||||
void matrix_scan_user(void) {
|
// Runs just one time when the keyboard initializes.
|
||||||
};
|
void matrix_init_user(void) {
|
||||||
|
rgb_matrix_config.raw = pgm_read_dword(EECONFIG_RGB_MATRIX);
|
||||||
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
|
||||||
if (state->count == 1) {
|
rgb_matrix_enable();
|
||||||
if (!state->pressed) return SINGLE_TAP;
|
rgb_matrix_sethsv(10, 255, 95);
|
||||||
else return SINGLE_HOLD;
|
rgb_matrix_mode(RGB_MATRIX_SOLID_COLOR);
|
||||||
} else if (state->count == 2) return DOUBLE_TAP;
|
};
|
||||||
else return 8;
|
|
||||||
}
|
// Runs constantly in the background, in a loop.
|
||||||
|
void matrix_scan_user(void) {
|
||||||
// Initialize tap structure associated with example tap dance key
|
};
|
||||||
static tap al_tap_state = {
|
|
||||||
.is_press_action = true,
|
uint8_t cur_dance(qk_tap_dance_state_t *state) {
|
||||||
.state = 0
|
if (state->count == 1) {
|
||||||
};
|
if (!state->pressed) return SINGLE_TAP;
|
||||||
|
else return SINGLE_HOLD;
|
||||||
// Functions that control what our tap dance key does
|
} else if (state->count == 2) return DOUBLE_TAP;
|
||||||
void al_finished(qk_tap_dance_state_t *state, void *user_data) {
|
else return 8;
|
||||||
al_tap_state.state = cur_dance(state);
|
}
|
||||||
switch (al_tap_state.state) {
|
|
||||||
case SINGLE_TAP:
|
// Initialize tap structure associated with example tap dance key
|
||||||
layer_on(1); // Activate layer 1 immediately since we probably are holding this down ; if released it'll go away fast and shouldn't be an issue
|
static tap al_tap_state = {
|
||||||
break;
|
.is_press_action = true,
|
||||||
case SINGLE_HOLD:
|
.state = 0
|
||||||
layer_on(1); // Activate layer 1 since that's what the intent is
|
};
|
||||||
break;
|
|
||||||
case DOUBLE_TAP:
|
// Functions that control what our tap dance key does
|
||||||
// Check to see if the layer is already set
|
void al_finished(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
if (layer_state_is(2)) {
|
al_tap_state.state = cur_dance(state);
|
||||||
// If already set, then switch it off
|
switch (al_tap_state.state) {
|
||||||
layer_off(2);
|
case SINGLE_TAP:
|
||||||
} else {
|
layer_on(1); // Activate layer 1 immediately since we probably are holding this down ; if released it'll go away fast and shouldn't be an issue
|
||||||
// If not already set, then switch the layer on
|
break;
|
||||||
layer_on(2);
|
case SINGLE_HOLD:
|
||||||
}
|
layer_on(1); // Activate layer 1 since that's what the intent is
|
||||||
break;
|
break;
|
||||||
}
|
case DOUBLE_TAP:
|
||||||
}
|
// Check to see if the layer is already set
|
||||||
|
if (layer_state_is(2)) {
|
||||||
void al_reset(qk_tap_dance_state_t *state, void *user_data) {
|
// If already set, then switch it off
|
||||||
// If the key was held down and now is released then switch off the layer
|
layer_off(2);
|
||||||
if (al_tap_state.state == SINGLE_HOLD) {
|
} else {
|
||||||
layer_off(1); // Reset state appropriately
|
// If not already set, then switch the layer on
|
||||||
}
|
layer_on(2);
|
||||||
al_tap_state.state = 0;
|
}
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
// Set the colors for individual LEDs for a given layer
|
}
|
||||||
void set_leds_color( int layer) {
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
void al_reset(qk_tap_dance_state_t *state, void *user_data) {
|
||||||
uint8_t val = pgm_read_byte(&ledcolors[layer][i][2]);
|
// If the key was held down and now is released then switch off the layer
|
||||||
// if the brightness of the led is set to 0 in the map,
|
if (al_tap_state.state == SINGLE_HOLD) {
|
||||||
// the value is not overriden with global controls, allowing the led
|
layer_off(1); // Reset state appropriately
|
||||||
// to appear turned off
|
}
|
||||||
HSV hsv = { .h = pgm_read_byte(&ledcolors[layer][i][0]), .s = pgm_read_byte(&ledcolors[layer][i][1]), .v = val == 0 ? 0 : rgb_matrix_config.hsv.v};
|
al_tap_state.state = 0;
|
||||||
RGB rgb = hsv_to_rgb( hsv );
|
}
|
||||||
rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
|
|
||||||
}
|
// Set the colors for individual LEDs for a given layer
|
||||||
}
|
void set_leds_color( int layer) {
|
||||||
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
// Set the colors for ALL LEDs for a given layer
|
uint8_t val = pgm_read_byte(&ledcolors[layer][i][2]);
|
||||||
void set_layer_color( uint8_t layer ) {
|
// if the brightness of the led is set to 0 in the map,
|
||||||
HSV hsv = { .h = pgm_read_byte(&layercolors[layer][0]), .s = pgm_read_byte(&layercolors[layer][1]), .v = rgb_matrix_config.hsv.v};
|
// the value is not overriden with global controls, allowing the led
|
||||||
RGB rgb = hsv_to_rgb( hsv );
|
// to appear turned off
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
HSV hsv = { .h = pgm_read_byte(&ledcolors[layer][i][0]), .s = pgm_read_byte(&ledcolors[layer][i][1]), .v = val == 0 ? 0 : rgb_matrix_config.hsv.v};
|
||||||
rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
|
RGB rgb = hsv_to_rgb( hsv );
|
||||||
}
|
rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Override standard rgb colorization stuff
|
|
||||||
void rgb_matrix_indicators_user(void) {
|
// Set the colors for ALL LEDs for a given layer
|
||||||
uint32_t mode = rgblight_get_mode();
|
void set_layer_color( uint8_t layer ) {
|
||||||
// assign colors if the matrix is on and the current mode
|
HSV hsv = { .h = pgm_read_byte(&layercolors[layer][0]), .s = pgm_read_byte(&layercolors[layer][1]), .v = rgb_matrix_config.hsv.v};
|
||||||
// is SOLID COLORS => No animations running
|
RGB rgb = hsv_to_rgb( hsv );
|
||||||
if(rgb_matrix_config.enable == 1 && mode == RGB_MATRIX_SOLID_COLOR) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
uint8_t layer = biton32(layer_state);
|
rgb_matrix_set_color( i, rgb.r, rgb.g, rgb.b );
|
||||||
switch (layer) {
|
}
|
||||||
case 0:
|
}
|
||||||
set_layer_color(0);
|
|
||||||
break;
|
// Override standard rgb colorization stuff
|
||||||
case 1:
|
void rgb_matrix_indicators_user(void) {
|
||||||
set_leds_color(1);
|
uint32_t mode = rgblight_get_mode();
|
||||||
break;
|
// assign colors if the matrix is on and the current mode
|
||||||
case 2:
|
// is SOLID COLORS => No animations running
|
||||||
set_leds_color(2);
|
if(rgb_matrix_config.enable == 1 && mode == RGB_MATRIX_SOLID_COLOR) {
|
||||||
break;
|
uint8_t layer = biton32(layer_state);
|
||||||
}
|
switch (layer) {
|
||||||
}
|
case 0:
|
||||||
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
|
set_layer_color(0);
|
||||||
rgb_matrix_set_color(CAPS_LED, RGB_KMN_CYAN_HILIGHT);
|
break;
|
||||||
}
|
case 1:
|
||||||
}
|
set_leds_color(1);
|
||||||
|
break;
|
||||||
#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
|
case 2:
|
||||||
#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
|
set_leds_color(2);
|
||||||
#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
|
break;
|
||||||
|
}
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
}
|
||||||
static uint32_t key_timer;
|
if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
|
rgb_matrix_set_color(CAPS_LED, RGB_KMN_CYAN_HILIGHT);
|
||||||
switch (keycode) {
|
}
|
||||||
case U_T_AUTO:
|
}
|
||||||
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
|
||||||
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
|
#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT))
|
||||||
}
|
#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL))
|
||||||
return false;
|
#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT))
|
||||||
case U_T_AGCR:
|
|
||||||
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
|
static uint32_t key_timer;
|
||||||
}
|
|
||||||
return false;
|
switch (keycode) {
|
||||||
case DBG_TOG:
|
case U_T_AUTO:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||||
TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
|
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case DBG_MTRX:
|
case U_T_AGCR:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
|
||||||
TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
|
TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case DBG_KBD:
|
case DBG_TOG:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
|
TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case DBG_MOU:
|
case DBG_MTRX:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
|
TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
case MD_BOOT:
|
case DBG_KBD:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
key_timer = timer_read32();
|
TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
|
||||||
} else {
|
}
|
||||||
if (timer_elapsed32(key_timer) >= 500) {
|
return false;
|
||||||
reset_keyboard();
|
case DBG_MOU:
|
||||||
}
|
if (record->event.pressed) {
|
||||||
}
|
TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
|
||||||
return false;
|
}
|
||||||
case RGB_TOG:
|
return false;
|
||||||
if (record->event.pressed) {
|
case MD_BOOT:
|
||||||
switch (rgb_matrix_get_flags()) {
|
if (record->event.pressed) {
|
||||||
case LED_FLAG_ALL: {
|
key_timer = timer_read32();
|
||||||
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
|
} else {
|
||||||
rgb_matrix_set_color_all(0, 0, 0);
|
if (timer_elapsed32(key_timer) >= 500) {
|
||||||
}
|
reset_keyboard();
|
||||||
break;
|
}
|
||||||
case LED_FLAG_KEYLIGHT: {
|
}
|
||||||
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
|
return false;
|
||||||
rgb_matrix_set_color_all(0, 0, 0);
|
case RGB_TOG:
|
||||||
}
|
if (record->event.pressed) {
|
||||||
break;
|
switch (rgb_matrix_get_flags()) {
|
||||||
case LED_FLAG_UNDERGLOW: {
|
case LED_FLAG_ALL: {
|
||||||
rgb_matrix_set_flags(LED_FLAG_NONE);
|
rgb_matrix_set_flags(LED_FLAG_KEYLIGHT);
|
||||||
rgb_matrix_disable_noeeprom();
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default: {
|
case LED_FLAG_KEYLIGHT: {
|
||||||
rgb_matrix_set_flags(LED_FLAG_ALL);
|
rgb_matrix_set_flags(LED_FLAG_UNDERGLOW);
|
||||||
rgb_matrix_enable_noeeprom();
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
case LED_FLAG_UNDERGLOW: {
|
||||||
}
|
rgb_matrix_set_flags(LED_FLAG_NONE);
|
||||||
return false;
|
rgb_matrix_disable_noeeprom();
|
||||||
default:
|
}
|
||||||
return true; //Process all other keycodes normally
|
break;
|
||||||
}
|
default: {
|
||||||
}
|
rgb_matrix_set_flags(LED_FLAG_ALL);
|
||||||
|
rgb_matrix_enable_noeeprom();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
default:
|
||||||
|
return true; //Process all other keycodes normally
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
@ -83,14 +83,24 @@ const uint8_t PROGMEM ledcolors[][DRIVER_LED_TOTAL][3] = {
|
||||||
{RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
{RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN},
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
|
// Underglow == 38 LEDS
|
||||||
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN},
|
||||||
|
{RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}, {RGB_KMN_CYAN}
|
||||||
},
|
},
|
||||||
[2] = {
|
[2] = {
|
||||||
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}
|
{RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_PRPL}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR}, {RGB_KMN_NO_COLOR},
|
||||||
|
// Underglow == 38 LEDS
|
||||||
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL},
|
||||||
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL},
|
||||||
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL},
|
||||||
|
{RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}, {RGB_KMN_PRPL}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
63
qmk/keyboards/qvex/lynepad/config.h
Normal file
63
qmk/keyboards/qvex/lynepad/config.h
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
/*
|
||||||
|
Copyright 2020 KemoNine
|
||||||
|
|
||||||
|
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 "config_common.h"
|
||||||
|
|
||||||
|
/* USB Device descriptor parameter */
|
||||||
|
#define VENDOR_ID 0x4B42 // FIXME: Update to match Lynepad
|
||||||
|
#define PRODUCT_ID 0x6067 // FIXME: Update to match Lynepad
|
||||||
|
#define DEVICE_VER 0x0002 // FIXME: Update to match Lynepad
|
||||||
|
#define MANUFACTURER QVEX
|
||||||
|
#define PRODUCT Lynepad
|
||||||
|
#define DESCRIPTION Macro Keypad
|
||||||
|
|
||||||
|
/* key matrix size */
|
||||||
|
#define MATRIX_ROWS 7
|
||||||
|
#define MATRIX_COLS 6
|
||||||
|
|
||||||
|
#define MATRIX_ROW_PINS { PC7, PF7, PF6 }
|
||||||
|
#define MATRIX_COL_PINS { PF0, PF1, PF4, PF5 }
|
||||||
|
#define UNUSED_PINS
|
||||||
|
|
||||||
|
/* COL2ROW or ROW2COL */
|
||||||
|
#define DIODE_DIRECTION COL2ROW // FIXME: Double check this actually works
|
||||||
|
|
||||||
|
/* Encoders */
|
||||||
|
#define ENCODERS_PAD_A { PD0, PB5 }
|
||||||
|
#define ENCODERS_PAD_B { PD1, PD6 }
|
||||||
|
|
||||||
|
/* Set 0 if debouncing isn't needed */
|
||||||
|
#define DEBOUNCE 5
|
||||||
|
|
||||||
|
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||||
|
#define LOCKING_SUPPORT_ENABLE
|
||||||
|
|
||||||
|
/* Locking resynchronize hack */
|
||||||
|
#define LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
|
#define RGB_DI_PIN PD3
|
||||||
|
#ifdef RGB_DI_PIN
|
||||||
|
#undef RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 4
|
||||||
|
#define RGBLIGHT_HUE_STEP 8
|
||||||
|
#define RGBLIGHT_SAT_STEP 8
|
||||||
|
#define RGBLIGHT_VAL_STEP 8
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 240
|
||||||
|
#define RGBLIGHT_SLEEP
|
||||||
|
#endif
|
19
qmk/keyboards/qvex/lynepad/keymaps/default/config.h
Normal file
19
qmk/keyboards/qvex/lynepad/keymaps/default/config.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
/* Copyright 2020 KemoNine
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
|
||||||
|
// place overrides here
|
59
qmk/keyboards/qvex/lynepad/keymaps/default/keymap.c
Normal file
59
qmk/keyboards/qvex/lynepad/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
/* Copyright 2020 KemoNine
|
||||||
|
*
|
||||||
|
* 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] = {
|
||||||
|
/* Keymap (Base Layer) Default Layer
|
||||||
|
* |----------------------------|
|
||||||
|
* | 1 | 2 | 3 | 4 | |
|
||||||
|
* | 5 | 6 | 7 | 8 | |
|
||||||
|
* | 9 | 10 | 11 | |
|
||||||
|
* |----------------------------|
|
||||||
|
*/
|
||||||
|
[0] = LAYOUT(
|
||||||
|
KC_NO, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1,
|
||||||
|
KC_NO, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT,
|
||||||
|
TO(0), TO(0), KC_NO
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) { /* First encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_WH_RIGHT);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_WH_LEFT);
|
||||||
|
}
|
||||||
|
} else if (index == 1) { /* Second encoder */
|
||||||
|
if (clockwise) {
|
||||||
|
tap_code(KC_MS_WH_DOWN);
|
||||||
|
} else {
|
||||||
|
tap_code(KC_MS_WH_UP);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_user(void) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void led_set_user(uint8_t usb_led) {
|
||||||
|
|
||||||
|
}
|
1
qmk/keyboards/qvex/lynepad/keymaps/default/readme.md
Normal file
1
qmk/keyboards/qvex/lynepad/keymaps/default/readme.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
# The default keymap for lynepad
|
2
qmk/keyboards/qvex/lynepad/lynepad.c
Normal file
2
qmk/keyboards/qvex/lynepad/lynepad.c
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
#include "lynepad.h"
|
||||||
|
|
37
qmk/keyboards/qvex/lynepad/lynepad.h
Normal file
37
qmk/keyboards/qvex/lynepad/lynepad.h
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/* Copyright 2020 KemoNine
|
||||||
|
*
|
||||||
|
* 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"
|
||||||
|
|
||||||
|
/* This a shortcut to help you visually see your layout.
|
||||||
|
*
|
||||||
|
* The first section contains all of the arguments representing the physical
|
||||||
|
* layout of the board and position of the keys.
|
||||||
|
*
|
||||||
|
* The second converts the arguments into a two-dimensional array which
|
||||||
|
* represents the switch matrix.
|
||||||
|
*/
|
||||||
|
#define LAYOUT( \
|
||||||
|
K00, K01, K02, K03, \
|
||||||
|
K10, K11, K12, K13, \
|
||||||
|
K20, K21, K22 \
|
||||||
|
) \
|
||||||
|
{ \
|
||||||
|
{ K00, K01, K02, K03 }, \
|
||||||
|
{ K10, K11, K12, K13 }, \
|
||||||
|
{ K20, K21, K22, KC_NO } \
|
||||||
|
}
|
13
qmk/keyboards/qvex/lynepad/readme.md
Normal file
13
qmk/keyboards/qvex/lynepad/readme.md
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# QVEX Lynepad
|
||||||
|
|
||||||
|
Macro pad with 11 keys and 2 rotary encoders.
|
||||||
|
|
||||||
|
Keyboard Maintainer: [KemoNine](https://git.kemonine.info/kemonine/keyboard)
|
||||||
|
Hardware Supported: QVEX Lynepad: macro keypad
|
||||||
|
Hardware Availability: Tindie [Keyboard Kit](https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/)
|
||||||
|
|
||||||
|
Make example for this macro pad (after setting up your build environment):
|
||||||
|
|
||||||
|
make qvex/lynepad:default
|
||||||
|
|
||||||
|
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
34
qmk/keyboards/qvex/lynepad/rules.mk
Normal file
34
qmk/keyboards/qvex/lynepad/rules.mk
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
# MCU name
|
||||||
|
MCU = atmega32u4
|
||||||
|
|
||||||
|
# Bootloader selection
|
||||||
|
# Teensy halfkay
|
||||||
|
# Pro Micro caterina
|
||||||
|
# Atmel DFU atmel-dfu
|
||||||
|
# LUFA DFU lufa-dfu
|
||||||
|
# QMK DFU qmk-dfu
|
||||||
|
# ATmega32A bootloadHID
|
||||||
|
# ATmega328P USBasp
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change yes to no to disable
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
|
||||||
|
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
|
||||||
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
|
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
NKRO_ENABLE = no # USB Nkey Rollover
|
||||||
|
BACKLIGHT_ENABLE = false # Enable keyboard backlight functionality on B7 by default
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
|
||||||
|
MIDI_ENABLE = no # MIDI support
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||||
|
HD44780_ENABLE = no # Enable support for HD44780 based LCDs
|
||||||
|
ENCODER_ENABLE = yes # Enable the encoders
|
7
qmk/keyboards/qvex/readme.md
Normal file
7
qmk/keyboards/qvex/readme.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# QVEX
|
||||||
|
|
||||||
|
QVEX is a keyboard vendor based in Czechia
|
||||||
|
|
||||||
|
## Online Stores
|
||||||
|
|
||||||
|
**Website:** https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/
|
Loading…
Reference in a new issue