summaryrefslogtreecommitdiff
path: root/users/ninjonas/process_records.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/ninjonas/process_records.c')
-rw-r--r--users/ninjonas/process_records.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/users/ninjonas/process_records.c b/users/ninjonas/process_records.c
index 8044b49f10..5c6d98ec8f 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) {