Added special char cmd

This commit is contained in:
2022-08-10 09:11:09 -07:00
parent 2545f15b30
commit 779965ff33
8 changed files with 131 additions and 33 deletions

View File

@ -15,6 +15,15 @@
#include "secrets.h"
// Send a special character.
// Returns false if character was caught, true otherwise.
bool send_special_character(uint16_t keycode) {
if ( (keycode > M_SPECIAL_TOP) && (keycode < M_SPECIAL_BOTTОM) ) {
hid_send_special_char(keycode - M_SPECIAL_TOP - 1);
return false;
}
return true;
}
LEADER_EXTERNS();
@ -29,6 +38,22 @@ void matrix_scan_user(void) {
SEND_STRING(SECRET_EMAIL);
}
SEQ_TWO_KEYS(KC_S, KC_H) {
send_special_character(M_SC_SHRUG);
}
SEQ_THREE_KEYS(KC_Y, KC_A, KC_E) {
send_special_character(M_SC_YAE);
}
SEQ_FOUR_KEYS(KC_L, KC_Y, KC_U, KC_S) {
send_special_character(M_SC_LYUS);
}
SEQ_FOUR_KEYS(KC_B, KC_Y, KC_U, KC_S) {
send_special_character(M_SC_BYUS);
}
//SEQ_ONE_KEY(KC_F) {}
//
//SEQ_TWO_KEYS(KC_A, KC_S) {
@ -48,6 +73,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_spellcheck(keycode, record)) { return false; }
#endif
// Handle special chars
if (record->event.pressed) {
if (!send_special_character(keycode)) { return false; }
}
// Handle macros
switch (keycode) {
case M_RESETWM: