- if (record->event.pressed) {
- switch(keycode) {
- case MY_CUSTOM_MACRO:
- SEND_STRING("QMK is the best thing ever!");
- return false;
- case MY_OTHER_MACRO:
- SEND_STRING(SS_LCTRL("ac")); // selects all and copies
- return false;
- }
- }
- return true;
+ switch (keycode) {
+ case QMKBEST:
+ if (record->event.pressed) {
+ // when keycode QMKBEST is pressed
+ SEND_STRING("QMK is the best thing ever!");
+ } else {
+ // when keycode QMKBEST is released
+ }
+ break;
+ case QMKURL:
+ if (record->event.pressed) {
+ // when keycode QMKURL is pressed
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
+ } else {
+ // when keycode QMKURL is released
+ }
+ break;
+ case MY_OTHER_MACRO:
+ if (record->event.pressed) {
+ SEND_STRING(SS_LCTRL("ac")); // selects all and copies
+ }
+ break;
+ }
+ return true;