along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#include "keymap_common.h" | #include "keymap_common.h" | ||||
/* translates key to keycode */ | |||||
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | |||||
{ | |||||
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); | |||||
} | |||||
/* translates Fn keycode to action */ | |||||
action_t keymap_fn_to_action(uint8_t keycode) | |||||
{ | |||||
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; | |||||
} |
#include "debug.h" | #include "debug.h" | ||||
#include "keymap.h" | #include "keymap.h" | ||||
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; | |||||
extern const uint16_t fn_actions[]; | |||||
/* i75 keymap definition macro | /* i75 keymap definition macro | ||||
*/ | */ | ||||
#define KEYMAP( \ | #define KEYMAP( \ |
const action_t PROGMEM fn_actions[] = { | const action_t PROGMEM fn_actions[] = { | ||||
[0] = ACTION_LAYER_MOMENTARY(1), | [0] = ACTION_LAYER_MOMENTARY(1), | ||||
}; | }; | ||||
void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||||
} |
along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#include "keymap_common.h" | #include "keymap_common.h" | ||||
/* translates key to keycode */ | |||||
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | |||||
{ | |||||
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); | |||||
} | |||||
/* translates Fn keycode to action */ | |||||
action_t keymap_fn_to_action(uint8_t keycode) | |||||
{ | |||||
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; | |||||
} |
#include "debug.h" | #include "debug.h" | ||||
#include "keymap.h" | #include "keymap.h" | ||||
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; | |||||
extern const uint16_t fn_actions[]; | |||||
/* TV44 keymap definition macro | /* TV44 keymap definition macro | ||||
*/ | */ | ||||
#define KEYMAP( \ | #define KEYMAP( \ |
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END), | TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END), | ||||
}; | }; | ||||
const uint16_t PROGMEM fn_actions[] = { | |||||
const action_t PROGMEM fn_actions[] = { | |||||
[0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), | [0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), | ||||
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), | [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), | ||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), | [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), |
along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#include "keymap_common.h" | #include "keymap_common.h" | ||||
/* translates key to keycode */ | |||||
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | |||||
{ | |||||
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); | |||||
} | |||||
/* translates Fn keycode to action */ | |||||
action_t keymap_fn_to_action(uint8_t keycode) | |||||
{ | |||||
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; | |||||
} |
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END), | TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END), | ||||
}; | }; | ||||
const uint16_t PROGMEM fn_actions[] = { | |||||
const action_t PROGMEM fn_actions[] = { | |||||
[0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), | [0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), | ||||
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), | [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), | ||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), | [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), |
along with this program. If not, see <http://www.gnu.org/licenses/>. | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||||
*/ | */ | ||||
#include "keymap_common.h" | #include "keymap_common.h" | ||||
/* translates key to keycode */ | |||||
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) | |||||
{ | |||||
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); | |||||
} | |||||
/* translates Fn keycode to action */ | |||||
action_t keymap_fn_to_action(uint8_t keycode) | |||||
{ | |||||
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; | |||||
} |
#include "debug.h" | #include "debug.h" | ||||
#include "keymap.h" | #include "keymap.h" | ||||
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; | |||||
extern const uint16_t fn_actions[]; | |||||
/* TV44 keymap definition macro | /* TV44 keymap definition macro | ||||
*/ | */ | ||||
#define KEYMAP( \ | #define KEYMAP( \ |
TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT), | TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT), | ||||
}; | }; | ||||
const uint16_t PROGMEM fn_actions[] = { | |||||
const action_t PROGMEM fn_actions[] = { | |||||
[0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), | [0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), | ||||
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), | [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), | ||||
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), | [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), |