Improvements and corrections to morse code macros layer
This commit is contained in:
parent
fbaf964a85
commit
9cfa37bb3d
@ -406,7 +406,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
switch(id) {
|
switch(id) {
|
||||||
case 0: //Number 0-)
|
case 0: //Number 0-)
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(MINS), T(DOT), T(MINS), T(MINS), T(DOT), T(MINS), T(SPACE), END); //-.--.-
|
return MACRO(T(MINS), T(DOT), T(MINS), T(MINS), T(DOT), T(MINS), T(SPACE), END); //-.--.-
|
||||||
}
|
}
|
||||||
@ -417,7 +417,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 1: //Number 1-!
|
case 1: //Number 1-!
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(MINS), T(DOT), T(MINS), T(DOT), T(MINS), T(MINS), T(SPACE), END); //-.-.--
|
return MACRO(T(MINS), T(DOT), T(MINS), T(DOT), T(MINS), T(MINS), T(SPACE), END); //-.-.--
|
||||||
}
|
}
|
||||||
@ -428,7 +428,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 2: //Number 2-@
|
case 2: //Number 2-@
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(MINS), T(MINS), T(DOT), T(MINS), T(DOT), T(SPACE), END); //.--.-.
|
return MACRO(T(DOT), T(MINS), T(MINS), T(DOT), T(MINS), T(DOT), T(SPACE), END); //.--.-.
|
||||||
}
|
}
|
||||||
@ -439,7 +439,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 3: // Number 3
|
case 3: // Number 3
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(DOT), T(MINS), T(MINS), T(SPACE), END); //...--
|
return MACRO(T(DOT), T(DOT), T(DOT), T(MINS), T(MINS), T(SPACE), END); //...--
|
||||||
@ -447,7 +447,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 4: //Number 4-$
|
case 4: //Number 4-$
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(DOT), T(DOT), T(MINS), T(DOT), T(DOT), T(MINS), T(SPACE), END); //...-..-
|
return MACRO(T(DOT), T(DOT), T(DOT), T(MINS), T(DOT), T(DOT), T(MINS), T(SPACE), END); //...-..-
|
||||||
}
|
}
|
||||||
@ -458,7 +458,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 5: //Number 5
|
case 5: //Number 5
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(DOT), T(DOT), T(DOT), T(SPACE), END); //.....
|
return MACRO(T(DOT), T(DOT), T(DOT), T(DOT), T(DOT), T(SPACE), END); //.....
|
||||||
@ -466,7 +466,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 6: //Number 6
|
case 6: //Number 6
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(DOT), T(DOT), T(DOT), T(SPACE), END); //-....
|
return MACRO(T(MINS), T(DOT), T(DOT), T(DOT), T(DOT), T(SPACE), END); //-....
|
||||||
@ -474,7 +474,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 7: //Number 7-&
|
case 7: //Number 7-&
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(MINS), T(DOT), T(DOT), T(DOT), T(SPACE), END); //.-...
|
return MACRO(T(DOT), T(MINS), T(DOT), T(DOT), T(DOT), T(SPACE), END); //.-...
|
||||||
}
|
}
|
||||||
@ -485,7 +485,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 8: //Number 8
|
case 8: //Number 8
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(MINS), T(DOT), T(DOT), T(SPACE), END); //---..
|
return MACRO(T(MINS), T(MINS), T(MINS), T(DOT), T(DOT), T(SPACE), END); //---..
|
||||||
@ -493,7 +493,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 9: //Number 9-(
|
case 9: //Number 9-(
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(MINS), T(DOT), T(MINS), T(MINS), T(DOT), T(SPACE), END); //-.--.
|
return MACRO(T(MINS), T(DOT), T(MINS), T(MINS), T(DOT), T(SPACE), END); //-.--.
|
||||||
}
|
}
|
||||||
@ -504,7 +504,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 10: //Letter A
|
case 10: //Letter A
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(SPACE), END); //.-
|
return MACRO(T(DOT), T(MINS), T(SPACE), END); //.-
|
||||||
@ -512,7 +512,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 11: //Letter B
|
case 11: //Letter B
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(DOT), T(DOT), T(SPACE), END); //-...
|
return MACRO(T(MINS), T(DOT), T(DOT), T(DOT), T(SPACE), END); //-...
|
||||||
@ -520,7 +520,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 12: //Letter C
|
case 12: //Letter C
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(MINS), T(DOT), T(SPACE), END); //-.-.
|
return MACRO(T(MINS), T(DOT), T(MINS), T(DOT), T(SPACE), END); //-.-.
|
||||||
@ -528,7 +528,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 13: //Letter D
|
case 13: //Letter D
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(DOT), T(SPACE), END); //-..
|
return MACRO(T(MINS), T(DOT), T(DOT), T(SPACE), END); //-..
|
||||||
@ -536,7 +536,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 14: //Letter E
|
case 14: //Letter E
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(SPACE), END); //.
|
return MACRO(T(DOT), T(SPACE), END); //.
|
||||||
@ -544,7 +544,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 15: //Letter F
|
case 15: //Letter F
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(MINS), T(DOT), T(SPACE), END); //..-.
|
return MACRO(T(DOT), T(DOT), T(MINS), T(DOT), T(SPACE), END); //..-.
|
||||||
@ -552,7 +552,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 16: //Letter G
|
case 16: //Letter G
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(DOT), T(SPACE), END); //--.
|
return MACRO(T(MINS), T(MINS), T(DOT), T(SPACE), END); //--.
|
||||||
@ -560,7 +560,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 17: //Letter H
|
case 17: //Letter H
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(DOT), T(DOT), T(SPACE), END); //....
|
return MACRO(T(DOT), T(DOT), T(DOT), T(DOT), T(SPACE), END); //....
|
||||||
@ -568,7 +568,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 18: //Letter I
|
case 18: //Letter I
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(SPACE), END); //..
|
return MACRO(T(DOT), T(DOT), T(SPACE), END); //..
|
||||||
@ -576,7 +576,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 19: //Letter J
|
case 19: //Letter J
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(MINS), T(MINS), T(SPACE), END); //.---
|
return MACRO(T(DOT), T(MINS), T(MINS), T(MINS), T(SPACE), END); //.---
|
||||||
@ -584,7 +584,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 20: //Letter K
|
case 20: //Letter K
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(MINS), T(SPACE), END); //-.-
|
return MACRO(T(MINS), T(DOT), T(MINS), T(SPACE), END); //-.-
|
||||||
@ -592,7 +592,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 21: //Letter L
|
case 21: //Letter L
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(DOT), T(DOT), T(SPACE), END); //.-..
|
return MACRO(T(DOT), T(MINS), T(DOT), T(DOT), T(SPACE), END); //.-..
|
||||||
@ -600,7 +600,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 22: //Letter M
|
case 22: //Letter M
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(SPACE), END); //--
|
return MACRO(T(MINS), T(MINS), T(SPACE), END); //--
|
||||||
@ -608,7 +608,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 23: //Letter N
|
case 23: //Letter N
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(SPACE), END); //-.
|
return MACRO(T(MINS), T(DOT), T(SPACE), END); //-.
|
||||||
@ -616,7 +616,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 24: //Letter O
|
case 24: //Letter O
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(MINS), T(SPACE), END); //---
|
return MACRO(T(MINS), T(MINS), T(MINS), T(SPACE), END); //---
|
||||||
@ -624,7 +624,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 25: //Letter P
|
case 25: //Letter P
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(MINS), T(DOT), T(SPACE), END); //.--.
|
return MACRO(T(DOT), T(MINS), T(MINS), T(DOT), T(SPACE), END); //.--.
|
||||||
@ -632,7 +632,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 26: //Letter Q
|
case 26: //Letter Q
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(DOT), T(MINS), T(SPACE), END); //--.-
|
return MACRO(T(MINS), T(MINS), T(DOT), T(MINS), T(SPACE), END); //--.-
|
||||||
@ -640,7 +640,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 27: //Letter R
|
case 27: //Letter R
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(DOT), T(SPACE), END); //.-.
|
return MACRO(T(DOT), T(MINS), T(DOT), T(SPACE), END); //.-.
|
||||||
@ -648,7 +648,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 28: //Letter S
|
case 28: //Letter S
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(DOT), T(SPACE), END); //...
|
return MACRO(T(DOT), T(DOT), T(DOT), T(SPACE), END); //...
|
||||||
@ -656,7 +656,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 29: //Letter T
|
case 29: //Letter T
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(SPACE), END); //-
|
return MACRO(T(MINS), T(SPACE), END); //-
|
||||||
@ -664,7 +664,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 30: //Letter U
|
case 30: //Letter U
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(MINS), T(SPACE), END); //..-
|
return MACRO(T(DOT), T(DOT), T(MINS), T(SPACE), END); //..-
|
||||||
@ -672,7 +672,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 31: //Letter V
|
case 31: //Letter V
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(DOT), T(DOT), T(MINS), T(SPACE), END); //...-
|
return MACRO(T(DOT), T(DOT), T(DOT), T(MINS), T(SPACE), END); //...-
|
||||||
@ -680,7 +680,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 32: //Letter W
|
case 32: //Letter W
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(MINS), T(SPACE), END); //.--
|
return MACRO(T(DOT), T(MINS), T(MINS), T(SPACE), END); //.--
|
||||||
@ -688,7 +688,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 33: //Letter X
|
case 33: //Letter X
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(DOT), T(MINS), T(SPACE), END); //-..-
|
return MACRO(T(MINS), T(DOT), T(DOT), T(MINS), T(SPACE), END); //-..-
|
||||||
@ -696,7 +696,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 34: //Letter Y
|
case 34: //Letter Y
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(DOT), T(MINS), T(MINS), T(SPACE), END); //-.--
|
return MACRO(T(MINS), T(DOT), T(MINS), T(MINS), T(SPACE), END); //-.--
|
||||||
@ -704,7 +704,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 35: //Letter Z
|
case 35: //Letter Z
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(DOT), T(DOT), T(SPACE), END); //--..
|
return MACRO(T(MINS), T(MINS), T(DOT), T(DOT), T(SPACE), END); //--..
|
||||||
@ -712,7 +712,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 36: //Punctuation .
|
case 36: //Punctuation .
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(DOT), T(MINS), T(DOT), T(MINS), T(DOT), T(MINS), T(SPACE), END); //.-.-.-
|
return MACRO(T(DOT), T(MINS), T(DOT), T(MINS), T(DOT), T(MINS), T(SPACE), END); //.-.-.-
|
||||||
@ -720,7 +720,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 37: //Punctuation ,
|
case 37: //Punctuation ,
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(MINS), T(MINS), T(DOT), T(DOT), T(MINS), T(MINS), T(SPACE), END); //--..--
|
return MACRO(T(MINS), T(MINS), T(DOT), T(DOT), T(MINS), T(MINS), T(SPACE), END); //--..--
|
||||||
@ -728,7 +728,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 38: //Punctuation '-"
|
case 38: //Punctuation '-"
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(MINS), T(DOT), T(DOT), T(MINS), T(DOT), T(SPACE), END); //.-..-.
|
return MACRO(T(DOT), T(MINS), T(DOT), T(DOT), T(MINS), T(DOT), T(SPACE), END); //.-..-.
|
||||||
}
|
}
|
||||||
@ -739,7 +739,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 39: //Punctuation /-?
|
case 39: //Punctuation /-?
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(DOT), T(MINS), T(MINS), T(DOT), T(DOT), T(SPACE), END); //..--..
|
return MACRO(T(DOT), T(DOT), T(MINS), T(MINS), T(DOT), T(DOT), T(SPACE), END); //..--..
|
||||||
}
|
}
|
||||||
@ -750,7 +750,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 40: //Punctuation ;-:
|
case 40: //Punctuation ;-:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(MINS), T(MINS), T(MINS), T(DOT), T(DOT), T(DOT), T(SPACE), END); //---...
|
return MACRO(T(MINS), T(MINS), T(MINS), T(DOT), T(DOT), T(DOT), T(SPACE), END); //---...
|
||||||
}
|
}
|
||||||
@ -761,7 +761,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 41: //Punctuation =-+
|
case 41: //Punctuation =-+
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(MINS), T(DOT), T(MINS), T(DOT), T(SPACE), END); //.-.-.
|
return MACRO(T(DOT), T(MINS), T(DOT), T(MINS), T(DOT), T(SPACE), END); //.-.-.
|
||||||
}
|
}
|
||||||
@ -772,7 +772,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 42: //Punctuation --_
|
case 42: //Punctuation --_
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
return MACRO(T(DOT), T(DOT), T(MINS), T(MINS), T(DOT), T(MINS), T(SPACE), END); //..--.-
|
return MACRO(T(DOT), T(DOT), T(MINS), T(MINS), T(DOT), T(MINS), T(SPACE), END); //..--.-
|
||||||
}
|
}
|
||||||
@ -783,7 +783,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
|||||||
break;
|
break;
|
||||||
case 43: //Morse Space
|
case 43: //Morse Space
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
if (keyboard_report->mods & MOD_BIT(KC_LSFT) || MOD_BIT(KC_RSFT)) {
|
if (keyboard_report->mods & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) {
|
||||||
clear_mods();
|
clear_mods();
|
||||||
}
|
}
|
||||||
return MACRO(T(BSLS), T(SPACE), END); //When pressed, this sends a slash followed by a space, making it easier to distinguish words in Morse
|
return MACRO(T(BSLS), T(SPACE), END); //When pressed, this sends a slash followed by a space, making it easier to distinguish words in Morse
|
||||||
|
Loading…
Reference in New Issue
Block a user