diff options
author | tmk <nobody@nowhere> | 2013-04-05 03:28:10 +0900 |
---|---|---|
committer | tmk <nobody@nowhere> | 2013-04-05 03:28:10 +0900 |
commit | a8c465215fce3dad502da868ca49eb446deadc4e (patch) | |
tree | 9d74ea9c5062a53775ebe1d01b3067d89413e084 /keyboard/hid_liber/keymap.c | |
parent | 353a9b56e6caee853d3f808d2bfedf07056b4518 (diff) | |
parent | fbea2a3aae5d66ecb00fcd3473f76337d34688fa (diff) |
Merge branch 'action_refine'
Diffstat (limited to 'keyboard/hid_liber/keymap.c')
-rw-r--r-- | keyboard/hid_liber/keymap.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/keyboard/hid_liber/keymap.c b/keyboard/hid_liber/keymap.c index f3d6bfa2ef..609edb5e1b 100644 --- a/keyboard/hid_liber/keymap.c +++ b/keyboard/hid_liber/keymap.c @@ -24,7 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "keycode.h" #include "action.h" #include "action_macro.h" -#include "layer_switch.h" #include "report.h" #include "host.h" #include "print.h" @@ -160,8 +159,6 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -static const uint8_t PROGMEM overlays[][MATRIX_ROWS][MATRIX_COLS] = {}; - /* * Fn action definition */ @@ -179,33 +176,15 @@ static const uint16_t PROGMEM fn_actions[] = { #endif #define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define OVERLAYS_SIZE (sizeof(overlays) / sizeof(overlays[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, key_t key) { - /* Overlay: 16-31(OVERLAY_BIT(0x10) | overlay_layer) */ - if (layer & OVERLAY_BIT) { - layer &= OVERLAY_MASK; - if (layer < OVERLAYS_SIZE) { - return pgm_read_byte(&overlays[(layer)][(key.row)][(key.col)]); - } else { - // XXX: this may cuaes bootlaoder_jump incositent fail. - //debug("key_to_keycode: overlay "); debug_dec(layer); debug(" is invalid.\n"); - return KC_TRANSPARENT; - } - } - /* Keymap: 0-15 */ - else { - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // XXX: this may cuaes bootlaoder_jump incositent fail. - //debug("key_to_keycode: base "); debug_dec(layer); debug(" is invalid.\n"); - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } + if (layer < KEYMAPS_SIZE) { + return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); + } else { + return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); } } |