From 888cd05a7f311c2b6e86941924807f587229559b Mon Sep 17 00:00:00 2001 From: KemoNine Date: Sun, 1 Nov 2020 16:05:56 -0500 Subject: [PATCH 1/4] Bring up Qvex Lynepad --- keyboards/qvex/lynepad/config.h | 64 +++++++++ .../qvex/lynepad/keymaps/default/config.h | 19 +++ .../qvex/lynepad/keymaps/default/keymap.c | 123 ++++++++++++++++++ .../qvex/lynepad/keymaps/default/readme.md | 1 + keyboards/qvex/lynepad/lynepad.c | 52 ++++++++ keyboards/qvex/lynepad/lynepad.h | 37 ++++++ keyboards/qvex/lynepad/readme.md | 13 ++ keyboards/qvex/lynepad/rules.mk | 28 ++++ keyboards/qvex/readme.md | 7 + 9 files changed, 344 insertions(+) create mode 100644 keyboards/qvex/lynepad/config.h create mode 100644 keyboards/qvex/lynepad/keymaps/default/config.h create mode 100644 keyboards/qvex/lynepad/keymaps/default/keymap.c create mode 100644 keyboards/qvex/lynepad/keymaps/default/readme.md create mode 100644 keyboards/qvex/lynepad/lynepad.c create mode 100644 keyboards/qvex/lynepad/lynepad.h create mode 100644 keyboards/qvex/lynepad/readme.md create mode 100644 keyboards/qvex/lynepad/rules.mk create mode 100644 keyboards/qvex/readme.md diff --git a/keyboards/qvex/lynepad/config.h b/keyboards/qvex/lynepad/config.h new file mode 100644 index 000000000000..86b3910aa37c --- /dev/null +++ b/keyboards/qvex/lynepad/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2020 KemoNine + +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 0x5156 +#define PRODUCT_ID 0x4C50 +#define DEVICE_VER 0x0001 +#define MANUFACTURER QVEX +#define PRODUCT Lynepad +#define DESCRIPTION Macro Keypad + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 4 + +/* Basic matrix config */ +#define MATRIX_ROW_PINS { C7, F7, F6} +#define MATRIX_COL_PINS { F0, F1, F4, F5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Encoders */ +#define ENCODERS_PAD_A { D0, B5 } +#define ENCODERS_PAD_B { D1, D6 } + +/* LEDs */ +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#undef RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 4 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 240 +#endif + +/* Definitions for encoder tilt/press support */ +#define ENC_TILT_THRESHOLD 1 +#define PIN_TW_SW D2 // Center +#define PIN_RJ_SW C6 // Center +#define PIN_RJ_DIR_A D4 // Up +#define PIN_RJ_DIR_B D7 // Left +#define PIN_RJ_DIR_C B6 // Down +#define PIN_RJ_DIR_D B4 // Right diff --git a/keyboards/qvex/lynepad/keymaps/default/config.h b/keyboards/qvex/lynepad/keymaps/default/config.h new file mode 100644 index 000000000000..251d75538d35 --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2020 KemoNine + * + * 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 + +// place overrides here diff --git a/keyboards/qvex/lynepad/keymaps/default/keymap.c b/keyboards/qvex/lynepad/keymaps/default/keymap.c new file mode 100644 index 000000000000..c7079d63cb16 --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/keymap.c @@ -0,0 +1,123 @@ +/* Copyright 2020 KemoNine + * + * 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 + +#include + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap (Base Layer) Default Layer + * |----------------------------| + * | 1 | 2 | 3 | 4 | | + * | 5 | 6 | 7 | 8 | | + * | 9 | 10 | 11 | | + * |----------------------------| + */ +[0] = LAYOUT_Lynepad( + KC_MS_BTN4, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, + KC_MS_BTN5, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, + KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2 + ) +}; + +// Standard encoder functionality +void encoder_update_user(uint8_t index, bool clockwise) { + // Process encoder rotational movements + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_AUDIO_VOL_DOWN); + } else { + tap_code(KC_AUDIO_VOL_UP); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_MS_WH_UP); + } else { + tap_code(KC_MS_WH_DOWN); + } + } +} + +// Encoder press / tilt event handling +// the core lynepad implementation will update the below variables on each matrix scan +// Update the various codes below for customizing the tilt / push config + +extern int16_t enc1Center; +extern int16_t enc1CenterPrev; +extern int16_t enc2Center; +extern int16_t enc2CenterPrev; +extern int16_t enc2Up; +extern int16_t enc2UpPrev; +extern int16_t enc2Down; +extern int16_t enc2DownPrev; +extern int16_t enc2Left; +extern int16_t enc2LeftPrev; +extern int16_t enc2Right; +extern int16_t enc2RightPrev; + +void matrix_scan_user(void) { + if (enc1Center != enc1CenterPrev) { + if (enc1Center < ENC_TILT_THRESHOLD) { + } + else { + reset_keyboard(); + } + } + if (enc2Center != enc2CenterPrev) { + if (enc2Center < ENC_TILT_THRESHOLD) { + register_code16(KC_MS_BTN3); + } + else { + unregister_code16(KC_MS_BTN3); + } + /* + * Encoder sets ALL values when center is pressed so bail out at this point\ + * to avoid the rest of the encoder buttons registering events + */ + return; + } + if (enc2Up != enc2UpPrev) { + if (enc2Up < ENC_TILT_THRESHOLD) { + register_code16(RGB_VAI); + } + else { + unregister_code16(RGB_VAI); + } + } + if (enc2Down != enc2DownPrev) { + if (enc2Down < ENC_TILT_THRESHOLD) { + register_code16(RGB_VAD); + } + else { + unregister_code16(RGB_VAD); + } + } + if (enc2Left != enc2LeftPrev) { + if (enc2Left < ENC_TILT_THRESHOLD) { + register_code16(RGB_TOG); + } + else { + unregister_code16(RGB_TOG); + } + } + if (enc2Right != enc2RightPrev) { + if (enc2Right < ENC_TILT_THRESHOLD) { + register_code16(RGB_MODE_FORWARD); + } + else { + unregister_code16(RGB_MODE_FORWARD); + } + } +} diff --git a/keyboards/qvex/lynepad/keymaps/default/readme.md b/keyboards/qvex/lynepad/keymaps/default/readme.md new file mode 100644 index 000000000000..8884d1a91a2f --- /dev/null +++ b/keyboards/qvex/lynepad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for lynepad diff --git a/keyboards/qvex/lynepad/lynepad.c b/keyboards/qvex/lynepad/lynepad.c new file mode 100644 index 000000000000..9e3e11798a4d --- /dev/null +++ b/keyboards/qvex/lynepad/lynepad.c @@ -0,0 +1,52 @@ +#include "lynepad.h" + +#include + +void keyboard_pre_init_kb(void) { + // Encoder pins + setPinInput(PIN_TW_SW); + setPinInput(PIN_RJ_SW); + setPinInput(PIN_RJ_DIR_A); + setPinInput(PIN_RJ_DIR_C); + setPinInput(PIN_RJ_DIR_B); + setPinInput(PIN_RJ_DIR_D); +} + +// void keyboard_post_init_user(void) { +// debug_enable=true; +// debug_matrix=true; +// debug_keyboard=true; +// debug_mouse=true; +// } + +int16_t enc1Center = 1; +int16_t enc1CenterPrev = 1; +int16_t enc2Center = 1; +int16_t enc2CenterPrev = 1; +int16_t enc2Up = 1; +int16_t enc2UpPrev = 1; +int16_t enc2Down = 1; +int16_t enc2DownPrev = 1; +int16_t enc2Left = 1; +int16_t enc2LeftPrev = 1; +int16_t enc2Right = 1; +int16_t enc2RightPrev = 1; + +void matrix_scan_kb(void) { + enc1CenterPrev = enc1Center; + enc1Center = readPin(PIN_TW_SW); + + enc2CenterPrev = enc2Center; + enc2Center = readPin(PIN_RJ_SW); + enc2UpPrev = enc2Up; + enc2Up = readPin(PIN_RJ_DIR_A); + enc2DownPrev = enc2Down; + enc2Down = readPin(PIN_RJ_DIR_C); + enc2LeftPrev = enc2Left; + enc2Left = readPin(PIN_RJ_DIR_B); + enc2RightPrev = enc2Right; + enc2Right = readPin(PIN_RJ_DIR_D); + + // Ensure any user customizations are called (for some reason this wasn't happening by default) + matrix_scan_user(); +} diff --git a/keyboards/qvex/lynepad/lynepad.h b/keyboards/qvex/lynepad/lynepad.h new file mode 100644 index 000000000000..95b1178f9258 --- /dev/null +++ b/keyboards/qvex/lynepad/lynepad.h @@ -0,0 +1,37 @@ +/* Copyright 2020 KemoNine + * + * 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" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_Lynepad( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, KC_NO } \ +} diff --git a/keyboards/qvex/lynepad/readme.md b/keyboards/qvex/lynepad/readme.md new file mode 100644 index 000000000000..6657b3198d5c --- /dev/null +++ b/keyboards/qvex/lynepad/readme.md @@ -0,0 +1,13 @@ +# QVEX Lynepad + +Macro pad with 11 keys and 2 rotary encoders. + +Keyboard Maintainer: [KemoNine](https://git.kemonine.info/kemonine/keyboard) +Hardware Supported: QVEX Lynepad: macro keypad +Hardware Availability: Tindie [Keyboard Kit](https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/) + +Make example for this macro pad (after setting up your build environment): + + make qvex/lynepad:default + +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/qvex/lynepad/rules.mk b/keyboards/qvex/lynepad/rules.mk new file mode 100644 index 000000000000..641c52e3808b --- /dev/null +++ b/keyboards/qvex/lynepad/rules.mk @@ -0,0 +1,28 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable the encoders diff --git a/keyboards/qvex/readme.md b/keyboards/qvex/readme.md new file mode 100644 index 000000000000..854fd4d767b1 --- /dev/null +++ b/keyboards/qvex/readme.md @@ -0,0 +1,7 @@ +# QVEX + +QVEX is a keyboard vendor based in Czechia + +## Online Stores + +**Website:** https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/ From 14e43a984faacffb10fff19a1730e4a91d8ff86b Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 2 Nov 2020 00:07:51 -0500 Subject: [PATCH 2/4] Updates based on feedback from QMK devs in PR 10826 --- keyboards/qvex/lynepad/config.h | 1 - keyboards/qvex/lynepad/info.json | 12 ++++++++++++ .../qvex/lynepad/keymaps/default/config.h | 19 ------------------- .../qvex/lynepad/keymaps/default/keymap.c | 10 +++------- keyboards/qvex/lynepad/lynepad.c | 9 --------- keyboards/qvex/lynepad/lynepad.h | 14 +++++++------- keyboards/qvex/lynepad/readme.md | 6 +++--- keyboards/qvex/lynepad/rules.mk | 15 ++++----------- 8 files changed, 29 insertions(+), 57 deletions(-) create mode 100644 keyboards/qvex/lynepad/info.json delete mode 100644 keyboards/qvex/lynepad/keymaps/default/config.h diff --git a/keyboards/qvex/lynepad/config.h b/keyboards/qvex/lynepad/config.h index 86b3910aa37c..d1a5c2eb0bf0 100644 --- a/keyboards/qvex/lynepad/config.h +++ b/keyboards/qvex/lynepad/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define DEVICE_VER 0x0001 #define MANUFACTURER QVEX #define PRODUCT Lynepad -#define DESCRIPTION Macro Keypad /* key matrix size */ #define MATRIX_ROWS 3 diff --git a/keyboards/qvex/lynepad/info.json b/keyboards/qvex/lynepad/info.json new file mode 100644 index 000000000000..405614e9f022 --- /dev/null +++ b/keyboards/qvex/lynepad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "QVEX Lynepad", + "url": "https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/", + "maintainer": "KemoNine", + "width": 4, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}] + } + } + } \ No newline at end of file diff --git a/keyboards/qvex/lynepad/keymaps/default/config.h b/keyboards/qvex/lynepad/keymaps/default/config.h deleted file mode 100644 index 251d75538d35..000000000000 --- a/keyboards/qvex/lynepad/keymaps/default/config.h +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright 2020 KemoNine - * - * 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 - -// place overrides here diff --git a/keyboards/qvex/lynepad/keymaps/default/keymap.c b/keyboards/qvex/lynepad/keymaps/default/keymap.c index c7079d63cb16..e4d44ba71bed 100644 --- a/keyboards/qvex/lynepad/keymaps/default/keymap.c +++ b/keyboards/qvex/lynepad/keymaps/default/keymap.c @@ -15,8 +15,6 @@ */ #include QMK_KEYBOARD_H -#include - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap (Base Layer) Default Layer * |----------------------------| @@ -25,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 9 | 10 | 11 | | * |----------------------------| */ -[0] = LAYOUT_Lynepad( +[0] = LAYOUT( KC_MS_BTN4, KC_MS_BTN2, KC_MS_UP, KC_MS_BTN1, KC_MS_BTN5, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2 @@ -90,18 +88,16 @@ void matrix_scan_user(void) { } if (enc2Up != enc2UpPrev) { if (enc2Up < ENC_TILT_THRESHOLD) { - register_code16(RGB_VAI); } else { - unregister_code16(RGB_VAI); + rgblight_increase_val_noeeprom(); } } if (enc2Down != enc2DownPrev) { if (enc2Down < ENC_TILT_THRESHOLD) { - register_code16(RGB_VAD); } else { - unregister_code16(RGB_VAD); + rgblight_decrease_val_noeeprom(); } } if (enc2Left != enc2LeftPrev) { diff --git a/keyboards/qvex/lynepad/lynepad.c b/keyboards/qvex/lynepad/lynepad.c index 9e3e11798a4d..44e4f848582f 100644 --- a/keyboards/qvex/lynepad/lynepad.c +++ b/keyboards/qvex/lynepad/lynepad.c @@ -1,7 +1,5 @@ #include "lynepad.h" -#include - void keyboard_pre_init_kb(void) { // Encoder pins setPinInput(PIN_TW_SW); @@ -12,13 +10,6 @@ void keyboard_pre_init_kb(void) { setPinInput(PIN_RJ_DIR_D); } -// void keyboard_post_init_user(void) { -// debug_enable=true; -// debug_matrix=true; -// debug_keyboard=true; -// debug_mouse=true; -// } - int16_t enc1Center = 1; int16_t enc1CenterPrev = 1; int16_t enc2Center = 1; diff --git a/keyboards/qvex/lynepad/lynepad.h b/keyboards/qvex/lynepad/lynepad.h index 95b1178f9258..2a3015ceea0d 100644 --- a/keyboards/qvex/lynepad/lynepad.h +++ b/keyboards/qvex/lynepad/lynepad.h @@ -25,13 +25,13 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT_Lynepad( \ - K00, K01, K02, K03, \ - K10, K11, K12, K13, \ - K20, K21, K22 \ +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22 \ ) \ { \ - { K00, K01, K02, K03 }, \ - { K10, K11, K12, K13 }, \ - { K20, K21, K22, KC_NO } \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, KC_NO } \ } diff --git a/keyboards/qvex/lynepad/readme.md b/keyboards/qvex/lynepad/readme.md index 6657b3198d5c..68dd85a673d3 100644 --- a/keyboards/qvex/lynepad/readme.md +++ b/keyboards/qvex/lynepad/readme.md @@ -2,9 +2,9 @@ Macro pad with 11 keys and 2 rotary encoders. -Keyboard Maintainer: [KemoNine](https://git.kemonine.info/kemonine/keyboard) -Hardware Supported: QVEX Lynepad: macro keypad -Hardware Availability: Tindie [Keyboard Kit](https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/) +* Keyboard Maintainer: [KemoNine](https://git.kemonine.info/kemonine/keyboard) +* Hardware Supported: QVEX Lynepad: macro keypad +* Hardware Availability: Tindie [Keyboard Kit](https://www.tindie.com/products/qvex_tech/qvex-lynepad-macro-keypad/) Make example for this macro pad (after setting up your build environment): diff --git a/keyboards/qvex/lynepad/rules.mk b/keyboards/qvex/lynepad/rules.mk index 641c52e3808b..7b05cfb9b828 100644 --- a/keyboards/qvex/lynepad/rules.mk +++ b/keyboards/qvex/lynepad/rules.mk @@ -2,13 +2,6 @@ MCU = atmega32u4 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp BOOTLOADER = caterina # Build Options @@ -17,12 +10,12 @@ BOOTLOADER = caterina BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration 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 +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow ENCODER_ENABLE = yes # Enable the encoders From 6fbeb7bc099ef460ce46d1d1e904e88272467182 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 2 Nov 2020 09:37:05 -0500 Subject: [PATCH 3/4] Further updates per QMK dev feedback --- keyboards/qvex/lynepad/keymaps/default/keymap.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/keyboards/qvex/lynepad/keymaps/default/keymap.c b/keyboards/qvex/lynepad/keymaps/default/keymap.c index e4d44ba71bed..37e015e62468 100644 --- a/keyboards/qvex/lynepad/keymaps/default/keymap.c +++ b/keyboards/qvex/lynepad/keymaps/default/keymap.c @@ -102,18 +102,16 @@ void matrix_scan_user(void) { } if (enc2Left != enc2LeftPrev) { if (enc2Left < ENC_TILT_THRESHOLD) { - register_code16(RGB_TOG); } else { - unregister_code16(RGB_TOG); + rgblight_toggle_noeeprom(); } } if (enc2Right != enc2RightPrev) { if (enc2Right < ENC_TILT_THRESHOLD) { - register_code16(RGB_MODE_FORWARD); } else { - unregister_code16(RGB_MODE_FORWARD); + rgblight_step_noeeprom(); } } } From f69db14013295b621335edf2d1935060ef669b82 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Mon, 2 Nov 2020 16:06:45 -0500 Subject: [PATCH 4/4] Additional updates per QMK dev feedback --- keyboards/qvex/lynepad/lynepad.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/keyboards/qvex/lynepad/lynepad.c b/keyboards/qvex/lynepad/lynepad.c index 44e4f848582f..33620d9da323 100644 --- a/keyboards/qvex/lynepad/lynepad.c +++ b/keyboards/qvex/lynepad/lynepad.c @@ -1,3 +1,16 @@ +/* +Copyright 2020 KemoNine +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 "lynepad.h" void keyboard_pre_init_kb(void) { @@ -8,6 +21,8 @@ void keyboard_pre_init_kb(void) { setPinInput(PIN_RJ_DIR_C); setPinInput(PIN_RJ_DIR_B); setPinInput(PIN_RJ_DIR_D); + + keyboard_pre_init_user(); } int16_t enc1Center = 1;