Some checks failed
Compile my Keebs / lint-and-compile (push) Failing after 21s
98 lines
2.6 KiB
C
98 lines
2.6 KiB
C
#include QMK_KEYBOARD_H
|
|
|
|
#include "macros.h"
|
|
|
|
|
|
uint8_t mod_state;
|
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
static bool isLinux = false;
|
|
mod_state = get_mods();
|
|
switch (keycode) {
|
|
|
|
case LINUX:
|
|
if (record->event.pressed) {
|
|
isLinux = !isLinux;
|
|
}
|
|
return false;
|
|
case COPY:
|
|
if (record->event.pressed) {
|
|
if (isLinux) {
|
|
tap_code16(RCS(KC_C));
|
|
} else {
|
|
tap_code16(LGUI(KC_C));
|
|
}
|
|
return false;
|
|
}
|
|
case PASTE:
|
|
if (record->event.pressed) {
|
|
if (isLinux) {
|
|
tap_code16(RCS(KC_V));
|
|
} else {
|
|
tap_code16(LGUI(KC_V));
|
|
}
|
|
return false;
|
|
}
|
|
case CUT:
|
|
if (record->event.pressed) {
|
|
if (isLinux) {
|
|
tap_code16(RCS(KC_X));
|
|
} else {
|
|
tap_code16(LGUI(KC_X));
|
|
}
|
|
return false;
|
|
}
|
|
case UNDO:
|
|
if (record->event.pressed) {
|
|
if (isLinux) {
|
|
tap_code16(LCTL(KC_Z));
|
|
} else {
|
|
tap_code16(LGUI(KC_Z));
|
|
}
|
|
return false;
|
|
}
|
|
case REDO:
|
|
if (record->event.pressed) {
|
|
if (isLinux) {
|
|
tap_code16(LCTL(KC_Y));
|
|
} else {
|
|
tap_code16(LSG(KC_Z));
|
|
}
|
|
return false;
|
|
}
|
|
case SALL:
|
|
if (record->event.pressed) {
|
|
if (isLinux) {
|
|
tap_code16(LCTL(KC_A));
|
|
} else {
|
|
tap_code16(LGUI(KC_A));
|
|
}
|
|
return false;
|
|
}
|
|
case M_PASS1:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("P0plarLake!2023");
|
|
}
|
|
return false;
|
|
case M_PASS2:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("CindieOtono!2024");
|
|
}
|
|
return false;
|
|
case M_PASS3:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("1290");
|
|
}
|
|
return false;
|
|
case M_PASS4:
|
|
if (record->event.pressed) {
|
|
SEND_STRING("Thel0ve0fchrist!");
|
|
}
|
|
return false;
|
|
case SPOTLI:
|
|
if (record->event.pressed) {
|
|
tap_code16(LGUI(KC_SPACE));
|
|
}
|
|
return false;
|
|
}
|
|
return true;
|
|
} |