X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=keyboard%2Fstm32_f072_onekey%2Fkeymap_plain.c;fp=keyboard%2Fstm32_f072_onekey%2Fkeymap_plain.c;h=8de1c0279e0190b820c15df7cbd262b7a23a4de1;hb=a47c3c733320c2c11fc1f7be6215f9a40787cdf1;hp=0000000000000000000000000000000000000000;hpb=dbbd4e8f8d6bf04af4b778d2c8fd14d5417780c6;p=max%2Ftmk_keyboard.git diff --git a/keyboard/stm32_f072_onekey/keymap_plain.c b/keyboard/stm32_f072_onekey/keymap_plain.c new file mode 100644 index 00000000..8de1c027 --- /dev/null +++ b/keyboard/stm32_f072_onekey/keymap_plain.c @@ -0,0 +1,44 @@ +/* +Copyright 2012,2013 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "keycode.h" +#include "action.h" +#include "action_macro.h" +#include "report.h" +#include "host.h" +#include "print.h" +#include "debug.h" +#include "keymap.h" + +static const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + {{KC_CAPS}}, // test with KC_CAPS, KC_A, KC_BTLD +}; + +static const uint16_t fn_actions[] = { +}; + +/* translates key to keycode */ +uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) +{ + return keymaps[(layer)][(key.row)][(key.col)]; +} + +/* translates Fn keycode to action */ +action_t keymap_fn_to_action(uint8_t keycode) +{ + return (action_t){ .code = fn_actions[FN_INDEX(keycode)] }; +}