]> git.gir.st - tmk_keyboard.git/blob - tmk_core/common/actionmap.c
core: Add unimap support
[tmk_keyboard.git] / tmk_core / common / actionmap.c
1 /*
2 Copyright 2015 Jun Wako <wakojun@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17 #include <stdint.h>
18 #include "action_code.h"
19 #include "actionmap.h"
20
21
22 /* Keymapping with 16bit action codes */
23 extern const action_t actionmaps[][MATRIX_ROWS][MATRIX_COLS];
24
25
26 /* Converts key to action */
27 __attribute__ ((weak))
28 action_t action_for_key(uint8_t layer, keypos_t key)
29 {
30 return (action_t)pgm_read_word(&actionmaps[(layer)][(key.row)][(key.col)]);
31 }
32
33 /* Macro */
34 __attribute__ ((weak))
35 const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
36 {
37 return MACRO_NONE;
38 }
39
40 /* Function */
41 __attribute__ ((weak))
42 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
43 {
44 }
Imprint / Impressum