diff options
| author | tmk <nobody@nowhere> | 2013-02-13 11:47:19 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-02-13 11:47:19 +0900 |
| commit | 9bc82bf61c342ca96e6f942b169b7c88b6bf95cf (patch) | |
| tree | 5ef3904f124fdb75eb69e2e0418a3c120f02ffb8 /common/keymap.c | |
| parent | 7054203e16af627a921b503a9508ce789913471d (diff) | |
| download | qmk_firmware-9bc82bf61c342ca96e6f942b169b7c88b6bf95cf.tar.gz qmk_firmware-9bc82bf61c342ca96e6f942b169b7c88b6bf95cf.zip | |
Change action API
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..6bae17f99 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.pos.row, key.pos.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 | } |
