summaryrefslogtreecommitdiffstats
path: root/users/davidkristoffersen/macros/debug.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-07-02 12:18:55 +0000
committerQMK Bot <hello@qmk.fm>2022-07-02 12:18:55 +0000
commitfa0aea2a5abf55237bc1c4a8180af68833f1935a (patch)
tree949b591e0e928f49f6b435359cba83a563ea06b8 /users/davidkristoffersen/macros/debug.c
parent65832c0fc3e502582986a8fa7c561c39d9fc447f (diff)
parenta80943579c88255fff9de57978b8e577d184785c (diff)
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'users/davidkristoffersen/macros/debug.c')
-rw-r--r--users/davidkristoffersen/macros/debug.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/users/davidkristoffersen/macros/debug.c b/users/davidkristoffersen/macros/debug.c
new file mode 100644
index 0000000000..64fdc4a702
--- /dev/null
+++ b/users/davidkristoffersen/macros/debug.c
@@ -0,0 +1,36 @@
+// Copyright 2022 David Kristoffersen (@davidkristoffersen)
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+#include "macros.h"
+
+// Replace key records with macros
+bool handle_test(uint16_t keycode) {
+ switch (keycode) {
+ case KC_T0: {
+ // Test QK_MAKE command
+ SEND_STRING("qmk compile -kb " QMK_KEYBOARD " -km " QMK_KEYMAP);
+ break;
+ }
+ case KC_T1:
+ // Test ascii characters
+ SEND_STRING(" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~");
+ break;
+ case KC_T2:
+#ifdef LAYER_NO
+ // Test other characters
+ tap_code16(NO_AE);
+ tap_code16(NO_OE);
+ tap_code16(NO_AA);
+ tap_code16(S(NO_AE));
+ tap_code16(S(NO_OE));
+ tap_code16(S(NO_AA));
+#endif
+ return false;
+ }
+ return true;
+};
+
+bool process_debug(uint16_t keycode, keyrecord_t* record) {
+ HANDLE_FALSE(handle_test(keycode));
+ return true;
+}