diff options
author | Jonas Avellana <14019120+ninjonas@users.noreply.github.com> | 2020-01-31 23:38:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-31 22:38:05 -0800 |
commit | 1aee492c0f88b1a96fabdf750a03ed128d9d844a (patch) | |
tree | fc785cfa639fc3b66720be08e682c3cfaeace41f /users/ninjonas/process_records.c | |
parent | fdabf524f2c0047ec920b88ace07096009cdd759 (diff) | |
download | firmware-1aee492c0f88b1a96fabdf750a03ed128d9d844a.tar.gz firmware-1aee492c0f88b1a96fabdf750a03ed128d9d844a.tar.bz2 firmware-1aee492c0f88b1a96fabdf750a03ed128d9d844a.zip |
[keymap(kyria), refactor] created kyria keymap. refactored ninjonas userspace (#8053)
* [keymap(kyria), refactor] created kyria keymap. refactored ninjonas userspace and keyboards
* [fix(#8053)] removed redundant code based off Duckle29's code review
* [fix(#8053)] fixing typos
* [refactor(#8053)] updating oled timeout
* [fix(8053) resolved code review issues identified by noroadsleft
Diffstat (limited to 'users/ninjonas/process_records.c')
-rw-r--r-- | users/ninjonas/process_records.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c index 8044b49f1..5c6d98ec8 100644 --- a/users/ninjonas/process_records.c +++ b/users/ninjonas/process_records.c @@ -1,5 +1,7 @@ #include "ninjonas.h" +uint16_t copy_paste_timer; + __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } @@ -44,7 +46,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { // Sends QMK make command to compile all keyboards case M_MALL: if (record->event.pressed) { - SEND_STRING("rm -f *.hex && rm -rf .build/ && make crkbd:ninjonas lily58:ninjonas hotdox:ninjonas pinky/3:ninjonas\n"); + SEND_STRING("rm -f *.hex && rm -rf .build/ && make crkbd:ninjonas lily58:ninjonas hotdox:ninjonas pinky/3:ninjonas kyria:ninjonas\n"); } break; @@ -90,6 +92,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } break; + // Single key copy/paste + case M_COPA: + if (record->event.pressed) { + copy_paste_timer = timer_read(); + } else { + if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { + tap_code16(LGUI(KC_C)); // Hold + C + } else { + tap_code16(LGUI(KC_V)); // Tap + V + } + } + // BEGIN: Layer macros case QWERTY: if (record->event.pressed) { |