diff options
author | ridingqwerty <george.g.koenig@gmail.com> | 2020-02-04 14:17:10 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-04 20:17:10 +0100 |
commit | 964ed177165072572112abfbdbba3317ed13170c (patch) | |
tree | 676b31e86c0daa5dc64eed2c50241b84d43c904e /users/ridingqwerty/ridingqwerty.c | |
parent | 50554ca270ae4c58dfa156ae4960e06a7ec6ef31 (diff) | |
download | qmk_firmware-964ed177165072572112abfbdbba3317ed13170c.tar.gz qmk_firmware-964ed177165072572112abfbdbba3317ed13170c.zip |
ridingqwerty: userspace update (#8076)
* Userspace overhaul
* Remove testing directory
* Minorca keymap tweaks
Diffstat (limited to 'users/ridingqwerty/ridingqwerty.c')
-rw-r--r-- | users/ridingqwerty/ridingqwerty.c | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/users/ridingqwerty/ridingqwerty.c b/users/ridingqwerty/ridingqwerty.c index fd39021da5..ee6e7e897a 100644 --- a/users/ridingqwerty/ridingqwerty.c +++ b/users/ridingqwerty/ridingqwerty.c @@ -1 +1,65 @@ #include "ridingqwerty.h" + +__attribute__((weak)) +void matrix_init_keymap(void) {} + +void matrix_init_user(void) { + matrix_init_keymap(); + +#if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) + set_unicode_input_mode(UC_LNX); +#endif + + //set_single_persistent_default_layer(_QWERTY); + default_layer_set(1U << _QWERTY); +} + +__attribute__((weak)) +void matrix_scan_keymap(void) { +} + +void matrix_scan_user(void) { + // use for global event timers +} + +__attribute__((weak)) +void keyboard_post_init_keymap(void) {} + +void keyboard_post_init_user(void) { +#if defined(CONSOLE_ENABLE) + debug_enable = true; + debug_matrix = true; + //debug_keyboard=true; + //debug_mouse=true; +#endif +} + +__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) { + state = update_tri_layer_state(state, _EDITOR, _DEBUG, _SECRET); +#ifdef CONSOLE_ENABLE + uprintf("LAYER: %u\n", state); +#endif + return state; +} + +uint16_t get_tapping_term(uint16_t keycode) { + switch (keycode) { + case RC(ENT): + case ED(ESC): + return 225; + default: + return TAPPING_TERM; + } +}; + +bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case NM(SCLN): + return true; + default: + return false; + } +} |