diff options
| author | tmk <nobody@nowhere> | 2013-02-13 11:20:47 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2013-02-13 11:20:47 +0900 |
| commit | 63c03dc137afe6600156a060b592662feaad0cdc (patch) | |
| tree | c69cb8e797ac407028426a96dfebd56cf29211e3 /common/keymap.h | |
| parent | 48e6d0848cdeac26ffab101ea2ef48e5ac60acd3 (diff) | |
| download | qmk_firmware-63c03dc137afe6600156a060b592662feaad0cdc.tar.gz qmk_firmware-63c03dc137afe6600156a060b592662feaad0cdc.zip | |
Change keymap API
Diffstat (limited to 'common/keymap.h')
| -rw-r--r-- | common/keymap.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/common/keymap.h b/common/keymap.h index 30d73f797..ee36eab83 100644 --- a/common/keymap.h +++ b/common/keymap.h | |||
| @@ -30,14 +30,23 @@ extern uint8_t current_layer; | |||
| 30 | extern uint8_t default_layer; | 30 | extern uint8_t default_layer; |
| 31 | 31 | ||
| 32 | 32 | ||
| 33 | /* translates key_t to keycode */ | ||
| 34 | uint8_t keymap_key_to_keycode(uint8_t layer, key_t key); | ||
| 35 | /* translates keycode to action */ | ||
| 36 | action_t keymap_keycode_to_action(uint8_t keycode); | ||
| 37 | /* translates Fn keycode to action */ | ||
| 38 | action_t keymap_fn_to_action(uint8_t keycode); | ||
| 39 | |||
| 40 | |||
| 33 | /* action for key */ | 41 | /* action for key */ |
| 34 | // TODO: should use struct key_t? | 42 | // TODO: should use struct key_t? move to action.h? |
| 35 | action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col); | 43 | action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col); |
| 36 | 44 | ||
| 37 | /* user defined special function */ | 45 | /* user defined special function */ |
| 38 | void keymap_call_function(keyrecord_t *record, uint8_t id, uint8_t opt); | 46 | void keymap_call_function(keyrecord_t *record, uint8_t id, uint8_t opt); |
| 39 | 47 | ||
| 40 | 48 | ||
| 49 | |||
| 41 | #ifndef NO_LEGACY_KEYMAP_SUPPORT | 50 | #ifndef NO_LEGACY_KEYMAP_SUPPORT |
| 42 | /* keycode of key */ | 51 | /* keycode of key */ |
| 43 | uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col); | 52 | uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col); |
