From 249543cc335a4477c3bc1955d6a473817c17e075 Mon Sep 17 00:00:00 2001 From: Lorenz Wellmer Date: Sat, 5 Dec 2020 15:09:40 +0100 Subject: [PATCH 1/4] add via layout for aek2 usb pcb --- keyboards/kb_elmo/aek2_usb/config.h | 3 ++ .../kb_elmo/aek2_usb/keymaps/via/keymap.c | 36 +++++++++++++++++++ .../kb_elmo/aek2_usb/keymaps/via/rules.mk | 1 + 3 files changed, 40 insertions(+) create mode 100644 keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c create mode 100644 keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk diff --git a/keyboards/kb_elmo/aek2_usb/config.h b/keyboards/kb_elmo/aek2_usb/config.h index f7b347f1db5d..e0fc83f17ade 100644 --- a/keyboards/kb_elmo/aek2_usb/config.h +++ b/keyboards/kb_elmo/aek2_usb/config.h @@ -47,3 +47,6 @@ along with this program. If not, see . #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE + +/* reduce VIA layer count because of EEPROM size */ +#define DYNAMIC_KEYMAP_LAYER_COUNT 2 diff --git a/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c b/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c new file mode 100644 index 000000000000..c5ff48e23ed6 --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c @@ -0,0 +1,36 @@ +/* Copyright 2020 kb-elmo + * + * 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 QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, KC_MPLY, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PMNS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk b/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes From 6c479f974a171257e5d532b3c41e34f70bbf975d Mon Sep 17 00:00:00 2001 From: kb-elmo Date: Thu, 3 Jun 2021 22:25:34 +0200 Subject: [PATCH 2/4] add another via layer --- keyboards/ergomorph55/ergomorph55.c | 17 +++++++++++++++++ keyboards/kb_elmo/aek2_usb/config.h | 2 +- keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c | 8 ++++++++ keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk | 1 + 4 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 keyboards/ergomorph55/ergomorph55.c diff --git a/keyboards/ergomorph55/ergomorph55.c b/keyboards/ergomorph55/ergomorph55.c new file mode 100644 index 000000000000..dddf2843dce1 --- /dev/null +++ b/keyboards/ergomorph55/ergomorph55.c @@ -0,0 +1,17 @@ +/* Copyright 2021 kb-elmo + * + * 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 "ergomorph55.h" diff --git a/keyboards/kb_elmo/aek2_usb/config.h b/keyboards/kb_elmo/aek2_usb/config.h index cf8c9d66f9ad..8c20d2d33604 100644 --- a/keyboards/kb_elmo/aek2_usb/config.h +++ b/keyboards/kb_elmo/aek2_usb/config.h @@ -53,4 +53,4 @@ along with this program. If not, see . #define LOCKING_RESYNC_ENABLE /* reduce VIA layer count because of EEPROM size */ -#define DYNAMIC_KEYMAP_LAYER_COUNT 2 +#define DYNAMIC_KEYMAP_LAYER_COUNT 3 diff --git a/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c b/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c index c5ff48e23ed6..86b69ceebdba 100644 --- a/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c +++ b/keyboards/kb_elmo/aek2_usb/keymaps/via/keymap.c @@ -32,5 +32,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; diff --git a/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk b/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk index 1e5b99807cb7..36b7ba9cbc98 100644 --- a/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk +++ b/keyboards/kb_elmo/aek2_usb/keymaps/via/rules.mk @@ -1 +1,2 @@ VIA_ENABLE = yes +LTO_ENABLE = yes From 0643590326573b1b90cfb0cb70e8ee018c2a12c6 Mon Sep 17 00:00:00 2001 From: kb-elmo Date: Thu, 3 Jun 2021 22:29:40 +0200 Subject: [PATCH 3/4] Delete ergomorph55.c accidental commit --- keyboards/ergomorph55/ergomorph55.c | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 keyboards/ergomorph55/ergomorph55.c diff --git a/keyboards/ergomorph55/ergomorph55.c b/keyboards/ergomorph55/ergomorph55.c deleted file mode 100644 index dddf2843dce1..000000000000 --- a/keyboards/ergomorph55/ergomorph55.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright 2021 kb-elmo - * - * 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 "ergomorph55.h" From b532c702eaca5034c3cb4deaed709bd25df0e872 Mon Sep 17 00:00:00 2001 From: kb-elmo Date: Thu, 17 Jun 2021 09:17:06 +0200 Subject: [PATCH 4/4] Update config.h --- keyboards/kb_elmo/aek2_usb/config.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/keyboards/kb_elmo/aek2_usb/config.h b/keyboards/kb_elmo/aek2_usb/config.h index 8c20d2d33604..9cad5d5c72f9 100644 --- a/keyboards/kb_elmo/aek2_usb/config.h +++ b/keyboards/kb_elmo/aek2_usb/config.h @@ -52,5 +52,6 @@ along with this program. If not, see . /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* reduce VIA layer count because of EEPROM size */ +/* reduce EEPROM usage */ #define DYNAMIC_KEYMAP_LAYER_COUNT 3 +#define LAYER_STATE_8BIT