X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=keyboard%2Fonekey%2Fkeymap.c;h=2a43563471802e2145a28d7782cc361abef64724;hb=d356afb930ca2b6888dbcc2487fcdd297275af13;hp=dce4e9191e788aa96bfab3cdda8964338f6da517;hpb=5ce9bf8353568b341b79b3cea676ea62a7d40442;p=max%2Ftmk_keyboard.git
diff --git a/keyboard/onekey/keymap.c b/keyboard/onekey/keymap.c
index dce4e919..2a435634 100644
--- a/keyboard/onekey/keymap.c
+++ b/keyboard/onekey/keymap.c
@@ -16,7 +16,6 @@ along with this program. If not, see .
*/
#include
#include
-#include
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
@@ -34,33 +33,5 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Fn action definition
*/
-static const uint16_t PROGMEM fn_actions[] = {
+static const action_t PROGMEM fn_actions[] = {
};
-
-
-
-#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0]))
-#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
-
-/* translates key to keycode */
-uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
-{
- if (layer < KEYMAPS_SIZE) {
- return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
- } else {
- // fall back to layer 0
- return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]);
- }
-}
-
-/* translates Fn keycode to action */
-action_t keymap_fn_to_action(uint8_t keycode)
-{
- action_t action;
- if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) {
- action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
- } else {
- action.code = ACTION_NO;
- }
- return action;
-}