summaryrefslogtreecommitdiff
path: root/keyboard/hid_liber/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/hid_liber/keymap.c')
-rw-r--r--keyboard/hid_liber/keymap.c29
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)]);
}
}