qmk-keychron-q3-colemak-dh/keyboards/crkbd/keymaps/thunderbird2086/process_records.c
Allen Choi 9cdccb12d1
[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
2022-07-16 00:29:09 -07:00

46 lines
1.0 KiB
C

// 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
;
}