mirror of
https://github.com/openstenoproject/qmk
synced 2024-11-10 02:30:07 +00:00
[Keymap] Big Drashna code update (#6639)
* Add a quefrency keymap * New Alt-ernate layouts * Enable Per Key Tapping Term to preserve sanity * Use underglow and mod lights for status on Corne * Update the drashna_ms keymap for quefrency * Disable Audio since there isn't enough space * Update KC_MAKE to ues :flash target * Cleanup ergodox layout * Enable i2c support for Iris * Add keymap support for CG_SWAP * Enable RGB Matrix Shutdown mode * enable heatmap * Update gitlab CI to install python3 * Remove game macros These are no longer needed, and haven't been used in ages * Cleanup planck layout * Add RGB Matrix fun and RGB cleanup * Add keycode and config for RGB Matrix idle animations * Clean up rgb idle animation code * Add rgb idle keycode to keymaps * Fix issues with rgb matrix idle animation * Fix some handling for idle animation * Reduce idle animation timeout to 15s to be more reasonable * fix up rgb stuff * Fix isses with rgb functions not being called for matrix * Use custom EEPROM Magic Number so testing is easier * Extend Default Layer macro to support a lot more layers * Fix bjohnson macropad * Adjust KC_MAKE to process mods for more consistent behavior * Fix up rgb stuff on corne * Corne OLED Overhaul * Fixes a number of issues with weirdness. * Fixes issues with keylogger (should be more reliable now) * Modulaize the OLED render sections * Rewrite layer display code * Update URL for Font Editor Due to odd issues, I ended up rewriting from scratch. And using PROGMEM versions, since I think I was getting memory overflows. * Update polling rate on all keebs * Fix planck ez layout config * Remove macros from Viterbi
This commit is contained in:
parent
79a6c6eda5
commit
e88f80a891
34 changed files with 440 additions and 368 deletions
|
@ -9,8 +9,8 @@
|
|||
#define PROGMEM
|
||||
#endif
|
||||
|
||||
// Helidox 8x6 font with QMK Firmware Logo
|
||||
// Online editor: http://teripom.x0.com/
|
||||
// Corne 8x6 font with QMK Firmware Logo
|
||||
// Online editor: https://helixfonteditor.netlify.com/
|
||||
|
||||
const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
|
|
@ -8,6 +8,14 @@ extern uint8_t is_master;
|
|||
// Following line allows macro to read current RGB settings
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
static uint32_t oled_timer = 0;
|
||||
static char keylog_str[6] = {};
|
||||
static uint16_t log_timer = 0;
|
||||
static const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void add_keylog(uint16_t keycode);
|
||||
#endif
|
||||
|
||||
enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
|
||||
|
||||
|
@ -19,7 +27,7 @@ enum crkbd_keycodes { RGBRST = NEW_SAFE_RANGE };
|
|||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, BK_LWER, DL_RAIS, KC_ENT, OS_RGUI \
|
||||
)
|
||||
|
@ -98,34 +106,42 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[_ADJUST] = LAYOUT_wrapper( \
|
||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET,
|
||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
|
||||
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, KC_MPLY,
|
||||
MG_NKRO, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL,
|
||||
_______, KC_NUKE, _______, _______, TG_MODS, _______
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_timer = timer_read32();
|
||||
add_keylog(keycode);
|
||||
#endif
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
if (keycode == RESET && !is_master) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
uint16_t oled_timer;
|
||||
|
||||
char keylog_str[5] = {};
|
||||
uint8_t keylogs_str_idx = 0;
|
||||
uint16_t log_timer = 0;
|
||||
|
||||
const char code_to_name[60] = {' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\', '#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
}
|
||||
|
||||
for (uint8_t i = 4; i > 0; i--) {
|
||||
for (uint8_t i = 4; i > 0; --i) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
|
||||
if (keycode < 60) {
|
||||
keylog_str[0] = code_to_name[keycode];
|
||||
}
|
||||
keylog_str[5] = 0;
|
||||
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
@ -136,149 +152,118 @@ void update_log(void) {
|
|||
}
|
||||
}
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
add_keylog(keycode);
|
||||
oled_timer = timer_read();
|
||||
}
|
||||
return true;
|
||||
void render_keylogger_status(void) {
|
||||
oled_write_P(PSTR("KLogr"), false);
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
void render_rgb_status(void) {
|
||||
oled_write_ln("RGB:", false);
|
||||
static char temp[20] = {0};
|
||||
snprintf(temp, sizeof(temp) + 1, "M:%3dH:%3dS:%3dV:%3d", rgb_matrix_config.mode, rgb_matrix_config.hsv.h, rgb_matrix_config.hsv.s, rgb_matrix_config.hsv.v);
|
||||
oled_write(temp, false);
|
||||
void render_default_layer_state(void) {
|
||||
oled_write_P(PSTR("Lyout"), false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR(" QRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR(" COLE"), false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write_P(PSTR(" DVRK"), false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write_P(PSTR(" WKMN"), false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write_P(PSTR(" NORM"), false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write_P(PSTR(" MLTN"), false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write_P(PSTR(" ECLN"), false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write_P(PSTR(" CRPX"), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void render_layer_state(void) {
|
||||
oled_write_P(PSTR("LAYER"), false);
|
||||
oled_write_P(PSTR("Lower"), layer_state_is(_LOWER));
|
||||
oled_write_P(PSTR("Raise"), layer_state_is(_RAISE));
|
||||
oled_write_P(PSTR(" Mods"), layer_state_is(_MODS));
|
||||
}
|
||||
|
||||
void render_keylock_status(uint8_t led_usb_state) {
|
||||
oled_write_P(PSTR("Lock:"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("NUM "), led_usb_state & (1 << USB_LED_NUM_LOCK));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("CAPS"), led_usb_state & (1 << USB_LED_CAPS_LOCK));
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("SCRL"), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
|
||||
}
|
||||
|
||||
void render_mod_status(uint8_t modifiers) {
|
||||
oled_write_P(PSTR("Mods:"), false);
|
||||
oled_write_P(PSTR(" SHFT"), (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write_P(PSTR(" CTRL"), (modifiers & MOD_MASK_CTRL));
|
||||
oled_write_P(PSTR(" ALT "), (modifiers & MOD_MASK_ALT));
|
||||
oled_write_P(PSTR(" GUI "), (modifiers & MOD_MASK_GUI));
|
||||
}
|
||||
|
||||
void render_bootmagic_status(void) {
|
||||
/* Show Ctrl-Gui Swap options */
|
||||
static const char PROGMEM logo[][2][3] = {
|
||||
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
|
||||
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
|
||||
};
|
||||
oled_write_P(PSTR("BTMGK"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(logo[0][0], !keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(logo[1][0], keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(logo[0][1], !keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(logo[1][1], keymap_config.swap_lctl_lgui);
|
||||
oled_write_P(PSTR(" NKRO"), keymap_config.nkro);
|
||||
}
|
||||
|
||||
void render_user_status(void) {
|
||||
oled_write_P(PSTR("USER:"), false);
|
||||
oled_write_P(PSTR(" Anim"), userspace_config.rgb_matrix_idle_anim);
|
||||
oled_write_P(PSTR(" Layr"), userspace_config.rgb_layer_change);
|
||||
oled_write_P(PSTR(" Nuke"), userspace_config.nuke_switch);
|
||||
}
|
||||
|
||||
void render_status_main(void) {
|
||||
/* Show Keyboard Layout */
|
||||
oled_write("Lyout", false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write(" QRTY", false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write(" COLE", false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write(" DVRK", false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write(" WKMN", false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write(" NORM", false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write(" MLTN", false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write(" ECLN", false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write(" CRPX", false);
|
||||
break;
|
||||
}
|
||||
render_default_layer_state();
|
||||
render_keylock_status(host_keyboard_leds());
|
||||
render_bootmagic_status();
|
||||
render_user_status();
|
||||
|
||||
/* Show Lock Status (only work on master side) */
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
oled_write("Lock:", false);
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("NUM", led_usb_state & (1 << USB_LED_NUM_LOCK));
|
||||
oled_write(" ", false);
|
||||
oled_write("CAPS", led_usb_state & (1 << USB_LED_CAPS_LOCK));
|
||||
oled_write(" ", false);
|
||||
oled_write("SCRL", led_usb_state & (1 << USB_LED_SCROLL_LOCK));
|
||||
|
||||
/* Show Alt-Gui Swap options */
|
||||
oled_write("BTMGK", false);
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("Win", !keymap_config.swap_lalt_lgui);
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("Mac", keymap_config.swap_lalt_lgui);
|
||||
|
||||
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
/* Show RGB Options */
|
||||
render_rgb_status();
|
||||
# endif
|
||||
|
||||
oled_write(keylog_str, false);
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
void render_status_secondary(void) {
|
||||
/* Show Keyboard Layout */
|
||||
oled_write("Lyout", false);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write(" QRTY", false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write(" COLE", false);
|
||||
break;
|
||||
case _DVORAK:
|
||||
oled_write(" DVRK", false);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
oled_write(" WKMN", false);
|
||||
break;
|
||||
case _NORMAN:
|
||||
oled_write(" NORM", false);
|
||||
break;
|
||||
case _MALTRON:
|
||||
oled_write(" MLTN", false);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
oled_write(" ECLN", false);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
oled_write(" CRPX", false);
|
||||
break;
|
||||
}
|
||||
render_default_layer_state();
|
||||
render_layer_state();
|
||||
render_mod_status(get_mods()|get_oneshot_mods());
|
||||
|
||||
/* Show Activate layer */
|
||||
oled_write("Layer", false);
|
||||
switch (biton32(layer_state)) {
|
||||
case _RAISE:
|
||||
oled_write("Raise", false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write("Lower", false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write("Adjst", false);
|
||||
break;
|
||||
default:
|
||||
oled_write("Dflt ", false);
|
||||
break;
|
||||
}
|
||||
|
||||
/* Show Mod */
|
||||
uint8_t modifiers = get_mods() | get_oneshot_mods();
|
||||
|
||||
oled_write("Mods:", false);
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("SFT", (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("CTL", (modifiers & MOD_MASK_CTRL));
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("ALT", (modifiers & MOD_MASK_ALT));
|
||||
oled_write(" ", false);
|
||||
oled_write_ln("GUI", (modifiers & MOD_MASK_GUI));
|
||||
|
||||
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
render_rgb_status();
|
||||
# endif
|
||||
|
||||
/* Show logged Keys */
|
||||
oled_write(keylog_str, false);
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
if (timer_elapsed(oled_timer) > 60000) {
|
||||
if (timer_elapsed32(oled_timer) > 30000) {
|
||||
oled_off();
|
||||
return;
|
||||
}
|
||||
#ifndef SPLIT_KEYBOARD
|
||||
else { oled_on(); }
|
||||
#endif
|
||||
|
||||
update_log();
|
||||
if (is_master) {
|
||||
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
|
@ -286,7 +271,6 @@ void oled_task_user(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) { update_log(); }
|
||||
#endif
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
|
@ -300,25 +284,43 @@ uint16_t get_tapping_term(uint16_t keycode) {
|
|||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
static bool is_suspended;
|
||||
static bool rgb_matrix_enabled;
|
||||
|
||||
void suspend_power_down_keymap(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
if (!is_suspended) {
|
||||
is_suspended = true;
|
||||
rgb_matrix_enabled = (bool)rgb_matrix_config.enable;
|
||||
rgb_matrix_disable_noeeprom();
|
||||
}
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_keymap(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
is_suspended = false;
|
||||
if (rgb_matrix_enabled) {
|
||||
rgb_matrix_enable_noeeprom();
|
||||
}
|
||||
|
||||
void check_default_layer(uint8_t mode, uint8_t type) {
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
rgb_matrix_layer_helper(HSV_CYAN, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
rgb_matrix_layer_helper(HSV_MAGENTA, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _DVORAK:
|
||||
rgb_matrix_layer_helper(HSV_SPRINGGREEN, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
rgb_matrix_layer_helper(HSV_GOLDENROD, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _NORMAN:
|
||||
rgb_matrix_layer_helper(HSV_CORAL, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _MALTRON:
|
||||
rgb_matrix_layer_helper(HSV_YELLOW, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
rgb_matrix_layer_helper(HSV_PINK, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
rgb_matrix_layer_helper(HSV_BLUE, mode, rgb_matrix_config.speed, type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void rgb_matrix_indicators_user(void) {
|
||||
if (userspace_config.rgb_layer_change &&
|
||||
# ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
|
@ -332,51 +334,26 @@ void rgb_matrix_indicators_user(void) {
|
|||
) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _GAMEPAD:
|
||||
rgb_matrix_layer_helper(HSV_ORANGE, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_layer_helper(HSV_ORANGE, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _DIABLO:
|
||||
rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _RAISE:
|
||||
rgb_matrix_layer_helper(HSV_YELLOW, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_layer_helper(HSV_YELLOW, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _LOWER:
|
||||
rgb_matrix_layer_helper(HSV_GREEN, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_layer_helper(HSV_GREEN, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _ADJUST:
|
||||
rgb_matrix_layer_helper(HSV_RED, 1, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
rgb_matrix_layer_helper(HSV_RED, 0, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
default: {
|
||||
bool mods_enabled = IS_LAYER_ON(_MODS);
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
rgb_matrix_layer_helper(HSV_CYAN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
rgb_matrix_layer_helper(HSV_MAGENTA, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _DVORAK:
|
||||
rgb_matrix_layer_helper(HSV_SPRINGGREEN, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _WORKMAN:
|
||||
rgb_matrix_layer_helper(HSV_GOLDENROD, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _NORMAN:
|
||||
rgb_matrix_layer_helper(HSV_CORAL, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _MALTRON:
|
||||
rgb_matrix_layer_helper(HSV_YELLOW, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _EUCALYN:
|
||||
rgb_matrix_layer_helper(HSV_PINK, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
case _CARPLAX:
|
||||
rgb_matrix_layer_helper(HSV_BLUE, mods_enabled, rgb_matrix_config.speed, LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
}
|
||||
check_default_layer(IS_LAYER_ON(_MODS), LED_FLAG_UNDERGLOW);
|
||||
break;
|
||||
}
|
||||
}
|
||||
check_default_layer(0, LED_FLAG_MODIFIER);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
) \
|
||||
LAYOUT_gergo_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
|
||||
)
|
||||
|
|
|
@ -19,8 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
// #define USE_SERIAL
|
||||
#define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
LAYOUT_wrapper( \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, LT(_LOWER,KC_BSPC), LT(_RAISE,KC_DEL), KC_ENT, RAISE \
|
||||
)
|
||||
|
|
|
@ -5,14 +5,13 @@ CONSOLE_ENABLE = no # Console for debug(+400)
|
|||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
TAP_DANCE_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
SWAP_HANDS_ENABLE = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
INDICATOR_LIGHTS = no
|
||||
MACROS_ENABLED = no
|
||||
RGBLIGHT_TWINKLE = no
|
||||
RGBLIGHT_STARTUP_ANIMATION = no
|
||||
|
||||
|
|
39
keyboards/keebio/quefrency/keymaps/drashna_ms/config.h
Normal file
39
keyboards/keebio/quefrency/keymaps/drashna_ms/config.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2018 Danny Nguyen <danny@keeb.io>
|
||||
|
||||
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
|
||||
|
||||
// #define USE_I2C
|
||||
#define EE_HANDS
|
||||
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT_SPLIT
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 17
|
||||
#define RGBLED_SPLIT { 9, 8 }
|
||||
#define RGBLIGHT_SLEEP
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define B7_AUDIO
|
||||
#define AUDIO_CLICKY
|
||||
#endif
|
43
keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c
Normal file
43
keyboards/keebio/quefrency/keymaps/drashna_ms/keymap.c
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include "version.h"
|
||||
|
||||
enum layers {
|
||||
_BASE,
|
||||
_FN1,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_MAKE = SAFE_RANGE,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_65_with_macro(
|
||||
KC_F1, KC_F2, 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, XXXXXXX, KC_BSPC, KC_HOME, \
|
||||
KC_F3, KC_F4, 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_END, \
|
||||
KC_F5, KC_F6, KC_CAPS, 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_PGUP, \
|
||||
KC_F7, KC_F8, 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_PGDN, \
|
||||
KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN1), KC_SPC, XXXXXXX, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_FN1] = LAYOUT_65_with_macro(
|
||||
_______, _______, KC_GESC, 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_BSPC, RESET, \
|
||||
_______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, EEP_RST, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||
if (!record->event.pressed)
|
||||
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP ":dfu" SS_TAP(X_ENTER)), 10);
|
||||
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
5
keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk
Normal file
5
keyboards/keebio/quefrency/keymaps/drashna_ms/rules.mk
Normal file
|
@ -0,0 +1,5 @@
|
|||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
||||
EXTRAKEY_ENABLE = yes
|
||||
AUDIO_ENABLE = yes
|
||||
BOOTLOADER = qmk-dfu
|
|
@ -10,7 +10,6 @@ extern keymap_config_t keymap_config;
|
|||
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define LMACRO OSL(_MACROS)
|
||||
#define DIABLO TG(_DIABLO)
|
||||
#define GAMEPAD TG(_GAMEPAD)
|
||||
#define MEDIA TT(_MEDIA)
|
||||
|
@ -23,7 +22,7 @@ extern keymap_config_t keymap_config;
|
|||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_NUMLOCK] = LAYOUT_ortho_5x7(
|
||||
LMACRO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS,
|
||||
KC_NO, DIABLO, GAMEPAD, KC_NLCK, KC_SLCK, KC_COLN, KC_PSLS,
|
||||
MEDIA, KC_CALC, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PAST,
|
||||
KC_HOME, KC_DEL, KC_PGUP, KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||
KC_END, KC_UP, KC_PGDN, KC_P1, KC_P2, KC_P3, KC_PPLS,
|
||||
|
@ -39,22 +38,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
),
|
||||
|
||||
[_GAMEPAD] = LAYOUT_ortho_5x7( // Game pad layout designed primarily for Overwatch
|
||||
LMACRO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4,
|
||||
KC_NO, KC_ESC, GAMEPAD, KC_1, KC_2, KC_3, KC_4,
|
||||
MEDIA, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T,
|
||||
KC_Z, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G,
|
||||
KC_Y, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B,
|
||||
KC_F1, KC_U, KC_I, KC_Y, KC_V, KC_SPC, KC_V
|
||||
),
|
||||
|
||||
[_MACROS] = LAYOUT_ortho_5x7(
|
||||
LMACRO, KC_OVERWATCH,GAMEPAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_C9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_SYMM, KC_TORB, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_GLHF, KC_GOODGAME, KC_GGEZ, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_SALT, KC_MORESALT, KC_SALTHARD, KC_JUSTGAME, KC_AIM, XXXXXXX, KC_PENT
|
||||
),
|
||||
|
||||
|
||||
[_MEDIA] = LAYOUT_ortho_5x7(
|
||||
KC_MAKE, KC_RESET,MU_TOG, AU_ON, AU_OFF, CK_TOGG, RGB_SAD,
|
||||
MEDIA, EEP_RST, KC_RGB_T,RGB_M_P, RGB_M_B, RGB_M_R, RGB_SAI,
|
||||
|
|
|
@ -11,7 +11,6 @@ SPLIT_KEYBOARD = no
|
|||
SPACE_CADET_ENABLE = no
|
||||
|
||||
NO_SECRETS = yes
|
||||
MACROS_ENABLED = yes
|
||||
INDICATOR_LIGHTS = no
|
||||
RGBLIGHT_TWINKLE = no
|
||||
LAYOUTS = ortho_5x7
|
||||
|
|
|
@ -38,7 +38,7 @@ uint8_t last_osm;
|
|||
) \
|
||||
LAYOUT_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \
|
||||
)
|
||||
#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
|
||||
|
|
|
@ -10,7 +10,6 @@ NKRO_ENABLE = yes
|
|||
SPACE_CADET_ENABLE = no
|
||||
|
||||
INDICATOR_LIGHTS = yes
|
||||
MACROS_ENABLED = no
|
||||
RGBLIGHT_TWINKLE = no
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
|
||||
|
|
|
@ -14,3 +14,5 @@
|
|||
|
||||
#undef DEBOUNCE
|
||||
#define DEBOUNCE 15
|
||||
|
||||
#define TAPPING_TERM_PER_KEY
|
||||
|
|
|
@ -23,8 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#ifndef UNICODE_ENABLE
|
||||
# define UC(x) KC_NO
|
||||
#endif
|
||||
|
||||
extern userspace_config_t userspace_config;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
extern rgblight_config_t rgblight_config;
|
||||
#endif
|
||||
|
||||
enum more_custom_keycodes { KC_SWAP_NUM = NEW_SAFE_RANGE };
|
||||
|
||||
|
@ -40,7 +41,7 @@ bool skip_leds = false;
|
|||
LAYOUT_ergodox_pretty_wrapper( \
|
||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_C1R3, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
|
||||
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
|
||||
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
||||
|
@ -291,8 +292,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[_ADJUST] = LAYOUT_ergodox_pretty_wrapper(
|
||||
KC_MAKE, _______, _______, _______, _______, _______, _______, KC_NUKE, _________________ADJUST_R1_________________, KC_RST,
|
||||
VRSN, _________________ADJUST_L1_________________, _______, _______, _______, _______, _______, _______, _______, EEP_RST,
|
||||
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, TG(_MODS),
|
||||
_______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, KC_MPLY,
|
||||
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL,
|
||||
_______, _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, TG(_MODS),
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______,
|
||||
|
@ -464,3 +465,13 @@ void rgb_matrix_indicators_user(void) {
|
|||
}
|
||||
|
||||
#endif // RGB_MATRIX_INIT
|
||||
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
if (keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) {
|
||||
if (mod_config(keycode & 0xf) & MOD_MASK_ALT) {
|
||||
return (2 * TAPPING_TERM);
|
||||
}
|
||||
}
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ BOOTMAGIC_ENABLE = yes
|
|||
UNICODE_ENABLE = yes
|
||||
UNICDOEMAP_ENABLE = no
|
||||
|
||||
MACROS_ENABLED = no
|
||||
RGBLIGHT_TWINKLE = no
|
||||
INDICATOR_LIGHTS = no
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
||||
#define RGB_DI_PIN B7
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#define RGBLED_NUM 13 // Number of LEDs
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
|
|
|
@ -25,9 +25,10 @@ void keyboard_post_init_user(void) {
|
|||
uint8_t temp_mode = rgblight_config.mode;
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
for (uint16_t i = 360; i > 0; i--) {
|
||||
rgblight_sethsv_noeeprom( ( i + 180) % 360, 255, 255);
|
||||
wait_ms(8);
|
||||
for (uint16_t i = 255; i > 0; i--) {
|
||||
rgblight_sethsv_noeeprom( ( i + 128) % 255, 255, 255);
|
||||
matrix_scan();
|
||||
wait_ms(10);
|
||||
}
|
||||
led_set_user(host_keyboard_leds());
|
||||
rgblight_mode_noeeprom(temp_mode);
|
||||
|
|
|
@ -5,6 +5,5 @@ NO_SECRETS = yes
|
|||
BOOTMAGIC_ENABLE = lite
|
||||
INDICATOR_LIGHTS = no
|
||||
RGBLIGHT_TWINKLE = yes
|
||||
MACROS_ENABLED = no
|
||||
MAKE_BOOTLOADER = yes
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||
|
|
|
@ -27,6 +27,9 @@ enum planck_keycodes {
|
|||
};
|
||||
#else
|
||||
# define BACKLIT OSM(MOD_LSFT)
|
||||
enum planck_keycodes {
|
||||
TH_LVL = NEW_SAFE_RANGE,
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef KEYBOARD_planck_ez
|
||||
|
@ -48,8 +51,8 @@ enum planck_keycodes {
|
|||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||
) \
|
||||
LAYOUT_ortho_4x12_wrapper( \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_DEL, \
|
||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RALT_T(KC_QUOT), \
|
||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
|
||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
)
|
||||
|
@ -117,7 +120,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC,
|
||||
KC_DEL, _________________LOWER_L2__________________, _________________LOWER_R2__________________, KC_PIPE,
|
||||
_______, _________________LOWER_L3__________________, _________________LOWER_R3__________________, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_ortho_4x12_wrapper(
|
||||
|
@ -130,8 +133,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[_ADJUST] = LAYOUT_ortho_4x12_wrapper(
|
||||
KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RST,
|
||||
VRSN, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, EEP_RST,
|
||||
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NUKE
|
||||
TH_LVL, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, RGB_IDL,
|
||||
_______, _______, _______, _______, _______, KC_NUKE, _______, _______, _______, _______, _______, TG_MODS
|
||||
)
|
||||
|
||||
};
|
||||
|
@ -149,7 +152,20 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
#endif
|
||||
#ifdef KEYBOARD_planck_ez
|
||||
case TH_LVL:
|
||||
if (record->event.pressed) {
|
||||
keyboard_config.led_level++;
|
||||
if (keyboard_config.led_level > 4) {
|
||||
keyboard_config.led_level = 0;
|
||||
}
|
||||
planck_ez_right_led_level((uint8_t)keyboard_config.led_level * 255 / 4 );
|
||||
planck_ez_left_led_level((uint8_t)keyboard_config.led_level * 255 / 4 );
|
||||
eeconfig_update_kb(keyboard_config.raw);
|
||||
layer_state_set_kb(layer_state);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
@ -265,7 +281,7 @@ void rgb_matrix_indicators_user(void) {
|
|||
break;
|
||||
}
|
||||
if ((this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
|
||||
if (!layer_state_cmp(layer_state, _ADJUST)) { rgb_matrix_set_color(24, 0x00, 0xFF, 0x00); }
|
||||
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
|
||||
}
|
||||
if ((this_mod | this_osm) & MOD_MASK_CTRL) {
|
||||
|
@ -353,18 +369,18 @@ void dip_update(uint8_t index, bool active) {
|
|||
|
||||
#ifdef KEYBOARD_planck_ez
|
||||
layer_state_t layer_state_set_keymap(layer_state_t state) {
|
||||
palClearPad(GPIOB, 8);
|
||||
palClearPad(GPIOB, 9);
|
||||
planck_ez_left_led_off();
|
||||
planck_ez_right_led_off();
|
||||
switch (biton32(state)) {
|
||||
case _LOWER:
|
||||
palSetPad(GPIOB, 9);
|
||||
planck_ez_left_led_on();
|
||||
break;
|
||||
case _RAISE:
|
||||
palSetPad(GPIOB, 8);
|
||||
planck_ez_right_led_on();
|
||||
break;
|
||||
case _ADJUST:
|
||||
palSetPad(GPIOB, 9);
|
||||
palSetPad(GPIOB, 8);
|
||||
planck_ez_right_led_on();
|
||||
planck_ez_left_led_on();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -33,6 +33,3 @@ NKRO_ENABLE = no
|
|||
else
|
||||
NKRO_ENABLE = yes
|
||||
endif
|
||||
|
||||
|
||||
MACROS_ENABLED = no
|
||||
|
|
|
@ -29,10 +29,11 @@
|
|||
LAYOUT_ortho_5x12_wrapper( \
|
||||
KC_GRV, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_BSPC, \
|
||||
KC_ESC, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, KC_QUOT, \
|
||||
KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, CTL_T(K3A), KC_ENT, \
|
||||
KC_ESC, ALT_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, K2A, RALT_T(KC_QUOT), \
|
||||
KC_MLSF, CTL_T(K31), K32, K33, K34, K35, K36, K37, K38, K39, RCTL_T(K3A), KC_ENT, \
|
||||
KC_NO, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||
)
|
||||
|
||||
#define LAYOUT_ortho_5x12_base_wrapper(...) LAYOUT_ortho_5x12_base(__VA_ARGS__)
|
||||
|
||||
|
||||
|
@ -132,7 +133,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
[_ADJUST] = LAYOUT_ortho_5x12_wrapper( \
|
||||
KC_MAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RST,
|
||||
VRSN, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, EEP_RST,
|
||||
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, _______,
|
||||
_______, _________________ADJUST_L2_________________, _________________ADJUST_R2_________________, RGB_IDL,
|
||||
_______, _________________ADJUST_L3_________________, _________________ADJUST_R3_________________, TG_MODS,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
|
|
@ -18,6 +18,3 @@ NKRO_ENABLE = no
|
|||
else
|
||||
NKRO_ENABLE = yes
|
||||
endif
|
||||
|
||||
|
||||
MACROS_ENABLED = no
|
||||
|
|
|
@ -10,7 +10,7 @@ QMK Firmware:
|
|||
image: ubuntu:18.10
|
||||
before_script:
|
||||
- apt-get update -qy
|
||||
- apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr unzip wget zip
|
||||
- apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi git libnewlib-arm-none-eabi gcc-avr python3 unzip wget zip
|
||||
- avr-gcc --version
|
||||
- uname -a
|
||||
script:
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
// Use custom magic number so that when switching branches, EEPROM always gets reset
|
||||
#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1337
|
||||
|
||||
/* Set Polling rate to 1000Hz */
|
||||
#define USB_POLLING_INTERVAL_MS 1
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
# if __GNUC__ > 7
|
||||
# if __has_include("drashna_song_list.h")
|
||||
|
|
|
@ -25,26 +25,7 @@ userspace_config_t userspace_config;
|
|||
# define DRASHNA_UNICODE_MODE 2
|
||||
#endif
|
||||
|
||||
// This block is for all of the gaming macros, as they were all doing
|
||||
// the same thing, but with differring text sent.
|
||||
bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
|
||||
if (!record->event.pressed || override) {
|
||||
uint16_t keycode;
|
||||
if (userspace_config.is_overwatch) {
|
||||
keycode = KC_BSPC;
|
||||
} else {
|
||||
keycode = KC_ENTER;
|
||||
}
|
||||
clear_keyboard();
|
||||
tap_code(keycode);
|
||||
wait_ms(TAP_CODE_DELAY);
|
||||
send_string_with_delay(str, TAP_CODE_DELAY);
|
||||
wait_ms(TAP_CODE_DELAY);
|
||||
tap_code(KC_ENTER);
|
||||
}
|
||||
if (override) wait_ms(3000);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) {
|
||||
static uint16_t this_timer;
|
||||
|
@ -123,7 +104,7 @@ __attribute__((weak))
|
|||
void keyboard_post_init_keymap(void) {}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
keyboard_post_init_rgb();
|
||||
#endif
|
||||
keyboard_post_init_keymap();
|
||||
|
@ -132,6 +113,8 @@ void keyboard_post_init_user(void) {
|
|||
__attribute__((weak))
|
||||
void shutdown_keymap(void) {}
|
||||
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
|
||||
void shutdown_user(void) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
rgblight_enable_noeeprom();
|
||||
|
@ -139,9 +122,9 @@ void shutdown_user(void) {
|
|||
rgblight_setrgb_red();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// uint16_t timer_start = timer_read();
|
||||
// rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
|
||||
// while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
|
||||
rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
|
||||
rgb_matrix_update_pwm_buffers();
|
||||
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
shutdown_keymap();
|
||||
}
|
||||
|
@ -176,7 +159,7 @@ void matrix_scan_user(void) {
|
|||
run_diablo_macro_check();
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
matrix_scan_rgb();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
|
@ -190,7 +173,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
|
|||
// Then runs keymap's layer change check
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
state = layer_state_set_rgb(state);
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
return layer_state_set_keymap(state);
|
||||
|
@ -203,7 +186,7 @@ layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state
|
|||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
state = default_layer_state_set_keymap(state);
|
||||
#if 0
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
state = default_layer_state_set_rgb(state);
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
#endif
|
||||
|
|
|
@ -49,13 +49,8 @@ enum userspace_layers {
|
|||
_ADJUST,
|
||||
};
|
||||
|
||||
/*
|
||||
define modifiers here, since MOD_* doesn't seem to work for these
|
||||
*/
|
||||
|
||||
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
|
||||
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
|
||||
bool send_game_macro(const char *str, keyrecord_t *record, bool override);
|
||||
void matrix_init_keymap(void);
|
||||
void shutdown_keymap(void);
|
||||
void suspend_power_down_keymap(void);
|
||||
|
@ -69,11 +64,12 @@ void eeconfig_init_keymap(void);
|
|||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool rgb_layer_change :1;
|
||||
bool is_overwatch :1;
|
||||
bool nuke_switch :1;
|
||||
uint8_t unicode_mod :4;
|
||||
bool swapped_numbers :1;
|
||||
bool rgb_layer_change :1;
|
||||
bool is_overwatch :1;
|
||||
bool nuke_switch :1;
|
||||
uint8_t unicode_mod :4;
|
||||
bool swapped_numbers :1;
|
||||
bool rgb_matrix_idle_anim :1;
|
||||
};
|
||||
} userspace_config_t;
|
||||
|
||||
|
|
|
@ -21,16 +21,23 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
#endif // KEYLOGGER_ENABLE
|
||||
|
||||
switch (keycode) {
|
||||
case KC_QWERTY ... KC_CARPLAX:
|
||||
case KC_QWERTY ... KC_WORKMAN:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(keycode - KC_QWERTY);
|
||||
uint8_t mods = mod_config(get_mods()|get_oneshot_mods());
|
||||
if (!mods) {
|
||||
set_single_persistent_default_layer(keycode - KC_QWERTY);
|
||||
} else if (mods & MOD_MASK_SHIFT) {
|
||||
set_single_persistent_default_layer(keycode - KC_QWERTY + 4);
|
||||
} else if (mods & MOD_MASK_CTRL) {
|
||||
set_single_persistent_default_layer(keycode - KC_QWERTY + 8);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
|
||||
if (!record->event.pressed) {
|
||||
uint8_t temp_mod = get_mods();
|
||||
uint8_t temp_osm = get_oneshot_mods();
|
||||
uint8_t temp_mod = mod_config(get_mods());
|
||||
uint8_t temp_osm = mod_config(get_oneshot_mods());
|
||||
clear_mods();
|
||||
clear_oneshot_mods();
|
||||
send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
|
||||
|
@ -38,15 +45,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
|
||||
#endif
|
||||
{
|
||||
#if defined(__arm__)
|
||||
send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY);
|
||||
#elif defined(BOOTLOADER_DFU)
|
||||
send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY);
|
||||
#elif defined(BOOTLOADER_HALFKAY)
|
||||
send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY);
|
||||
#elif defined(BOOTLOADER_CATERINA)
|
||||
send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY);
|
||||
#endif // bootloader options
|
||||
send_string_with_delay_P(PSTR(":flash"), TAP_CODE_DELAY);
|
||||
}
|
||||
if ((temp_mod | temp_osm) & MOD_MASK_CTRL) {
|
||||
send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY);
|
||||
|
@ -68,44 +67,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
break;
|
||||
|
||||
// These are a serious of gaming macros.
|
||||
// Only enables for the viterbi, basically,
|
||||
// to save on firmware space, since it's limited.
|
||||
#ifdef MACROS_ENABLED
|
||||
case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
|
||||
if (record->event.pressed) {
|
||||
userspace_config.is_overwatch ^= 1;
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
}
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
break;
|
||||
case KC_SALT:
|
||||
return send_game_macro("Salt, salt, salt...", record, false);
|
||||
case KC_MORESALT:
|
||||
return send_game_macro("Please sir, can I have some more salt?!", record, false);
|
||||
case KC_SALTHARD:
|
||||
return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false);
|
||||
case KC_GOODGAME:
|
||||
return send_game_macro("Good game, everyone!", record, false);
|
||||
case KC_GLHF:
|
||||
return send_game_macro("Good luck, have fun!!!", record, false);
|
||||
case KC_SYMM:
|
||||
return send_game_macro("Left click to win!", record, false);
|
||||
case KC_JUSTGAME:
|
||||
return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false);
|
||||
case KC_TORB:
|
||||
return send_game_macro("That was positively riveting!", record, false);
|
||||
case KC_AIM:
|
||||
send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true);
|
||||
return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false);
|
||||
case KC_C9:
|
||||
return send_game_macro("OMG!!! C9!!!", record, false);
|
||||
case KC_GGEZ:
|
||||
return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false);
|
||||
#endif // MACROS_ENABLED
|
||||
|
||||
case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
if (record->event.pressed) {
|
||||
|
|
|
@ -13,25 +13,10 @@ enum userspace_custom_keycodes {
|
|||
KC_COLEMAK, // Sets default layer to COLEMAK
|
||||
KC_DVORAK, // Sets default layer to DVORAK
|
||||
KC_WORKMAN, // Sets default layer to WORKMAN
|
||||
KC_NORMAN, // Sets default layer to NORMAN
|
||||
KC_MALTRON, // Sets default layer to MALTRON
|
||||
KC_EUCALYN, // Sets default layer to EUCALYN
|
||||
KC_CARPLAX, // Sets default layer to CARPLAX
|
||||
KC_DIABLO_CLEAR, // Clears all Diablo Timers
|
||||
KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat)
|
||||
KC_SALT, // See drashna.c for details
|
||||
KC_MORESALT,
|
||||
KC_SALTHARD,
|
||||
KC_GOODGAME,
|
||||
KC_SYMM,
|
||||
KC_JUSTGAME,
|
||||
KC_GLHF,
|
||||
KC_TORB,
|
||||
KC_AIM,
|
||||
KC_C9,
|
||||
KC_GGEZ,
|
||||
KC_MAKE, // Run keyboard's customized make command
|
||||
KC_RGB_T, // Toggles RGB Layer Indication mode
|
||||
RGB_IDL, // RGB Idling animations
|
||||
KC_SECRET_1, // test1
|
||||
KC_SECRET_2, // test2
|
||||
KC_SECRET_3, // test3
|
||||
|
|
|
@ -5,12 +5,24 @@
|
|||
#if defined(RGBLIGHT_ENABLE)
|
||||
extern rgblight_config_t rgblight_config;
|
||||
bool has_initialized;
|
||||
#endif
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
void rgblight_sethsv_default_helper(uint8_t index) { rgblight_sethsv_at(rgblight_config.hue, rgblight_config.sat, rgblight_config.val, index); }
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE)
|
||||
static uint32_t hypno_timer;
|
||||
# if defined(SPLIT_KEYBOARD) || defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_crkbd)
|
||||
# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN_DUAL
|
||||
# else
|
||||
# define RGB_MATRIX_REST_MODE RGB_MATRIX_CYCLE_OUT_IN
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Custom indicators for modifiers.
|
||||
* This allows for certain lights to be lit up, based on what mods are active, giving some visual feedback.
|
||||
* This is especially useful for One Shot Mods, since it's not always obvious if they're still lit up.
|
||||
*/
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
|
||||
if (userspace_config.rgb_layer_change && biton32(layer_state) == 0) {
|
||||
|
@ -77,6 +89,7 @@ void set_rgb_indicators(uint8_t this_mod, uint8_t this_led, uint8_t this_osm) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Function for the indicators */
|
||||
void matrix_scan_indicator(void) {
|
||||
if (has_initialized) {
|
||||
set_rgb_indicators(get_mods(), host_keyboard_leds(), get_oneshot_mods());
|
||||
|
@ -89,6 +102,7 @@ static rgblight_fadeout lights[RGBLED_NUM];
|
|||
|
||||
__attribute__((weak)) bool rgblight_twinkle_is_led_used_keymap(uint8_t index) { return false; }
|
||||
|
||||
/* This function checks for used LEDs. This way, collisions don't occur and cause weird rendering */
|
||||
bool rgblight_twinkle_is_led_used(uint8_t index) {
|
||||
switch (index) {
|
||||
# ifdef INDICATOR_LIGHTS
|
||||
|
@ -130,6 +144,7 @@ bool rgblight_twinkle_is_led_used(uint8_t index) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Handler for fading/twinkling effect */
|
||||
void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgblight_sethsv is supppppper intensive
|
||||
bool litup = false;
|
||||
for (uint8_t light_index = 0; light_index < RGBLED_NUM; ++light_index) {
|
||||
|
@ -156,6 +171,9 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rg
|
|||
}
|
||||
}
|
||||
|
||||
/* Triggers a LED to fade/twinkle.
|
||||
* This function handles the selection of the LED and prepres for it to be used.
|
||||
*/
|
||||
void start_rgb_light(void) {
|
||||
uint8_t indices[RGBLED_NUM];
|
||||
uint8_t indices_count = 0;
|
||||
|
@ -194,12 +212,23 @@ void start_rgb_light(void) {
|
|||
rgblight_sethsv_at(light->hue, 255, light->life, light_index);
|
||||
}
|
||||
#endif
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
||||
uint16_t temp_keycode = keycode;
|
||||
// Filter out the actual keycode from MT and LT keys.
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
temp_keycode &= 0xFF;
|
||||
}
|
||||
switch (keycode) {
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
hypno_timer = timer_read32();
|
||||
if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_REST_MODE) {
|
||||
rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP);
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (temp_keycode) {
|
||||
#ifdef RGBLIGHT_TWINKLE
|
||||
case KC_A ... KC_SLASH:
|
||||
case KC_F1 ... KC_F12:
|
||||
|
@ -210,40 +239,58 @@ bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record) {
|
|||
if (record->event.pressed) {
|
||||
start_rgb_light();
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
#endif // RGBLIGHT_TWINKLE
|
||||
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
if (record->event.pressed) {
|
||||
userspace_config.rgb_layer_change ^= 1;
|
||||
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||
dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
|
||||
}
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
return false;
|
||||
break;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
case RGB_IDL: // This allows me to use underglow as layer indication, or as normal
|
||||
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
if (record->event.pressed) {
|
||||
userspace_config.rgb_matrix_idle_anim ^= 1;
|
||||
dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
if (userspace_config.rgb_matrix_idle_anim) { rgb_matrix_mode_noeeprom(RGB_MATRIX_TYPING_HEATMAP); }
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions
|
||||
if (record->event.pressed) { // This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
|
||||
if (record->event.pressed) {
|
||||
bool is_eeprom_updated = false;
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// This disables layer indication, as it's assumed that if you're changing this ... you want that disabled
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
userspace_config.rgb_layer_change = false;
|
||||
xprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
|
||||
is_eeprom_updated = true;
|
||||
}
|
||||
#endif
|
||||
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
if (userspace_config.rgb_matrix_idle_anim) {
|
||||
userspace_config.rgb_matrix_idle_anim = false;
|
||||
dprintf("RGB Matrix Idle Animation [EEPROM]: %u\n", userspace_config.rgb_matrix_idle_anim);
|
||||
is_eeprom_updated = true;
|
||||
}
|
||||
#endif
|
||||
if (is_eeprom_updated) { eeconfig_update_user(userspace_config.raw); }
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void keyboard_post_init_rgb(void) {
|
||||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_STARTUP_ANIMATION)
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
# if defined(RGBLIGHT_STARTUP_ANIMATION)
|
||||
bool is_enabled = rgblight_config.enable;
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
rgblight_enable_noeeprom();
|
||||
|
@ -262,17 +309,31 @@ void keyboard_post_init_rgb(void) {
|
|||
rgblight_disable_noeeprom();
|
||||
}
|
||||
|
||||
#endif
|
||||
# endif
|
||||
layer_state_set_user(layer_state);
|
||||
#endif
|
||||
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
if (userspace_config.rgb_matrix_idle_anim) {
|
||||
rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_scan_rgb(void) {
|
||||
#ifdef RGBLIGHT_TWINKLE
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
# ifdef RGBLIGHT_TWINKLE
|
||||
scan_rgblight_fadeout();
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef INDICATOR_LIGHTS
|
||||
# ifdef INDICATOR_LIGHTS
|
||||
matrix_scan_indicator();
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(RGB_MATRIX_ENABLE) && defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||
if (userspace_config.rgb_matrix_idle_anim && rgb_matrix_get_mode() == RGB_MATRIX_TYPING_HEATMAP && timer_elapsed32(hypno_timer) > 15000) {
|
||||
rgb_matrix_mode_noeeprom(RGB_MATRIX_REST_MODE);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -4,20 +4,29 @@
|
|||
# include "rgb_matrix.h"
|
||||
#endif
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE)
|
||||
typedef struct {
|
||||
bool enabled;
|
||||
uint8_t hue;
|
||||
uint16_t timer;
|
||||
uint8_t life;
|
||||
} rgblight_fadeout;
|
||||
#endif
|
||||
|
||||
bool process_record_user_rgb(uint16_t keycode, keyrecord_t *record);
|
||||
void scan_rgblight_fadeout(void);
|
||||
void keyboard_post_init_rgb(void);
|
||||
void matrix_scan_rgb(void);
|
||||
layer_state_t layer_state_set_rgb(layer_state_t state);
|
||||
layer_state_t default_layer_state_set_rgb(layer_state_t state);
|
||||
void rgblight_sethsv_default_helper(uint8_t index);
|
||||
void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && defined(RGBLIGHT_TWINKLE)
|
||||
void scan_rgblight_fadeout(void);
|
||||
#endif
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
void rgblight_sethsv_default_helper(uint8_t index);
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void rgb_matrix_set_color_all(uint8_t red, uint8_t green, uint8_t blue);
|
||||
void rgb_matrix_layer_helper(uint8_t hue, uint8_t sat, uint8_t val, uint8_t mode, uint8_t speed, uint8_t led_type);
|
||||
#endif
|
||||
|
|
|
@ -40,10 +40,6 @@ ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
|||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(MACROS_ENABLED)), yes)
|
||||
OPT_DEFS += -DMACROS_ENABLED
|
||||
endif
|
||||
|
||||
ifdef CONSOLE_ENABLE
|
||||
ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
|
||||
OPT_DEFS += -DKEYLOGGER_ENABLE
|
||||
|
|
|
@ -174,11 +174,11 @@ NOTE: These are all the same length. If you do a search/replace
|
|||
|
||||
|
||||
#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
|
||||
#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, AG_NORM
|
||||
#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM
|
||||
#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T
|
||||
|
||||
#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5
|
||||
#define _________________ADJUST_R2_________________ AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
|
||||
#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
|
||||
#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
|
||||
|
||||
// clang-format on
|
||||
|
|
Loading…
Reference in a new issue