Last active
May 22, 2023 02:49
-
-
Save DanielGGordon/6c743f3ff25f726ff757f79986eb763e to your computer and use it in GitHub Desktop.
Daniel Gordon's QMK Userspace code including secret file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef GORDON | |
#define GORDON | |
const char secret[][64] = { | |
"xxxxxxxxxxx", | |
"ttttttttttt", | |
"test3", | |
"test4", | |
"test5" | |
}; | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "gordon.h" | |
#include "quantum.h" | |
#include "action.h" | |
#include "process_keycode/process_tap_dance.h" | |
#if (__has_include("secret.h")) | |
#include "secret.h" | |
#else | |
const char secret[][64] = { | |
"test1", | |
"test2", | |
"test3", | |
"test4", | |
"test5" | |
}; | |
#endif | |
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |
switch (keycode) { | |
case KC_SECRET_1 ... KC_SECRET_5: | |
if (!record->event.pressed) { | |
send_string(secret[keycode - KC_SECRET_1]); | |
} | |
return false; | |
break; | |
} | |
return true; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef GORDON | |
#define GORDON | |
#include "quantum.h" | |
#include "process_keycode/process_tap_dance.h" | |
// Fillers to make layering more clear | |
#define _______ KC_TRNS | |
#define XXXXXXX KC_NO | |
enum secret_strings { | |
KC_SECRET_1 = SAFE_RANGE, | |
KC_SECRET_2, | |
KC_SECRET_3, | |
KC_SECRET_4, | |
KC_SECRET_5, | |
}; | |
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt); | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment