]> git.friedersdorff.com Git - max/tmk_keyboard.git/blobdiff - tmk_core/common/hook.c
Add my keymap
[max/tmk_keyboard.git] / tmk_core / common / hook.c
index 204407b738c02224e1ef276e0d25f9335e734ea0..22be9a308a89de833b527582249bbadddec98b2a 100644 (file)
@@ -19,43 +19,36 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "hook.h"
 
 /* -------------------------------------------------
- * Definitions of hardware-independent default hooks
+ * Definitions of default hooks
  * ------------------------------------------------- */
 
-/* Called on layer state change event. */
-/* Default behaviour: do nothing. */
 __attribute__((weak))
-void hook_layer_change(uint8_t layer_state) {
-    (void)layer_state;
+void hook_keyboard_loop(void) {}
+
+__attribute__((weak))
+void hook_matrix_change(keyevent_t event) {
+    (void)event;
 }
 
-/* Called periodically from the matrix scan loop (very often!) */
-/* Default behaviour: do nothing. */
 __attribute__((weak))
-void hook_keyboard_loop(void) {}
+void hook_default_layer_change(uint32_t default_layer_state) {
+    (void)default_layer_state;
+}
 
-/* Called on matrix state change event (every keypress => often!) */
-/* Default behaviour: do nothing. */
 __attribute__((weak))
-void hook_matrix_change(keyevent_t event) {
-       (void)event;
+void hook_layer_change(uint32_t layer_state) {
+    (void)layer_state;
 }
 
-/* Called on indicator LED update event (when reported from host). */
-/* Default behaviour: calls led_set (for compatibility). */
 __attribute__((weak))
 void hook_keyboard_leds_change(uint8_t led_status) {
     keyboard_set_leds(led_status);
 }
 
-/* Called once, on checking the bootmagic combos. */
-/* Default behaviour: do nothing. */
 __attribute__((weak))
-void hook_bootmagic(void) {
-       /* An example: */
-       // #include "bootmagic.h"
-       // #include "keymap.h"
-       // if(bootmagic_scan_keycode(KC_W)) {
-       //      // do something
-       // }
+void hook_bootmagic(void) {}
+
+__attribute__((weak))
+bool hook_process_action(keyrecord_t *record) {
+    return false;
 }