diff options
Diffstat (limited to 'users')
-rw-r--r-- | users/drashna/callbacks.c | 47 | ||||
-rw-r--r-- | users/drashna/callbacks.h | 1 | ||||
-rw-r--r-- | users/drashna/config.h | 88 | ||||
-rw-r--r-- | users/drashna/keyrecords/autocorrection/autocorrection.c | 24 | ||||
-rw-r--r-- | users/drashna/keyrecords/process_records.c | 36 | ||||
-rw-r--r-- | users/drashna/keyrecords/process_records.h | 99 | ||||
-rw-r--r-- | users/drashna/keyrecords/tap_dances.c | 2 | ||||
-rw-r--r-- | users/drashna/keyrecords/tap_dances.h | 2 | ||||
-rw-r--r-- | users/drashna/keyrecords/tapping.c | 6 | ||||
-rw-r--r-- | users/drashna/keyrecords/unicode.c | 135 | ||||
-rw-r--r-- | users/drashna/keyrecords/unicode.h | 1 | ||||
-rw-r--r-- | users/drashna/oled/oled_stuff.c | 245 | ||||
-rw-r--r-- | users/drashna/oled/oled_stuff.h | 191 | ||||
-rw-r--r-- | users/drashna/oled/sh110x.c | 58 | ||||
-rw-r--r-- | users/drashna/rgb/rgb_matrix_stuff.c | 60 | ||||
-rw-r--r-- | users/drashna/rgb/rgb_stuff.c | 92 | ||||
-rw-r--r-- | users/drashna/rules.mk | 5 | ||||
-rw-r--r-- | users/drashna/split/transport_sync.c | 12 | ||||
-rw-r--r-- | users/drashna/split/transport_sync.h | 15 |
19 files changed, 654 insertions, 465 deletions
diff --git a/users/drashna/callbacks.c b/users/drashna/callbacks.c index 0ceb1aebe5..f9a3f598d3 100644 --- a/users/drashna/callbacks.c +++ b/users/drashna/callbacks.c @@ -55,11 +55,11 @@ void shutdown_user(void) { rgblight_enable_noeeprom(); rgblight_mode_noeeprom(1); rgblight_setrgb_red(); -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE rgb_matrix_set_color_all(0xFF, 0x00, 0x00); rgb_matrix_update_pwm_buffers(); -#endif // RGB_MATRIX_ENABLE +#endif // RGB_MATRIX_ENABLE #ifdef OLED_ENABLE oled_off(); #endif @@ -88,7 +88,7 @@ void suspend_power_down_user(void) { __attribute__((weak)) void suspend_wakeup_init_keymap(void) {} void suspend_wakeup_init_user(void) { #ifdef OLED_ENABLE - oled_timer_reset(); + oled_timer_reset(); #endif suspend_wakeup_init_keymap(); } @@ -104,9 +104,9 @@ void matrix_scan_user(void) { startup_user(); } -#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. +#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code. run_diablo_macro_check(); -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE #ifdef CAPS_WORD_ENABLE caps_word_task(); #endif @@ -124,8 +124,10 @@ float doom_song[][2] = SONG(E1M1_DOOM); // on layer change, no matter where the change was initiated // Then runs keymap's layer change check -__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } -layer_state_t layer_state_set_user(layer_state_t state) { +__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { + return state; +} +layer_state_t layer_state_set_user(layer_state_t state) { if (!is_keyboard_master()) { return state; } @@ -136,7 +138,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { #endif #if defined(CUSTOM_RGBLIGHT) state = layer_state_set_rgb_light(state); -#endif // CUSTOM_RGBLIGHT +#endif // CUSTOM_RGBLIGHT #if defined(AUDIO_ENABLE) && !defined(__arm__) static bool is_gamepad_on = false; if (layer_state_cmp(state, _GAMEPAD) != is_gamepad_on) { @@ -153,28 +155,31 @@ layer_state_t layer_state_set_user(layer_state_t state) { } // Runs state check and changes underglow color and animation -__attribute__((weak)) 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) { +__attribute__((weak)) 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) { if (!is_keyboard_master()) { return state; } state = default_layer_state_set_keymap(state); -#if 0 -# if defined(CUSTOM_RGBLIGHT) || defined(RGB_MATRIX_ENABLE) - state = default_layer_state_set_rgb(state); -# endif +#if defined(CUSTOM_RGBLIGHT) + state = default_layer_state_set_rgb_light(state); #endif return state; } __attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} -void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } +void led_set_user(uint8_t usb_led) { + led_set_keymap(usb_led); +} __attribute__((weak)) void eeconfig_init_keymap(void) {} void eeconfig_init_user(void) { userspace_config.raw = 0; userspace_config.rgb_layer_change = true; + userspace_config.autocorrection = true; eeconfig_update_user(userspace_config.raw); eeconfig_init_keymap(); } @@ -187,8 +192,8 @@ void matrix_slave_scan_user(void) { music_task(); # endif # ifdef AUDIO_INIT_DELAY - if (!is_keyboard_master()) { - static bool delayed_tasks_run = false; + if (!is_keyboard_master()) { + static bool delayed_tasks_run = false; static uint16_t delayed_task_timer = 0; if (!delayed_tasks_run) { if (!delayed_task_timer) { @@ -214,3 +219,11 @@ void matrix_slave_scan_user(void) { matrix_slave_scan_keymap(); } #endif + +__attribute__((weak)) void housekeeping_task_keymap(void) {} +void housekeeping_task_user(void) { +#if defined(SPLIT_KEYBOARD) && defined(SPLIT_TRANSACTION_IDS_USER) + housekeeping_task_transport_sync(); +#endif + housekeeping_task_keymap(); +} diff --git a/users/drashna/callbacks.h b/users/drashna/callbacks.h index f6ac6b88de..15f8997619 100644 --- a/users/drashna/callbacks.h +++ b/users/drashna/callbacks.h @@ -16,6 +16,7 @@ layer_state_t layer_state_set_keymap(layer_state_t state); layer_state_t default_layer_state_set_keymap(layer_state_t state); void led_set_keymap(uint8_t usb_led); void eeconfig_init_keymap(void); +void housekeeping_task_keymap(void); #ifdef CUSTOM_UNICODE_ENABLE void matrix_init_unicode(void); diff --git a/users/drashna/config.h b/users/drashna/config.h index 4a34f5d66a..fd1530a100 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -4,10 +4,10 @@ #pragma once // Use custom magic number so that when switching branches, EEPROM always gets reset -#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 +#define EECONFIG_MAGIC_NUMBER (uint16_t)0x1339 #ifdef IS_COMMAND -#undef IS_COMMAND +# undef IS_COMMAND #endif #define IS_COMMAND() (((get_mods() | get_oneshot_mods()) & MOD_MASK_SHIFT) == MOD_MASK_SHIFT) @@ -37,8 +37,8 @@ // # define WPM_LAUNCH_CONTROL // # define WPM_ALLOW_COUNT_REGRESSOIN // # define WPM_UNFILTERED -# define WPM_SAMPLE_SECONDS 10 -# define WPM_SAMPLE_PERIODS 50 +# define WPM_SAMPLE_SECONDS 10 +# define WPM_SAMPLE_PERIODS 50 # define WPM_ESTIMATED_WORD_SIZE 5 #endif @@ -51,34 +51,34 @@ # define GOODBYE_SONG SONG(SONIC_RING) # define DEFAULT_LAYER_SONGS \ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(OVERWATCH_THEME) } -# define UNICODE_SONG_MAC SONG(MARIO_THEME) -# define UNICODE_SONG_LNX SONG(MARIO_POWERUP) -# define UNICODE_SONG_WIN SONG(MARIO_ONEUP) -# define UNICODE_SONG_BSD SONG(RICK_ROLL) +# define UNICODE_SONG_MAC SONG(MARIO_THEME) +# define UNICODE_SONG_LNX SONG(MARIO_POWERUP) +# define UNICODE_SONG_WIN SONG(MARIO_ONEUP) +# define UNICODE_SONG_BSD SONG(RICK_ROLL) # define UNICODE_SONG_WINC SONG(RICK_ROLL) # else # define STARTUP_SONG SONG(STARTUP_SOUND) # define GOODBYE_SONG SONG(GOODBYE_SOUND) # define DEFAULT_LAYER_SONGS \ { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND), SONG(WORKMAN_SOUND) } -# define UNICODE_SONG_MAC SONG(QWERTY_SOUND) -# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND) -# define UNICODE_SONG_WIN SONG(DVORAK_SOUND) -# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND) +# define UNICODE_SONG_MAC SONG(QWERTY_SOUND) +# define UNICODE_SONG_LNX SONG(COLEMAK_SOUND) +# define UNICODE_SONG_WIN SONG(DVORAK_SOUND) +# define UNICODE_SONG_BSD SONG(WORKMAN_SOUND) # define UNICODE_SONG_WINC SONG(PLOVER_GOODBYE_SOUND) # endif -#endif // !AUDIO_ENABLE +#endif // !AUDIO_ENABLE #define UNICODE_SELECTED_MODES UC_WINC, UC_MAC #ifdef RGBLIGHT_ENABLE # define RGBLIGHT_SLEEP -# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 +# define RGBLIGHT_EFFECT_TWINKLE_LIFE 250 # define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1 / 24 -#endif // RGBLIGHT_ENABLE +#endif // RGBLIGHT_ENABLE #ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) +# 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 @@ -179,20 +179,26 @@ # define ENABLE_RGB_MATRIX_MULTISPLASH # define ENABLE_RGB_MATRIX_SOLID_SPLASH # define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH -# endif // AVR -#endif // RGB_MATRIX_ENABLE +# endif // AVR +#endif // RGB_MATRIX_ENABLE #ifdef OLED_ENABLE -# ifdef SPLIT_KEYBOARD -# define OLED_UPDATE_INTERVAL 60 -# else -# define OLED_UPDATE_INTERVAL 15 +# ifndef OLED_UPDATE_INTERVAL +# ifdef OLED_DRIVER_SH1107 +# define OLED_UPDATE_INTERVAL 75 +# else +# ifdef SPLIT_KEYBOARD +# define OLED_UPDATE_INTERVAL 60 +# else +# define OLED_UPDATE_INTERVAL 15 +# endif +# endif # endif # define OLED_DISABLE_TIMEOUT # ifdef OLED_FONT_H # undef OLED_FONT_H # endif -# define OLED_FONT_H "oled/drashna_font.h" +# define OLED_FONT_H "oled/drashna_font.h" # define OLED_FONT_END 255 // # define OLED_FONT_5X5 // # define OLED_FONT_AZTECH @@ -223,14 +229,13 @@ // #define WPM_SAMPLE_PERIODS 50 // #define WPM_LAUNCH_CONTROL - #ifndef ONESHOT_TAP_TOGGLE # define ONESHOT_TAP_TOGGLE 2 -#endif // !ONESHOT_TAP_TOGGLE +#endif // !ONESHOT_TAP_TOGGLE #ifndef ONESHOT_TIMEOUT # define ONESHOT_TIMEOUT 3000 -#endif // !ONESHOT_TIMEOUT +#endif // !ONESHOT_TIMEOUT #define IGNORE_MOD_TAP_INTERRUPT_PER_KEY #define PERMISSIVE_HOLD_PER_KEY @@ -238,7 +243,6 @@ #define RETRO_TAPPING_PER_KEY #define TAPPING_TERM_PER_KEY - #ifndef TAPPING_TOGGLE # define TAPPING_TOGGLE 1 #endif @@ -255,12 +259,12 @@ #ifdef CONVERT_TO_PROTON_C // pins that are available but not present on Pro Micro -# define A3 PAL_LINE(GPIOA, 3) -# define A4 PAL_LINE(GPIOA, 4) -# define A5 PAL_LINE(GPIOA, 5) -# define A6 PAL_LINE(GPIOA, 6) -# define A7 PAL_LINE(GPIOA, 7) -# define A8 PAL_LINE(GPIOA, 8) +# define A3 PAL_LINE(GPIOA, 3) +# define A4 PAL_LINE(GPIOA, 4) +# define A5 PAL_LINE(GPIOA, 5) +# define A6 PAL_LINE(GPIOA, 6) +# define A7 PAL_LINE(GPIOA, 7) +# define A8 PAL_LINE(GPIOA, 8) # define A13 PAL_LINE(GPIOA, 13) # define A14 PAL_LINE(GPIOA, 14) # define A15 PAL_LINE(GPIOA, 15) @@ -291,12 +295,22 @@ # ifndef OLED_BRIGHTNESS # define OLED_BRIGHTNESS 50 # endif -# if !defined(STM32F4XX) -# undef OLED_UPDATE_INTERVAL -# define OLED_UPDATE_INTERVAL 75 -# endif +#endif + +#ifdef USE_I2CV1 +# define I2C1_CLOCK_SPEED 400000 +# define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 #endif #define ENABLE_COMPILE_KEYCODE #define BOTH_SHIFTS_TURNS_ON_CAPS_WORD + +#ifndef SECURE_UNLOCK_SEQUENCE +# define SECURE_UNLOCK_SEQUENCE \ + { \ + {2, 1}, {2, 2}, {2, 3}, { \ + 2, 4 \ + } \ + } +#endif diff --git a/users/drashna/keyrecords/autocorrection/autocorrection.c b/users/drashna/keyrecords/autocorrection/autocorrection.c index 682d6fd49c..90fdba8f5e 100644 --- a/users/drashna/keyrecords/autocorrection/autocorrection.c +++ b/users/drashna/keyrecords/autocorrection/autocorrection.c @@ -52,7 +52,7 @@ void autocorrect_enable(void) { */ void autocorrect_disable(void) { userspace_config.autocorrection = false; - typo_buffer_size = 0; + typo_buffer_size = 0; eeconfig_update_user(userspace_config.raw); } @@ -62,7 +62,7 @@ void autocorrect_disable(void) { */ void autocorrect_toggle(void) { userspace_config.autocorrection = !userspace_config.autocorrection; - typo_buffer_size = 0; + typo_buffer_size = 0; eeconfig_update_user(userspace_config.raw); } @@ -98,15 +98,15 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord } *keycode &= 0xFF; // Get the basic keycode. return true; -#ifndef NO_ACTION_TAPPING +# ifndef NO_ACTION_TAPPING // Exclude tap-hold keys when they are held down // and mask for base keycode when they are tapped. case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: -# ifdef NO_ACTION_LAYER +# ifdef NO_ACTION_LAYER // Exclude Layer Tap, if layers are disabled // but action tapping is still enabled. return false; -# endif +# endif case QK_MOD_TAP ... QK_MOD_TAP_MAX: // Exclude hold keycode if (!record->tap.count) { @@ -114,25 +114,25 @@ __attribute__((weak)) bool process_autocorrect_user(uint16_t *keycode, keyrecord } *keycode &= 0xFF; break; -#else +# else case QK_MOD_TAP ... QK_MOD_TAP_MAX: case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: // Exclude if disabled return false; -#endif +# endif // Exclude swap hands keys when they are held down // and mask for base keycode when they are tapped. case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: -#ifdef SWAP_HANDS_ENABLE +# ifdef SWAP_HANDS_ENABLE if (*keycode >= 0x56F0 || !record->tap.count) { return false; } *keycode &= 0xFF; break; -#else +# else // Exclude if disabled return false; -#endif +# endif } // Disable autocorrect while a mod other than shift is active. @@ -166,9 +166,9 @@ __attribute__((weak)) bool apply_autocorrect(uint8_t backspaces, const char *str */ bool process_autocorrection(uint16_t keycode, keyrecord_t *record) { uint8_t mods = get_mods(); -#ifndef NO_ACTION_ONESHOT +# ifndef NO_ACTION_ONESHOT mods |= get_oneshot_mods(); -#endif +# endif if ((keycode >= AUTOCORRECT_ON && keycode <= AUTOCORRECT_TOGGLE) && record->event.pressed) { if (keycode == AUTOCORRECT_ON) { diff --git a/users/drashna/keyrecords/process_records.c b/users/drashna/keyrecords/process_records.c index 240156e816..c328451b75 100644 --- a/users/drashna/keyrecords/process_records.c +++ b/users/drashna/keyrecords/process_records.c @@ -20,8 +20,12 @@ bool host_driver_disabled = false; * * This handles the keycodes at the keymap level, useful for keyboard specific customization */ -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } -__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; } +__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + return true; +} +__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { + return true; +} /** * @brief Main user keycode handler @@ -46,10 +50,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // If console is enabled, it will print the matrix position and status of each key pressed #ifdef KEYLOGGER_ENABLE uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count); -#endif // KEYLOGGER_ENABLE +#endif // KEYLOGGER_ENABLE #if defined(OLED_ENABLE) && defined(CUSTOM_OLED_DRIVER) process_record_user_oled(keycode, record); -#endif // OLED +#endif // OLED if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record) #ifdef CUSTOM_RGB_MATRIX @@ -90,34 +94,34 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; - case VRSN: // Prints firmware version + case VRSN: // Prints firmware version if (record->event.pressed) { send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); } break; - case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them + case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them #ifdef TAP_DANCE_ENABLE if (record->event.pressed) { for (uint8_t index = 0; index < 4; index++) { diablo_timer[index].key_interval = 0; } } -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE break; - case KC_CCCV: // One key copy/paste + case KC_CCCV: // One key copy/paste if (record->event.pressed) { copy_paste_timer = timer_read(); } else { - if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy tap_code16(LCTL(KC_C)); - } else { // Tap, paste + } else { // Tap, paste tap_code16(LCTL(KC_V)); } } break; - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal + case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #if defined(CUSTOM_RGBLIGHT) || defined(CUSTOM_RGB_MATRIX) if (record->event.pressed) { userspace_config.rgb_layer_change ^= 1; @@ -140,7 +144,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { # endif } } -#endif // CUSTOM_RGBLIGHT +#endif // CUSTOM_RGBLIGHT break; #if defined(CUSTOM_RGBLIGHT) || defined(CUSTOM_RGB_MATRIX) @@ -160,7 +164,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions + case RGB_MODE_FORWARD ... RGB_MODE_GRADIENT: // quantum_keycodes.h L400 for definitions if (record->event.pressed) { bool is_eeprom_updated; # if defined(CUSTOM_RGBLIGHT) && !defined(RGBLIGHT_DISABLE_KEYCODES) @@ -200,9 +204,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; } - } + } return true; } __attribute__((weak)) void post_process_record_keymap(uint16_t keycode, keyrecord_t *record) {} -void post_process_record_user(uint16_t keycode, keyrecord_t *record) { post_process_record_keymap(keycode, record); } +void post_process_record_user(uint16_t keycode, keyrecord_t *record) { + post_process_record_keymap(keycode, record); +} diff --git a/users/drashna/keyrecords/process_records.h b/users/drashna/keyrecords/process_records.h index e83e4ce308..be31f992cb 100644 --- a/users/drashna/keyrecords/process_records.h +++ b/users/drashna/keyrecords/process_records.h @@ -13,30 +13,30 @@ #endif enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_QWERTY, // Sets default layer to QWERTY - FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY - KC_COLEMAK_DH, // Sets default layer to COLEMAK - KC_COLEMAK, // Sets default layer to COLEMAK - KC_DVORAK, // Sets default layer to DVORAK - LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN - KC_DIABLO_CLEAR, // Clears all Diablo Timers - 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 - KC_SECRET_4, // test4 - KC_SECRET_5, // test5 - KC_CCCV, // Hold to copy, tap to paste - KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! - UC_FLIP, // (ಠ痊ಠ)┻━┻ - UC_TABL, // ┬─┬ノ( º _ ºノ) - UC_SHRG, // ¯\_(ツ)_/¯ - UC_DISA, // ಠ_ಠ + VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info + KC_QWERTY, // Sets default layer to QWERTY + FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY + KC_COLEMAK_DH, // Sets default layer to COLEMAK + KC_COLEMAK, // Sets default layer to COLEMAK + KC_DVORAK, // Sets default layer to DVORAK + LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN + KC_DIABLO_CLEAR, // Clears all Diablo Timers + 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 + KC_SECRET_4, // test4 + KC_SECRET_5, // test5 + KC_CCCV, // Hold to copy, tap to paste + KC_NUKE, // NUCLEAR LAUNCH DETECTED!!! + UC_FLIP, // (ಠ痊ಠ)┻━┻ + UC_TABL, // ┬─┬ノ( º _ ºノ) + UC_SHRG, // ¯\_(ツ)_/¯ + UC_DISA, // ಠ_ಠ UC_IRNY, UC_CLUE, - KEYLOCK, // Locks keyboard by unmounting driver + KEYLOCK, // Locks keyboard by unmounting driver KC_NOMODE, KC_WIDE, KC_SCRIPT, @@ -44,11 +44,12 @@ enum userspace_custom_keycodes { KC_REGIONAL, KC_AUSSIE, KC_ZALGO, + KC_SUPER, KC_ACCEL, AUTOCORRECT_ON, AUTOCORRECT_OFF, AUTOCORRECT_TOGGLE, - NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes + NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes }; bool process_record_secrets(uint16_t keycode, keyrecord_t *record); @@ -58,37 +59,37 @@ void post_process_record_keymap(uint16_t keycode, keyrecord_t *record); bool process_record_unicode(uint16_t keycode, keyrecord_t *record); #endif -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) -#define ADJUST MO(_ADJUST) -#define TG_MODS OS_TOGG -#define TG_GAME TG(_GAMEPAD) -#define TG_DBLO TG(_DIABLO) -#define OS_LWR OSL(_LOWER) -#define OS_RSE OSL(_RAISE) +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) +#define ADJUST MO(_ADJUST) +#define TG_MODS OS_TOGG +#define TG_GAME TG(_GAMEPAD) +#define TG_DBLO TG(_DIABLO) +#define OS_LWR OSL(_LOWER) +#define OS_RSE OSL(_RAISE) -#define KC_SEC1 KC_SECRET_1 -#define KC_SEC2 KC_SECRET_2 -#define KC_SEC3 KC_SECRET_3 -#define KC_SEC4 KC_SECRET_4 -#define KC_SEC5 KC_SECRET_5 +#define KC_SEC1 KC_SECRET_1 +#define KC_SEC2 KC_SECRET_2 +#define KC_SEC3 KC_SECRET_3 +#define KC_SEC4 KC_SECRET_4 +#define KC_SEC5 KC_SECRET_5 -#define QWERTY KC_QWERTY -#define DVORAK KC_DVORAK -#define COLEMAK KC_COLEMAK +#define QWERTY KC_QWERTY +#define DVORAK KC_DVORAK +#define COLEMAK KC_COLEMAK #define COLEMAKDH KC_COLEMAK_DH -#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE -#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1) -#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2) -#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3) +#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE +#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1) +#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2) +#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3) #if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3) # define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4) # define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5) # define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6) # define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7) # if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7) -# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8) +# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8) # define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9) # define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10) # define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11) @@ -99,9 +100,9 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record); # define KC_C1R3 SH_T(KC_TAB) #elif defined(DRASHNA_LP) # define KC_C1R3 TG(_GAMEPAD) -#else // SWAP_HANDS_ENABLE +#else // SWAP_HANDS_ENABLE # define KC_C1R3 KC_TAB -#endif // SWAP_HANDS_ENABLE +#endif // SWAP_HANDS_ENABLE #define BK_LWER LT(_LOWER, KC_BSPC) #define SP_LWER LT(_LOWER, KC_SPC) @@ -120,7 +121,7 @@ bool process_record_unicode(uint16_t keycode, keyrecord_t *record); #define OS_RCTL OSM(MOD_RCTL) #define OS_LALT OSM(MOD_LALT) #define OS_RALT OSM(MOD_RALT) -#define OS_MEH OSM(MOD_MEH) +#define OS_MEH OSM(MOD_MEH) #define OS_HYPR OSM(MOD_HYPR) #define ALT_APP ALT_T(KC_APP) @@ -138,9 +139,9 @@ We use custom codes here, so we can substitute the right stuff # define KC_D3_2 TD(TD_D3_2) # define KC_D3_3 TD(TD_D3_3) # define KC_D3_4 TD(TD_D3_4) -#else // TAP_DANCE_ENABLE +#else // TAP_DANCE_ENABLE # define KC_D3_1 KC_1 # define KC_D3_2 KC_2 # define KC_D3_3 KC_3 # define KC_D3_4 KC_4 -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE diff --git a/users/drashna/keyrecords/tap_dances.c b/users/drashna/keyrecords/tap_dances.c index a1a7439164..6caf6b6b3e 100644 --- a/users/drashna/keyrecords/tap_dances.c +++ b/users/drashna/keyrecords/tap_dances.c @@ -26,7 +26,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) { diablo_timer[diablo_keys->index].key_interval = 0; reset_tap_dance(state); - } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) + } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) diablo_timer[diablo_keys->index].key_interval = diablo_times[state->count - 1]; } } diff --git a/users/drashna/keyrecords/tap_dances.h b/users/drashna/keyrecords/tap_dances.h index d9baedc867..81d1f07fe0 100644 --- a/users/drashna/keyrecords/tap_dances.h +++ b/users/drashna/keyrecords/tap_dances.h @@ -28,4 +28,4 @@ enum { TD_D3_3, TD_D3_4, }; -#endif // TAP_DANCE_ENABLE +#endif // TAP_DANCE_ENABLE diff --git a/users/drashna/keyrecords/tapping.c b/users/drashna/keyrecords/tapping.c index 9c4892b33d..daba25bd72 100644 --- a/users/drashna/keyrecords/tapping.c +++ b/users/drashna/keyrecords/tapping.c @@ -29,10 +29,10 @@ __attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyreco // Do not select the hold action when another key is pressed. // return false; switch (keycode) { - case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: - return true; +// case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: +// return true; default: - return false; + return true; } } diff --git a/users/drashna/keyrecords/unicode.c b/users/drashna/keyrecords/unicode.c index c1fe8df2c3..ea51b26061 100644 --- a/users/drashna/keyrecords/unicode.c +++ b/users/drashna/keyrecords/unicode.c @@ -69,7 +69,7 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, tra } return false; } else if (KC_1 <= keycode && keycode <= KC_0) { - if (is_shifted) { // skip shifted numbers, so that we can still use symbols etc. + if (is_shifted) { // skip shifted numbers, so that we can still use symbols etc. return process_record_keymap(keycode, record); } if (record->event.pressed) { @@ -92,42 +92,81 @@ DEFINE_UNICODE_RANGE_TRANSLATOR(unicode_range_translator_boxes, 0x1F170, 0x1F170 DEFINE_UNICODE_RANGE_TRANSLATOR(unicode_range_translator_regional, 0x1F1E6, 0x1F1E6, '0', '1', 0x2003); DEFINE_UNICODE_LUT_TRANSLATOR(unicode_lut_translator_aussie, - 0x0250, // a - 'q', // b - 0x0254, // c - 'p', // d - 0x01DD, // e - 0x025F, // f - 0x0183, // g - 0x0265, // h - 0x1D09, // i - 0x027E, // j - 0x029E, // k - 'l', // l - 0x026F, // m - 'u', // n - 'o', // o - 'd', // p - 'b', // q - 0x0279, // r - 's', // s - 0x0287, // t - 'n', // u - 0x028C, // v - 0x028D, // w - 0x2717, // x - 0x028E, // y - 'z', // z - 0x0269, // 1 - 0x3139, // 2 - 0x0190, // 3 - 0x3123, // 4 - 0x03DB, // 5 - '9', // 6 - 0x3125, // 7 - '8', // 8 - '6', // 9 - '0' // 0 + 0x0250, // a + 'q', // b + 0x0254, // c + 'p', // d + 0x01DD, // e + 0x025F, // f + 0x0183, // g + 0x0265, // h + 0x1D09, // i + 0x027E, // j + 0x029E, // k + 'l', // l + 0x026F, // m + 'u', // n + 'o', // o + 'd', // p + 'b', // q + 0x0279, // r + 's', // s + 0x0287, // t + 'n', // u + 0x028C, // v + 0x028D, // w + 0x2717, // x + 0x028E, // y + 'z', // z + 0x0269, // 1 + 0x3139, // 2 + 0x0190, // 3 + 0x3123, // 4 + 0x03DB, // 5 + '9', // 6 + 0x3125, // 7 + '8', // 8 + '6', // 9 + '0' // 0 +); + +DEFINE_UNICODE_LUT_TRANSLATOR(unicode_lut_translator_super, + 0x1D43, // a + 0x1D47, // b + 0x1D9C, // c + 0x1D48, // d + 0x1D49, // e + 0x1DA0, // f + 0x1D4D, // g + 0x02B0, // h + 0x2071, // i + 0x02B2, // j + 0x1D4F, // k + |