diff options
| author | tmk <nobody@nowhere> | 2013-02-13 13:31:01 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-02-13 13:31:01 +0900 |
| commit | 7a31451a077a55e1ad97cf8b31a111c7cd311a4d (patch) | |
| tree | 335730a0308cdb2e2ec094fe08ac63ee29ce4f80 /common/keymap.c | |
| parent | 7054203e16af627a921b503a9508ce789913471d (diff) | |
| parent | c4421f585b085d3eef5e468ff1defcbc3b4ec8d3 (diff) | |
| download | qmk_firmware-7a31451a077a55e1ad97cf8b31a111c7cd311a4d.tar.gz qmk_firmware-7a31451a077a55e1ad97cf8b31a111c7cd311a4d.zip | |
Merge branch 'actionfix'
Diffstat (limited to 'common/keymap.c')
| -rw-r--r-- | common/keymap.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/common/keymap.c b/common/keymap.c index 2782ea9d6..078615814 100644 --- a/common/keymap.c +++ b/common/keymap.c | |||
| @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | #include "action.h" | 20 | #include "action.h" |
| 21 | 21 | ||
| 22 | 22 | ||
| 23 | /* layer */ | ||
| 24 | uint8_t default_layer = 0; | ||
| 25 | uint8_t current_layer = 0; | ||
| 26 | |||
| 27 | |||
| 28 | action_t keymap_keycode_to_action(uint8_t keycode) | 23 | action_t keymap_keycode_to_action(uint8_t keycode) |
| 29 | { | 24 | { |
| 30 | action_t action; | 25 | action_t action; |
| @@ -60,10 +55,10 @@ action_t keymap_keycode_to_action(uint8_t keycode) | |||
| 60 | #ifndef NO_LEGACY_KEYMAP_SUPPORT | 55 | #ifndef NO_LEGACY_KEYMAP_SUPPORT |
| 61 | /* legacy support with weak reference */ | 56 | /* legacy support with weak reference */ |
| 62 | __attribute__ ((weak)) | 57 | __attribute__ ((weak)) |
| 63 | action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col) | 58 | action_t action_for_key(uint8_t layer, key_t key) |
| 64 | { | 59 | { |
| 65 | /* convert from legacy keycode to action */ | 60 | /* convert from legacy keycode to action */ |
| 66 | uint8_t keycode = keymap_get_keycode(layer, row, col); | 61 | uint8_t keycode = keymap_get_keycode(layer, key.row, key.col); |
| 67 | action_t action; | 62 | action_t action; |
| 68 | switch (keycode) { | 63 | switch (keycode) { |
| 69 | case KC_FN0 ... KC_FN31: | 64 | case KC_FN0 ... KC_FN31: |
| @@ -84,6 +79,6 @@ action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col) | |||
| 84 | #endif | 79 | #endif |
| 85 | 80 | ||
| 86 | __attribute__ ((weak)) | 81 | __attribute__ ((weak)) |
| 87 | void keymap_call_function(keyrecord_t *event, uint8_t id, uint8_t opt) | 82 | void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) |
| 88 | { | 83 | { |
| 89 | } | 84 | } |
