X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;ds=inline;f=keyboard%2Fonekey%2Fkeymap.c;h=dca32d27f398cc82bf47c7374e5f1a18c540c1f9;hb=108b0ce8d9b6635c81d6fc1350a50efc6458d695;hp=dce4e9191e788aa96bfab3cdda8964338f6da517;hpb=79cfa894afbc0a94ac642f57de905d9afc068ce7;p=max%2Ftmk_keyboard.git
diff --git a/keyboard/onekey/keymap.c b/keyboard/onekey/keymap.c
index dce4e919..dca32d27 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"
@@ -27,40 +26,12 @@ along with this program. If not, see .
#include "keymap.h"
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{{KC_A}},
};
/*
* Fn action definition
*/
-static const uint16_t PROGMEM fn_actions[] = {
+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;
-}