]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Make action_for_key a weak symbol
authorDan McGregor <dan.mcgregor@usask.ca>
Tue, 19 May 2015 18:29:28 +0000 (11:29 -0700)
committerDan McGregor <dan.mcgregor@usask.ca>
Tue, 19 May 2015 18:29:28 +0000 (11:29 -0700)
tmk_core/common/action.h
tmk_core/common/keymap.c

index 8a4736d7bc19cbb833481649b467cc4da109e1ac..e76161c17f57ad651891584cb264a52cd46fa7f7 100644 (file)
@@ -51,6 +51,7 @@ void action_exec(keyevent_t event);
 
 /* action for key */
 action_t action_for_key(uint8_t layer, keypos_t key);
+action_t action_for_key_default(uint8_t layer, keypos_t key);
 
 /* macro */
 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
index 9f4fab521662ab84f4069e30a45b6eec2d9337cf..a43ca460f278447320805b82aa4f0107516916f9 100644 (file)
@@ -27,8 +27,13 @@ static action_t keycode_to_action(uint8_t keycode);
 
 
 /* converts key to action */
+__attribute__((__weak__))
 action_t action_for_key(uint8_t layer, keypos_t key)
 {
+       return action_for_key_default(layer, key);
+}
+
+action_t action_for_key_default(uint8_t layer, keypos_t key)
     uint8_t keycode = keymap_key_to_keycode(layer, key);
     switch (keycode) {
         case KC_FN0 ... KC_FN31: