From bb182ad9366637b2cf442c7bfd1a9ff8ae095792 Mon Sep 17 00:00:00 2001 From: OTLabs Date: Sun, 1 Oct 2023 14:54:38 -0600 Subject: [PATCH] Add vial support for Akko Top40 (#558) * Add vial support for Akko Top40 Vial port for Akko Top40 keyboard, https://en.akkogear.com/product/acr-top-40/ * Update keyboards/akko/top40/keymaps/vial/config.h Remove redundunt #define's due to VIALRGB_ENABLE = yes in rules.mk Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com> * Update keyboards/akko/top40/keymaps/vial/rules.mk Remove unnesessary optimization Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com> * Update keyboards/akko/top40/keymaps/vial/config.h Enable Cherry MX Lock switches support Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com> --------- Co-authored-by: adophoxia <100170946+adophoxia@users.noreply.github.com> --- keyboards/akko/top40/keymaps/vial/config.h | 13 +++ keyboards/akko/top40/keymaps/vial/keymap.c | 37 +++++++ keyboards/akko/top40/keymaps/vial/rules.mk | 3 + keyboards/akko/top40/keymaps/vial/vial.json | 114 ++++++++++++++++++++ 4 files changed, 167 insertions(+) create mode 100644 keyboards/akko/top40/keymaps/vial/config.h create mode 100644 keyboards/akko/top40/keymaps/vial/keymap.c create mode 100644 keyboards/akko/top40/keymaps/vial/rules.mk create mode 100644 keyboards/akko/top40/keymaps/vial/vial.json diff --git a/keyboards/akko/top40/keymaps/vial/config.h b/keyboards/akko/top40/keymaps/vial/config.h new file mode 100644 index 00000000000..3bab1e52dca --- /dev/null +++ b/keyboards/akko/top40/keymaps/vial/config.h @@ -0,0 +1,13 @@ +// Copyright 2023 Oleg Titov +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Unique keyboard id +#define VIAL_KEYBOARD_UID {0x5D, 0x72, 0x7C, 0xB4, 0xC9, 0x7C, 0xF2, 0x60} + +// Unlock with Escape+Enter +#define VIAL_UNLOCK_COMBO_ROWS { 0, 1 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 11 } + + diff --git a/keyboards/akko/top40/keymaps/vial/keymap.c b/keyboards/akko/top40/keymaps/vial/keymap.c new file mode 100644 index 00000000000..fb9df162355 --- /dev/null +++ b/keyboards/akko/top40/keymaps/vial/keymap.c @@ -0,0 +1,37 @@ +/* Copyright (C) 2023 jonylee@hfd + * + * 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 +// clang-format off +enum __layers { + _Base, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_Base] = LAYOUT( /* Base */ + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, MO(_FN),KC_LEFT, KC_DOWN, KC_RGHT), + + [_FN] = LAYOUT( /* Fn */ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, RGB_TOG, RGB_MOD, + _______, _______, _______, KC_CALC, _______, AG_TOGG, _______, KC_MUTE, KC_VOLD, KC_VOLU, RGB_VAI, _______, + _______, GU_TOGG, _______, _______, _______, _______, RGB_SPI, RGB_VAD, RGB_SAI) +}; diff --git a/keyboards/akko/top40/keymaps/vial/rules.mk b/keyboards/akko/top40/keymaps/vial/rules.mk new file mode 100644 index 00000000000..6689dd363b9 --- /dev/null +++ b/keyboards/akko/top40/keymaps/vial/rules.mk @@ -0,0 +1,3 @@ +VIA_ENABLE = yes # Enable VIA +VIAL_ENABLE = yes # Enable VIAL +VIALRGB_ENABLE = yes # Enable VIALRGB diff --git a/keyboards/akko/top40/keymaps/vial/vial.json b/keyboards/akko/top40/keymaps/vial/vial.json new file mode 100644 index 00000000000..864a769fdb2 --- /dev/null +++ b/keyboards/akko/top40/keymaps/vial/vial.json @@ -0,0 +1,114 @@ +{ + "name": "Akko Top40", + "vendorId": "0xFFFE", + "productId": "0x000E", + "lighting": "vialrgb", + "matrix": { "rows": 4, "cols": 12 }, + "layouts": { + "keymap":[ + [ + { + "c": "#aaaaaa" + }, + "0,0", + { + "c": "#cccccc" + }, + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + { + "c": "#777777", + "w": 1.75 + }, + "0,11" + ], + [ + { + "w": 1.25 + }, + "1,0", + { + "c": "#cccccc" + }, + "1,1", + "1,2", + "1,3", + "1,4", + "1,5", + "1,6", + "1,7", + "1,8", + "1,9", + "1,10", + { + "c": "#777777", + "w": 1.5 + }, + "1,11" + ], + [ + { + "w": 1.75 + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + { + "c": "#aaaaaa" + }, + "2,10", + { + "c": "#777777" + }, + "2,11" + ], + [ + { + "w": 1.25 + }, + "3,0", + { + "w": 1.25 + }, + "3,1", + { + "w": 1.25 + }, + "3,2", + { + "w": 2.25 + }, + "3,4", + { + "w": 2.75 + }, + "3,6", + "3,8", + { + "c": "#aaaaaa" + }, + "3,9", + "3,10", + "3,11" + ] + ] + } +}