aboutsummaryrefslogtreecommitdiff
path: root/users/kuchosauronad0/template.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/kuchosauronad0/template.c')
-rw-r--r--users/kuchosauronad0/template.c125
1 files changed, 125 insertions, 0 deletions
diff --git a/users/kuchosauronad0/template.c b/users/kuchosauronad0/template.c
new file mode 100644
index 000000000..475e45d39
--- /dev/null
+++ b/users/kuchosauronad0/template.c
@@ -0,0 +1,125 @@
1#include "template.h"
2
3
4// Add reconfigurable functions here, for keymap customization
5// This allows for a global, userspace functions, and continued
6// customization of the keymap. Use _keymap instead of _user
7// functions in the keymaps
8__attribute__ ((weak))
9void matrix_init_keymap(void) {}
10
11// Call user matrix init, then call the keymap's init function
12void matrix_init_user(void) {
13 matrix_init_keymap();
14}
15
16
17__attribute__ ((weak))
18void matrix_scan_keymap(void) {}
19
20// No global matrix scan code, so just run keymap's matix
21// scan function
22__attribute__ ((weak))
23void matrix_scan_user(void) {
24 matrix_scan_keymap();
25}
26
27
28__attribute__ ((weak))
29bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
30 return true;
31}
32
33// Defines actions tor my global custom keycodes. Defined in drashna.h file
34// Then runs the _keymap's recod handier if not processed here,
35// And use "NEWPLACEHOLDER" for new safe range
36bool process_record_user(uint16_t keycode, keyrecord_t *record) {
37
38 switch (keycode) {
39 case KC_MAKE:
40 if (!record->event.pressed) {
41 SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP
42#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU))
43 ":dfu"
44#elif defined(BOOTLOADER_HALFKAY)
45 ":teensy"
46#elif defined(BOOTLOADER_CATERINA)
47 ":avrdude"
48#endif
49 SS_TAP(X_ENTER));
50 }
51 return false;
52 break;
53
54 case VRSN:
55 if (record->event.pressed) {
56 SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION);
57 }
58 return false;
59 break;
60 }
61 return process_record_keymap(keycode, record);
62}
63
64
65__attribute__ ((weak))
66uint32_t layer_state_set_keymap (uint32_t state) {
67 return state;
68}
69
70uint32_t layer_state_set_user (uint32_t state) {
71 return layer_state_set_keymap (state);
72}
73
74
75
76__attribute__ ((weak))
77void led_set_keymap(uint8_t usb_led) {}
78
79void led_set_user(uint8_t usb_led) {
80 led_set_keymap(usb_led);
81}
82
83
84
85__attribute__ ((weak))
86void suspend_power_down_keymap(void) {}
87
88void suspend_power_down_user(void)
89{
90 suspend_power_down_keymap();
91}
92
93
94
95__attribute__ ((weak))
96void suspend_wakeup_init_keymap(void) {}
97
98void suspend_wakeup_init_user(void)
99{
100 suspend_wakeup_init_keymap();
101 #ifdef KEYBOARD_ergodox_ez
102 wait_ms(10);
103 #endif
104}
105
106
107
108__attribute__ ((weak))
109void startup_keymap(void) {}
110
111void startup_user (void) {
112 #ifdef RGBLIGHT_ENABLE
113 matrix_init_rgb();
114 #endif //RGBLIGHT_ENABLE
115 startup_keymap();
116}
117
118
119
120__attribute__ ((weak))
121void shutdown_keymap(void) {}
122
123void shutdown_user (void) {
124 shutdown_keymap();
125}