summaryrefslogtreecommitdiffstats
path: root/users/kageurufu/process_records.c
diff options
context:
space:
mode:
Diffstat (limited to 'users/kageurufu/process_records.c')
-rw-r--r--users/kageurufu/process_records.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/users/kageurufu/process_records.c b/users/kageurufu/process_records.c
new file mode 100644
index 0000000000..63dbcff89b
--- /dev/null
+++ b/users/kageurufu/process_records.c
@@ -0,0 +1,44 @@
+#include "kageurufu.h"
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ return false;
+ break;
+ case COLEMAK:
+ if(record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ return false;
+ break;
+ case RGBRST:
+ #ifdef RGBLIGHT_ENABLE
+ if (record->event.pressed) {
+ eeconfig_update_rgblight_default();
+ rgblight_enable();
+ }
+ #endif
+ break;
+ }
+
+
+ return process_record_keymap(keycode, record) &&
+#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
+ process_record_rgb(keycode, record) &&
+#endif // RGBLIGHT_ENABLE;
+ true;
+}
+
+__attribute__ ((weak))
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+
+__attribute__ ((weak))
+bool process_record_rgb(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}