From 829075ffefec94a2b8ff15c5d625f3ebc767096a Mon Sep 17 00:00:00 2001 From: Vinam Arora Date: Sun, 24 Jan 2021 20:33:34 +0530 Subject: [PATCH] Increased dynamic keymap layers in via keymap (#11575) --- keyboards/0_sixty/keymaps/via/config.h | 22 +++++++++++++++++++ keyboards/0_sixty/keymaps/via/keymap.c | 30 ++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 keyboards/0_sixty/keymaps/via/config.h diff --git a/keyboards/0_sixty/keymaps/via/config.h b/keyboards/0_sixty/keymaps/via/config.h new file mode 100644 index 000000000..5894d7b29 --- /dev/null +++ b/keyboards/0_sixty/keymaps/via/config.h @@ -0,0 +1,22 @@ +/* Copyright 2021 Vinam Arora + * + * 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 . + */ + +#pragma once + +#define DYNAMIC_KEYMAP_LAYER_COUNT 7 +/* This is 4 by default. ProMicro's memory doesn't seem to be able to + * support more than 7 dynamic keymap layers + */ diff --git a/keyboards/0_sixty/keymaps/via/keymap.c b/keyboards/0_sixty/keymaps/via/keymap.c index 758e2533d..7588fc3d4 100644 --- a/keyboards/0_sixty/keymaps/via/keymap.c +++ b/keyboards/0_sixty/keymaps/via/keymap.c @@ -22,6 +22,9 @@ enum zero_sixty_layers { _LOWER, _RAISE, _ADJUST, + _EMPTY1, // Just to initialize dynamic layers in VIA + _EMPTY2, + _EMPTY3, }; #define LOWER MO(_LOWER) @@ -113,4 +116,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + +/* Transparent layers, only to initialize VIA's dynamic layers */ + +[_EMPTY1] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_EMPTY2] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +[_EMPTY3] = LAYOUT_ortho_5x12( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + };