summaryrefslogtreecommitdiff
path: root/keyboards/crkbd/keymaps/thunderbird2086/process_records.c
diff options
context:
space:
mode:
authorAllen Choi <37539914+Thunderbird2086@users.noreply.github.com>2022-07-16 15:29:09 +0800
committerGitHub <noreply@github.com>2022-07-16 00:29:09 -0700
commit9cdccb12d112c13e79f127ca686bbe81b8fcef6f (patch)
tree7544093c41b7a6310bbe547c23ea06e64680a23e /keyboards/crkbd/keymaps/thunderbird2086/process_records.c
parent66983f090c6c648ea8db21c1ff11934b0ff4c882 (diff)
[Keymap] Crkbd/thunderbird2086 (#16973)
* crkbd:thunderbird2086 * readme * after code review * coding format * minor change * changed file name * correct image * updated readme * using query to get rgb status * minor update
Diffstat (limited to 'keyboards/crkbd/keymaps/thunderbird2086/process_records.c')
-rw-r--r--keyboards/crkbd/keymaps/thunderbird2086/process_records.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/thunderbird2086/process_records.c b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c
new file mode 100644
index 0000000000..381cf281e5
--- /dev/null
+++ b/keyboards/crkbd/keymaps/thunderbird2086/process_records.c
@@ -0,0 +1,45 @@
+// Copyright 2021 Allen Choi (@thunderbird2086)
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include QMK_KEYBOARD_H
+
+#include "keycodes.h"
+
+__attribute__((weak))
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+__attribute__((weak))
+bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
+#if defined(OLED_ENABLE)
+__attribute__((weak))
+bool process_record_oled(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+#endif
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+
+ case COLEMAK:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_COLEMAK);
+ }
+ break;
+ case QWERTY:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(_QWERTY);
+ }
+ break;
+ }
+
+ return process_record_keymap(keycode, record) && process_record_secrets(keycode, record)
+# if defined(OLED_ENABLE)
+ && process_record_oled(keycode, record)
+# endif
+ ;
+}