[Keymap] Userspace refactor, adding leader key functionality (#7790)

* Userspace refactor

* Fixed missed ifdef

* tapcode16, adjust layout

* glcdfont changes from #7745

* Modify Keymaps, add workman

* RGB & OLED update
This commit is contained in:
Akaash Suresh 2020-01-09 13:57:54 -06:00 committed by Drashna Jaelre
parent 71de09d751
commit caa70df816
25 changed files with 458 additions and 483 deletions

View file

@ -9,6 +9,11 @@ __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
switch (keycode) {
case KC_QWERTY ... KC_WORKMAN:
if (record->event.pressed) {
set_single_persistent_default_layer(keycode - KC_QWERTY);
}
break;
case KC_MAKE:
if (!record->event.pressed) {
uint8_t temp_mod = mod_config(get_mods());
@ -19,18 +24,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) {
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);
}
#ifdef RGB_MATRIX_SPLIT_RIGHT
send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY);
# ifndef OLED_DRIVER_ENABLE
send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY);
# endif
#endif
send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
send_string_with_delay_P(PSTR(" -j8 --output-sync\n"), TAP_CODE_DELAY);
}
break;
case VRSN: // Prints firmware version
@ -44,17 +39,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
copy_paste_timer = timer_read();
} else {
if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
register_code(KC_LCTL);
tap_code(KC_C);
unregister_code(KC_LCTL);
tap_code16(LCTL(KC_C));
} else { // Tap, paste
register_code(KC_LCTL);
tap_code(KC_V);
unregister_code(KC_LCTL);
tap_code16(LCTL(KC_V));
}
}
break;
#ifdef UNICODE_ENABLE
#if defined(UNICODE_ENABLE)
case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
if (record->event.pressed) {
send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");