From e528c45ee2e2bcbeaea67155d559e79e7679f70b Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 15:30:19 +0800 Subject: [PATCH 01/10] Add Nayeon --- keyboards/abatskeyboardclub/nayeon/config.h | 145 +++++++++ keyboards/abatskeyboardclub/nayeon/info.json | 299 ++++++++++++++++++ .../nayeon/keymaps/default/keymap.c | 66 ++++ .../nayeon/keymaps/iso/keymap.c | 66 ++++ .../nayeon/keymaps/via/keymap.c | 90 ++++++ .../nayeon/keymaps/via/rules.mk | 1 + keyboards/abatskeyboardclub/nayeon/nayeon.c | 17 + keyboards/abatskeyboardclub/nayeon/nayeon.h | 81 +++++ keyboards/abatskeyboardclub/nayeon/readme.md | 20 ++ keyboards/abatskeyboardclub/nayeon/rules.mk | 18 ++ 10 files changed, 803 insertions(+) create mode 100644 keyboards/abatskeyboardclub/nayeon/config.h create mode 100644 keyboards/abatskeyboardclub/nayeon/info.json create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/via/rules.mk create mode 100644 keyboards/abatskeyboardclub/nayeon/nayeon.c create mode 100644 keyboards/abatskeyboardclub/nayeon/nayeon.h create mode 100644 keyboards/abatskeyboardclub/nayeon/readme.md create mode 100644 keyboards/abatskeyboardclub/nayeon/rules.mk diff --git a/keyboards/abatskeyboardclub/nayeon/config.h b/keyboards/abatskeyboardclub/nayeon/config.h new file mode 100644 index 000000000000..7996608145e6 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/config.h @@ -0,0 +1,145 @@ +/* +Copyright 2022 Ramon Imbao + +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 + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4B47 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Abats Keyboard Club +#define PRODUCT Nayeon + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 17 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { B2, B3, B7, D6, D3, D2 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D4, D5, B0, B1, D1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +# define RGBLIGHT_LAYERS +# define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + +# define RGBLED_NUM 26 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +//# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +# define RGBLIGHT_EFFECT_BREATHING +# define RGBLIGHT_EFFECT_RAINBOW_MOOD +# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +# define RGBLIGHT_EFFECT_CHRISTMAS +# define RGBLIGHT_EFFECT_STATIC_GRADIENT +# define RGBLIGHT_EFFECT_RGB_TEST +# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is useful for the Windows task manager shortcut (ctrl+shift+esc). + */ +//#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT + +/* disable these deprecated features by default */ +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +//#define BOOTMAGIC_LITE_ROW 0 +//#define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/abatskeyboardclub/nayeon/info.json b/keyboards/abatskeyboardclub/nayeon/info.json new file mode 100644 index 000000000000..3df680f62b66 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/info.json @@ -0,0 +1,299 @@ +{ + "keyboard_name": "Nayeon", + "url": "", + "maintainer": "Ramon Imbao", + "layouts": { + "LAYOUT_ansi": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + + {"x":0, "y":4.25, "w":2.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + + {"x":0, "y":5.25, "w":1.5}, + {"x":1.5, "y":5.25}, + {"x":2.5, "y":5.25, "w":1.5}, + {"x":4, "y":5.25, "w":7}, + {"x":11, "y":5.25, "w":1.5}, + {"x":12.5, "y":5.25}, + {"x":13.5, "y":5.25, "w":1.5}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + }, + "LAYOUT_iso": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25, "w":2}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25}, + {"x":13.75, "y":2.25, "w":1.25, "h":2}, + + {"x":0, "y":4.25, "w":1.25}, + {"x":1.25, "y":4.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":2.75}, + {"x":16.25, "y":4.25}, + + {"x":0, "y":5.25, "w":1.5}, + {"x":1.5, "y":5.25}, + {"x":2.5, "y":5.25, "w":1.5}, + {"x":4, "y":5.25, "w":7}, + {"x":11, "y":5.25, "w":1.5}, + {"x":12.5, "y":5.25}, + {"x":13.5, "y":5.25, "w":1.5}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + }, + "LAYOUT_all": { + "layout": [ + {"x":0, "y":0}, + {"x":1.25, "y":0}, + {"x":2.25, "y":0}, + {"x":3.25, "y":0}, + {"x":4.25, "y":0}, + {"x":5.5, "y":0}, + {"x":6.5, "y":0}, + {"x":7.5, "y":0}, + {"x":8.5, "y":0}, + {"x":9.75, "y":0}, + {"x":10.75, "y":0}, + {"x":11.75, "y":0}, + {"x":12.75, "y":0}, + {"x":14, "y":0}, + {"x":15.25, "y":0}, + {"x":16.25, "y":0}, + {"x":17.25, "y":0}, + + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + {"x":4, "y":1.25}, + {"x":5, "y":1.25}, + {"x":6, "y":1.25}, + {"x":7, "y":1.25}, + {"x":8, "y":1.25}, + {"x":9, "y":1.25}, + {"x":10, "y":1.25}, + {"x":11, "y":1.25}, + {"x":12, "y":1.25}, + {"x":13, "y":1.25}, + {"x":14, "y":1.25}, + {"x":15.25, "y":1.25}, + {"x":16.25, "y":1.25}, + {"x":17.25, "y":1.25}, + + {"x":0, "y":2.25, "w":1.5}, + {"x":1.5, "y":2.25}, + {"x":2.5, "y":2.25}, + {"x":3.5, "y":2.25}, + {"x":4.5, "y":2.25}, + {"x":5.5, "y":2.25}, + {"x":6.5, "y":2.25}, + {"x":7.5, "y":2.25}, + {"x":8.5, "y":2.25}, + {"x":9.5, "y":2.25}, + {"x":10.5, "y":2.25}, + {"x":11.5, "y":2.25}, + {"x":12.5, "y":2.25}, + {"x":13.5, "y":2.25, "w":1.5}, + {"x":15.25, "y":2.25}, + {"x":16.25, "y":2.25}, + {"x":17.25, "y":2.25}, + + {"x":0, "y":3.25, "w":1.75}, + {"x":1.75, "y":3.25}, + {"x":2.75, "y":3.25}, + {"x":3.75, "y":3.25}, + {"x":4.75, "y":3.25}, + {"x":5.75, "y":3.25}, + {"x":6.75, "y":3.25}, + {"x":7.75, "y":3.25}, + {"x":8.75, "y":3.25}, + {"x":9.75, "y":3.25}, + {"x":10.75, "y":3.25}, + {"x":11.75, "y":3.25}, + {"x":12.75, "y":3.25, "w":2.25}, + + {"x":0, "y":4.25, "w":1.25}, + {"x":1.25, "y":4.25}, + {"x":2.25, "y":4.25}, + {"x":3.25, "y":4.25}, + {"x":4.25, "y":4.25}, + {"x":5.25, "y":4.25}, + {"x":6.25, "y":4.25}, + {"x":7.25, "y":4.25}, + {"x":8.25, "y":4.25}, + {"x":9.25, "y":4.25}, + {"x":10.25, "y":4.25}, + {"x":11.25, "y":4.25}, + {"x":12.25, "y":4.25, "w":1.75}, + {"x":14, "y":4.25}, + {"x":16.25, "y":4.25}, + + {"x":0, "y":5.25, "w":1.5}, + {"x":1.5, "y":5.25}, + {"x":2.5, "y":5.25, "w":1.5}, + {"x":4, "y":5.25, "w":7}, + {"x":11, "y":5.25, "w":1.5}, + {"x":12.5, "y":5.25}, + {"x":13.5, "y":5.25, "w":1.5}, + {"x":15.25, "y":5.25}, + {"x":16.25, "y":5.25}, + {"x":17.25, "y":5.25} + ] + } + } +} diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c new file mode 100644 index 000000000000..1bd5c4f0a9cb --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2022 Ramon Imbao + * + * 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] = { + [0] = LAYOUT_ansi( + 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_F13, KC_PSCR, KC_SLCK, KC_PAUS, + 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_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_CAPS, 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF}, + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); + +void keyboard_post_init_kb(void) { + rgblight_layers = rgb_layers; + + keyboard_post_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); + } + } + + return res; +} +#endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c new file mode 100644 index 000000000000..4f9404293769 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c @@ -0,0 +1,66 @@ +/* Copyright 2022 Ramon Imbao + * + * 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] = { + [0] = LAYOUT_iso( + 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_F13, KC_PSCR, KC_SLCK, KC_PAUS, + 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_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_DEL, KC_END, KC_PGDN, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, + KC_LSFT, KC_NUBS, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ) +}; + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF}, + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); + +void keyboard_post_init_kb(void) { + rgblight_layers = rgb_layers; + + keyboard_post_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); + } + } + + return res; +} +#endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c new file mode 100644 index 000000000000..01a24cf07aab --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2022 Ramon Imbao + * + * 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] = { + [0] = LAYOUT_all( + 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_F13, KC_PSCR, KC_SLCK, KC_PAUS, + 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_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_CAPS, 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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +#ifdef RGBLIGHT_ENABLE +const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF}, + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_cl[] = RGBLIGHT_LAYER_SEGMENTS( + {1, 1, HSV_OFF} +); + +const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( + {0, 1, HSV_OFF} +); + +const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); + +void keyboard_post_init_kb(void) { + rgblight_layers = rgb_layers; + + keyboard_post_init_user(); +} + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + + if (res) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); + } + } + + return res; +} +#endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/rules.mk b/keyboards/abatskeyboardclub/nayeon/keymaps/via/rules.mk new file mode 100644 index 000000000000..1e5b99807cb7 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/abatskeyboardclub/nayeon/nayeon.c b/keyboards/abatskeyboardclub/nayeon/nayeon.c new file mode 100644 index 000000000000..14fb22a486f6 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/nayeon.c @@ -0,0 +1,17 @@ +/* Copyright 2022 Ramon Imbao + * + * 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 "nayeon.h" diff --git a/keyboards/abatskeyboardclub/nayeon/nayeon.h b/keyboards/abatskeyboardclub/nayeon/nayeon.h new file mode 100644 index 000000000000..ba0b1498f7e1 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/nayeon.h @@ -0,0 +1,81 @@ +/* Copyright 2022 Ramon Imbao + * + * 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 + +#include "quantum.h" + +#define ___ KC_NO + +// ANSI layout +// Full backspace +// Full right shift +// Full left shift +#define LAYOUT_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4f, \ + k50, k51, k52, k57, k5b, k5c, k5d, k5e, k5f, k5g \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, ___, ___, ___, ___ }, \ + { k40, ___, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, ___, ___, k4f, ___ }, \ + { k50, k51, k52, ___, ___, ___, ___, k57, ___, ___, ___, k5b, k5c, k5d, k5e, k5f, k5g }, \ +} + +// ISO layout +// Full backspace +// Full right shift +// Split left shift +#define LAYOUT_iso( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k2f, k2g, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k2d, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4f, \ + k50, k51, k52, k57, k5b, k5c, k5d, k5e, k5f, k5g \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, ___, ___, ___, ___ }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, ___, ___, k4f, ___ }, \ + { k50, k51, k52, ___, ___, ___, ___, k57, ___, ___, ___, k5b, k5c, k5d, k5e, k5f, k5g }, \ +} + +// Layout for VIA +// Split backspace +// Split left shift +// Split right shift +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k3d, k1e, k1f, k1g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, k4f, \ + k50, k51, k52, k57, k5b, k5c, k5d, k5e, k5f, k5g \ +) { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, ___, ___, ___ }, \ + { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c, k4d, ___, k4f, ___ }, \ + { k50, k51, k52, ___, ___, ___, ___, k57, ___, ___, ___, k5b, k5c, k5d, k5e, k5f, k5g } \ +} diff --git a/keyboards/abatskeyboardclub/nayeon/readme.md b/keyboards/abatskeyboardclub/nayeon/readme.md new file mode 100644 index 000000000000..f88c1e187db1 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/readme.md @@ -0,0 +1,20 @@ +# Nayeon + +![Nayeon](https://i.imgur.com/OfB5ikbl.jpg) + +Nayeon is a screwless TKL keyboard with an extra key, inspired by a K-pop artist named Im-Nayeon. + +* Keyboard Maintainer: [Ramon Imbao](https://github.com/ramonimbao) +* Hardware Supported: ATmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make abatskeyboardclub/nayeon:via + +To get to the bootloader, simply press the reset button located at the back of the PCB. You can then flash new firmware onto it. + +Flashing example for this keyboard: + + make abatskeyboardclub/nayeon:via:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/abatskeyboardclub/nayeon/rules.mk b/keyboards/abatskeyboardclub/nayeon/rules.mk new file mode 100644 index 000000000000..1f52c3715404 --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # 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 = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output From eb9fba383d0e1d592b7fe8a881c517bf6712da23 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 17:49:28 +0800 Subject: [PATCH 02/10] Update keyboards/abatskeyboardclub/nayeon/config.h Co-authored-by: Drashna Jaelre --- keyboards/abatskeyboardclub/nayeon/config.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/config.h b/keyboards/abatskeyboardclub/nayeon/config.h index 7996608145e6..b83090f7f38a 100644 --- a/keyboards/abatskeyboardclub/nayeon/config.h +++ b/keyboards/abatskeyboardclub/nayeon/config.h @@ -136,9 +136,6 @@ along with this program. If not, see . //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -/* disable these deprecated features by default */ -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 From 5b5e74d4d82b903e4c52dd8ea7250642a2511541 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 17:51:09 +0800 Subject: [PATCH 03/10] Move RGB light layer defines to keymaps --- keyboards/abatskeyboardclub/nayeon/config.h | 3 --- keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c | 4 ++++ keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c | 4 ++++ keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c | 4 ++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/config.h b/keyboards/abatskeyboardclub/nayeon/config.h index b83090f7f38a..422dafe3b083 100644 --- a/keyboards/abatskeyboardclub/nayeon/config.h +++ b/keyboards/abatskeyboardclub/nayeon/config.h @@ -54,9 +54,6 @@ along with this program. If not, see . #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN -# define RGBLIGHT_LAYERS -# define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF - # define RGBLED_NUM 26 # define RGBLIGHT_HUE_STEP 8 # define RGBLIGHT_SAT_STEP 8 diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c index 1bd5c4f0a9cb..0a7a9b13eb14 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c @@ -27,6 +27,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGBLIGHT_ENABLE + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_OFF}, {1, 1, HSV_OFF} diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c index 4f9404293769..6e52acf5e720 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c @@ -27,6 +27,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGBLIGHT_ENABLE + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_OFF}, {1, 1, HSV_OFF} diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c index 01a24cf07aab..725a477d4cc9 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c @@ -51,6 +51,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; #ifdef RGBLIGHT_ENABLE + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF + const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_OFF}, {1, 1, HSV_OFF} From b2f915c708dfd7d4c75f83da7293d14df2396814 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 17:54:27 +0800 Subject: [PATCH 04/10] Actually move it properly --- .../nayeon/keymaps/default/config.h | 18 ++++++++++++++++++ .../nayeon/keymaps/default/keymap.c | 3 --- .../nayeon/keymaps/iso/config.h | 18 ++++++++++++++++++ .../nayeon/keymaps/via/config.h | 18 ++++++++++++++++++ 4 files changed, 54 insertions(+), 3 deletions(-) create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h create mode 100644 keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h b/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h new file mode 100644 index 000000000000..7726d108a8fb --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h @@ -0,0 +1,18 @@ +/* Copyright 2022 Ramon Imbao + * + * 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 . + */ + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c index 0a7a9b13eb14..803c84d48de0 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c @@ -28,9 +28,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_LAYERS -#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF - const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_OFF}, {1, 1, HSV_OFF} diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h new file mode 100644 index 000000000000..7726d108a8fb --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h @@ -0,0 +1,18 @@ +/* Copyright 2022 Ramon Imbao + * + * 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 . + */ + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h b/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h new file mode 100644 index 000000000000..7726d108a8fb --- /dev/null +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h @@ -0,0 +1,18 @@ +/* Copyright 2022 Ramon Imbao + * + * 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 . + */ + +#define RGBLIGHT_LAYERS +#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF From b0531a4608f7e238f836fa38d7a79c5e4b181816 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 21:39:33 +0800 Subject: [PATCH 05/10] add #pragma once, and update from led_update_kb to led_update_user --- .../nayeon/keymaps/default/config.h | 2 ++ .../nayeon/keymaps/default/keymap.c | 20 +++++++------------ .../nayeon/keymaps/iso/config.h | 1 + .../nayeon/keymaps/iso/keymap.c | 18 ++++++----------- .../nayeon/keymaps/via/config.h | 1 + .../nayeon/keymaps/via/keymap.c | 18 ++++++----------- 6 files changed, 23 insertions(+), 37 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h b/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h index 7726d108a8fb..08636494e6d6 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/config.h @@ -14,5 +14,7 @@ * along with this program. If not, see . */ +#pragma once + #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c index 803c84d48de0..138bc3423950 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c @@ -49,19 +49,13 @@ void keyboard_post_init_kb(void) { keyboard_post_init_user(); } -bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; - for (uint8_t i=0; i<3; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 3) { - rgblight_set_layer_state(lock_bits, true); - } +bool led_update_user(led_t led_state) { + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); } - - return res; } #endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h index 7726d108a8fb..52983591bf04 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/config.h @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#pragma once #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c index 6e52acf5e720..64639af4bdfb 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c @@ -53,18 +53,12 @@ void keyboard_post_init_kb(void) { } bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; - for (uint8_t i=0; i<3; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 3) { - rgblight_set_layer_state(lock_bits, true); - } + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); } - - return res; } #endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h b/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h index 7726d108a8fb..52983591bf04 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/config.h @@ -13,6 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ +#pragma once #define RGBLIGHT_LAYERS #define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c index 725a477d4cc9..308f7f881bba 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c @@ -77,18 +77,12 @@ void keyboard_post_init_kb(void) { } bool led_update_kb(led_t led_state) { - bool res = led_update_user(led_state); - - if (res) { - uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; - for (uint8_t i=0; i<3; i++) { - rgblight_set_layer_state(i, false); - } - if (lock_bits < 3) { - rgblight_set_layer_state(lock_bits, true); - } + uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; + for (uint8_t i=0; i<3; i++) { + rgblight_set_layer_state(i, false); + } + if (lock_bits < 3) { + rgblight_set_layer_state(lock_bits, true); } - - return res; } #endif From 89db6b208ec40f1912fb06ca25c664cbe9e161b1 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 22:55:45 +0800 Subject: [PATCH 06/10] Also do the keyboard_post_init, and add the return statements --- .../abatskeyboardclub/nayeon/keymaps/default/keymap.c | 6 +++--- keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c | 6 +++--- keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c index 138bc3423950..f8d8d3505823 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/default/keymap.c @@ -43,10 +43,8 @@ const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } bool led_update_user(led_t led_state) { @@ -57,5 +55,7 @@ bool led_update_user(led_t led_state) { if (lock_bits < 3) { rgblight_set_layer_state(lock_bits, true); } + + return false; } #endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c index 64639af4bdfb..28ce2dd3a749 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c @@ -46,10 +46,8 @@ const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } bool led_update_kb(led_t led_state) { @@ -60,5 +58,7 @@ bool led_update_kb(led_t led_state) { if (lock_bits < 3) { rgblight_set_layer_state(lock_bits, true); } + + return false; } #endif diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c index 308f7f881bba..7b2775032f98 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c @@ -70,13 +70,11 @@ const rgblight_segment_t PROGMEM ll_sl[] = RGBLIGHT_LAYER_SEGMENTS( const rgblight_segment_t* const PROGMEM rgb_layers[] = RGBLIGHT_LAYERS_LIST(ll_none, ll_cl, ll_sl); -void keyboard_post_init_kb(void) { +void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; - - keyboard_post_init_user(); } -bool led_update_kb(led_t led_state) { +bool led_update_user(led_t led_state) { uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; for (uint8_t i=0; i<3; i++) { rgblight_set_layer_state(i, false); @@ -84,5 +82,7 @@ bool led_update_kb(led_t led_state) { if (lock_bits < 3) { rgblight_set_layer_state(lock_bits, true); } + + return false; } #endif From ca96f6e1bdcf8ea4618b94ac813d2bf197d15952 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Tue, 15 Mar 2022 23:13:41 +0800 Subject: [PATCH 07/10] Update keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c Co-authored-by: Joel Challis --- keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c index 28ce2dd3a749..41eda7c1a908 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c @@ -50,7 +50,7 @@ void keyboard_post_init_user(void) { rgblight_layers = rgb_layers; } -bool led_update_kb(led_t led_state) { +bool led_update_user(led_t led_state) { uint8_t lock_bits = led_state.scroll_lock << 1 | led_state.caps_lock; for (uint8_t i=0; i<3; i++) { rgblight_set_layer_state(i, false); From 49f32e1251166fef976a04ef5f163533fc99caa7 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Fri, 17 Jun 2022 09:38:04 +0800 Subject: [PATCH 08/10] Update keyboards/abatskeyboardclub/nayeon/config.h Co-authored-by: Drashna Jaelre --- keyboards/abatskeyboardclub/nayeon/config.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/config.h b/keyboards/abatskeyboardclub/nayeon/config.h index 422dafe3b083..dad3ee307f57 100644 --- a/keyboards/abatskeyboardclub/nayeon/config.h +++ b/keyboards/abatskeyboardclub/nayeon/config.h @@ -60,8 +60,6 @@ along with this program. If not, see . # define RGBLIGHT_VAL_STEP 8 //# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ //# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ -/*== all animations enable ==*/ -//# define RGBLIGHT_ANIMATIONS /*== or choose animations ==*/ # define RGBLIGHT_EFFECT_BREATHING # define RGBLIGHT_EFFECT_RAINBOW_MOOD From a8b65d809858f76ca28865422c0ccd56aba549f2 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Fri, 17 Jun 2022 09:38:10 +0800 Subject: [PATCH 09/10] Update keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c Co-authored-by: Drashna Jaelre --- keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c index 41eda7c1a908..eeef21b19e15 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/iso/keymap.c @@ -28,9 +28,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_LAYERS -#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF - const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_OFF}, {1, 1, HSV_OFF} From 7acfd7e742754c534b569d8e27acf96bd8f5ea42 Mon Sep 17 00:00:00 2001 From: Ramon Imbao Date: Fri, 17 Jun 2022 09:38:17 +0800 Subject: [PATCH 10/10] Update keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c Co-authored-by: Drashna Jaelre --- keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c index 7b2775032f98..a212b820f4c8 100644 --- a/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c +++ b/keyboards/abatskeyboardclub/nayeon/keymaps/via/keymap.c @@ -52,9 +52,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_LAYERS -#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF - const rgblight_segment_t PROGMEM ll_none[] = RGBLIGHT_LAYER_SEGMENTS( {0, 1, HSV_OFF}, {1, 1, HSV_OFF}