aboutsummaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
authorGravatar Konstantin Đorđević <vomindoraan@gmail.com>2019-02-16 18:03:59 +0100
committerGravatar Konstantin Đorđević <vomindoraan@gmail.com>2019-03-02 15:15:56 +0100
commitbe65a0cc7921a0f6a6397bd7682720b5bd7d9128 (patch)
tree6f905cd9e663d854f0eff5e29de817de98d01b60 /users
parentbd43df53bdf0009a152251582a05046bbefb0858 (diff)
downloadqmk_firmware-be65a0cc7921a0f6a6397bd7682720b5bd7d9128.tar.gz
Add _keymap versions of other custom Quantum functions
Not added: eeconfig_update_keymap, eeconfig_read_keymap
Diffstat (limited to 'users')
-rw-r--r--users/konstantin/konstantin.c80
-rw-r--r--users/konstantin/konstantin.h12
2 files changed, 87 insertions, 5 deletions
diff --git a/users/konstantin/konstantin.c b/users/konstantin/konstantin.c
index 239252d9c..f5c59f9eb 100644
--- a/users/konstantin/konstantin.c
+++ b/users/konstantin/konstantin.c
@@ -1,5 +1,45 @@
#include "konstantin.h"
+__attribute__((weak))
+void keyboard_pre_init_keymap(void) {}
+
+void keyboard_pre_init_user(void) {
+ keyboard_pre_init_keymap();
+}
+
+__attribute__((weak))
+void eeconfig_init_keymap(void) {}
+
+void eeconfig_init_user(void) {
+ eeconfig_init_keymap();
+}
+
+__attribute__((weak))
+void matrix_init_keymap(void) {}
+
+void matrix_init_user(void) {
+ matrix_init_keymap();
+}
+
+__attribute__((weak))
+void keyboard_post_init_keymap(void) {}
+
+void keyboard_post_init_user(void) {
+ keyboard_post_init_keymap();
+}
+
+__attribute__((weak))
+void matrix_scan_keymap(void) {}
+
+void matrix_scan_user(void) {
+ matrix_scan_keymap();
+}
+
+__attribute__((weak))
+bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
+ return true;
+}
+
#ifdef LAYER_NUMPAD
static void toggle_numpad(void) {
layer_invert(L_NUMPAD);
@@ -11,11 +51,6 @@ static void toggle_numpad(void) {
}
#endif
-__attribute__((weak))
-bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_keymap(keycode, record)) {
return false;
@@ -88,3 +123,38 @@ uint32_t layer_state_set_keymap(uint32_t state) {
uint32_t layer_state_set_user(uint32_t state) {
return layer_state_set_keymap(state);
}
+
+__attribute__((weak))
+void led_set_keymap(uint8_t usb_led) {}
+
+void led_set_user(uint8_t usb_led) {
+ led_set_keymap(usb_led);
+}
+
+__attribute__((weak))
+void suspend_power_down_keymap(void) {}
+
+void suspend_power_down_user(void) {
+ suspend_power_down_keymap();
+}
+
+__attribute__((weak))
+void suspend_wakeup_init_keymap(void) {}
+
+void suspend_wakeup_init_user(void) {
+ suspend_wakeup_init_keymap();
+}
+
+__attribute__((weak))
+void startup_keymap(void) {}
+
+void startup_user(void) { // Currently not called anywhere
+ startup_keymap();
+}
+
+__attribute__((weak))
+void shutdown_keymap(void) {}
+
+void shutdown_user(void) {
+ shutdown_keymap();
+}
diff --git a/users/konstantin/konstantin.h b/users/konstantin/konstantin.h
index c32d674e8..db90c4ef6 100644
--- a/users/konstantin/konstantin.h
+++ b/users/konstantin/konstantin.h
@@ -69,5 +69,17 @@ enum layers_user {
L_RANGE_KEYMAP,
};
+void keyboard_pre_init_keymap(void);
+void eeconfig_init_keymap(void);
+void matrix_init_keymap(void);
+void keyboard_post_init_keymap(void);
+
+void matrix_scan_keymap(void);
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
uint32_t layer_state_set_keymap(uint32_t state);
+void led_set_keymap(uint8_t usb_led);
+
+void suspend_power_down_keymap(void);
+void suspend_wakeup_init_keymap(void);
+void startup_keymap(void);
+void shutdown_keymap(void);