From 47721416a6483a1d759c21a18beae3c0cb7d3eb2 Mon Sep 17 00:00:00 2001 From: Lele Date: Sat, 18 Mar 2023 12:31:18 +0100 Subject: [PATCH] gizmo/gk6: Add VIAL minimal support for Gizmo GK6 OLKB (#414) Add support for (Gixmo Engineering OLKB GK6)[https://www.gizmo.engineering/gk6/yellow_mellow] --- .../gk6/keymaps/vial/config.h | 10 + .../gk6/keymaps/vial/keymap.c | 104 ++++++++++ .../gk6/keymaps/vial/rules.mk | 32 ++++ .../gk6/keymaps/vial/vial.json | 177 ++++++++++++++++++ 4 files changed, 323 insertions(+) create mode 100644 keyboards/gizmo_engineering/gk6/keymaps/vial/config.h create mode 100755 keyboards/gizmo_engineering/gk6/keymaps/vial/keymap.c create mode 100644 keyboards/gizmo_engineering/gk6/keymaps/vial/rules.mk create mode 100644 keyboards/gizmo_engineering/gk6/keymaps/vial/vial.json diff --git a/keyboards/gizmo_engineering/gk6/keymaps/vial/config.h b/keyboards/gizmo_engineering/gk6/keymaps/vial/config.h new file mode 100644 index 0000000000..820c2c1f2f --- /dev/null +++ b/keyboards/gizmo_engineering/gk6/keymaps/vial/config.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#pragma once + +#define VIAL_KEYBOARD_UID {0xC8, 0xEE, 0x5B, 0x6B, 0xF1, 0x95, 0x3E, 0xE0} + +#define VIAL_UNLOCK_COMBO_ROWS { 0, 0 } +#define VIAL_UNLOCK_COMBO_COLS { 0, 1 } + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/gizmo_engineering/gk6/keymaps/vial/keymap.c b/keyboards/gizmo_engineering/gk6/keymaps/vial/keymap.c new file mode 100755 index 0000000000..ad357648ac --- /dev/null +++ b/keyboards/gizmo_engineering/gk6/keymaps/vial/keymap.c @@ -0,0 +1,104 @@ +/* Copyright 2021 Gizmo Engineering + * + * 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 + +enum layers { + _QWERTY, + _LOWER, + _RAISE, +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | / | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | Up |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | GUI | Alt |Lower | Backspace | Space |Raise | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_gk6_2x2u( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_SLSH, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT, + KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_RGHT +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | - | = | [ | ] | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |RGB_TG|RGB_M |RGB_HU|RGB_SI|RGB_VI|RGB_SP| | | | | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Debug | | | | | | | | |R Alt | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_gk6_2x2u( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, _______, _______, _______, KC_PIPE, KC_BSLS, + DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_RALT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | PSCR | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Home | End | Ins | Play | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | << | >> | Mute | Vol- | Vol+ | | | | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | PgDn | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_gk6_2x2u( + 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_CAPS, KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_HOME, KC_END, KC_INS, KC_MPLY, _______, _______, _______, _______, _______, _______, _______, + _______, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______ +), + +}; + +#ifdef RGB_MATRIX_ENABLE +void rgb_matrix_indicators_user(void) +{ + rgb_matrix_set_color(24, 0, 0, 0); + rgb_matrix_set_color(30, 0, 0, 0); + rgb_matrix_set_color(35, 0, 0, 0); + rgb_matrix_set_color(36, 0, 0, 0); + rgb_matrix_set_color(41, 0, 0, 0); +} +#endif diff --git a/keyboards/gizmo_engineering/gk6/keymaps/vial/rules.mk b/keyboards/gizmo_engineering/gk6/keymaps/vial/rules.mk new file mode 100644 index 0000000000..a4ef3930cb --- /dev/null +++ b/keyboards/gizmo_engineering/gk6/keymaps/vial/rules.mk @@ -0,0 +1,32 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable + +VIA_ENABLE = yes +VIAL_ENABLE = yes + +# reduce size +LTO_ENABLE = yes +QMK_SETTINGS = no +TAP_DANCE_ENABLE = yes +COMBO_ENABLE = yes +KEY_OVERRIDE_ENABLE = no + +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output + +RGB_MATRIX_ENABLE = yes +RGB_MATRIX_DRIVER = IS31FL3731 diff --git a/keyboards/gizmo_engineering/gk6/keymaps/vial/vial.json b/keyboards/gizmo_engineering/gk6/keymaps/vial/vial.json new file mode 100644 index 0000000000..f274cd4ced --- /dev/null +++ b/keyboards/gizmo_engineering/gk6/keymaps/vial/vial.json @@ -0,0 +1,177 @@ +{ + "name": "Gizmo Engineering GK6", + "vendorId": "0x6532", + "productId": "0x0001", + "lighting": "none", + "matrix": { + "rows": 5, + "cols": 12 + }, + "layouts": { + "labels": [["Bottom Row", "Default", "1x2U", "5x12 1U"]], + "keymap": [ + [ + "0,0", + "0,1", + "0,2", + "0,3", + "0,4", + "0,5", + "0,6", + "0,7", + "0,8", + "0,9", + "0,10", + "0,11" + ], + [ + { + "c": "#777777" + }, + "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" + }, + "1,11" + ], + [ + { + "c": "#aaaaaa" + }, + "2,0", + { + "c": "#cccccc" + }, + "2,1", + "2,2", + "2,3", + "2,4", + "2,5", + "2,6", + "2,7", + "2,8", + "2,9", + "2,10", + "2,11" + ], + [ + { + "c": "#aaaaaa" + }, + "3,0", + { + "c": "#cccccc" + }, + "3,1", + "3,2", + "3,3", + "3,4", + "3,5", + "3,6", + "3,7", + "3,8", + "3,9", + { + "c": "#777777" + }, + "3,10", + "3,11" + ], + [ + "4,0\n\n\n0,0", + { + "c": "#aaaaaa" + }, + "4,1\n\n\n0,0", + "4,2\n\n\n0,0", + "4,3\n\n\n0,0", + { + "c": "#777777", + "w": 2 + }, + "4,4\n\n\n0,0", + { + "w": 2 + }, + "4,7\n\n\n0,0", + { + "c": "#aaaaaa" + }, + "4,8\n\n\n0,0", + { + "c": "#777777" + }, + "4,9\n\n\n0,0", + "4,10\n\n\n0,0", + "4,11\n\n\n0,0" + ], + [ + "4,0\n\n\n0,1", + { + "c": "#aaaaaa" + }, + "4,1\n\n\n0,1", + "4,2\n\n\n0,1", + "4,3\n\n\n0,1", + { + "c": "#777777" + }, + "4,4\n\n\n0,1", + { + "w": 2 + }, + "4,5\n\n\n0,1", + { + "c": "#aaaaaa" + }, + "4,7\n\n\n0,1", + "4,8\n\n\n0,1", + { + "c": "#777777" + }, + "4,9\n\n\n0,1", + "4,10\n\n\n0,1", + "4,11\n\n\n0,1" + ], + [ + "4,0\n\n\n0,2", + { + "c": "#aaaaaa" + }, + "4,1\n\n\n0,2", + "4,2\n\n\n0,2", + "4,3\n\n\n0,2", + { + "c": "#777777" + }, + "4,4\n\n\n0,2", + "4,5\n\n\n0,2", + "4,6\n\n\n0,2", + { + "c": "#aaaaaa" + }, + "4,7\n\n\n0,2", + "4,8\n\n\n0,2", + { + "c": "#777777" + }, + "4,9\n\n\n0,2", + "4,10\n\n\n0,2", + "4,11\n\n\n0,2" + ] + ] + } +}