Change keymap API

This commit is contained in:
tmk 2013-02-13 11:20:47 +09:00
parent 48e6d0848c
commit 63c03dc137
4 changed files with 112 additions and 98 deletions

View file

@ -30,14 +30,23 @@ extern uint8_t current_layer;
extern uint8_t default_layer;
/* translates key_t to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key);
/* translates keycode to action */
action_t keymap_keycode_to_action(uint8_t keycode);
/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode);
/* action for key */
// TODO: should use struct key_t?
// TODO: should use struct key_t? move to action.h?
action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col);
/* user defined special function */
void keymap_call_function(keyrecord_t *record, uint8_t id, uint8_t opt);
#ifndef NO_LEGACY_KEYMAP_SUPPORT
/* keycode of key */
uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col);