[Keyboard] fixed hhkb keymap issue on e6_rgb (#7684)

* fixed hhkb keymap issue and added allleds configuration

* fixed layout mismatch

* add more matrix control

* remove redundent define in rules.mk

* turn NKRO on

* remove allled macro, adding readme in allleds mode, add via support

* add two more layers for via

* update readme file

* Update keyboards/exclusive/e6_rgb/keymaps/allleds/readme

* Update keyboards/exclusive/e6_rgb/keymaps/allleds/readme.md
This commit is contained in:
yulei 2020-01-08 16:11:45 +08:00 committed by James Young
parent 4a09679d74
commit fe860131dd
10 changed files with 1418 additions and 105 deletions

View file

@ -7,8 +7,8 @@
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xDEAD
#define PRODUCT_ID 0xFEED
#define VENDOR_ID 0x4154 //AT
#define PRODUCT_ID 0x4536 //E6
#define DEVICE_VER 0x0062
#define MANUFACTURER astro
#define PRODUCT e6rgb
@ -23,27 +23,6 @@
#define UNUSED_PINS
#define DIODE_DIRECTION COL2ROW
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
/*
* 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
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
//rgb light setting
#define RGBLED_NUM 6
#define RGB_DI_PIN B7
@ -58,8 +37,3 @@
#define DRIVER_COUNT 2
#define DRIVER_1_LED_TOTAL 63
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL
// tapping setting
#define TAPPING_TERM 200
#define RETRO_TAPPING
#define PERMISSIVE_HOLD

View file

@ -5,24 +5,10 @@
#include "e6_rgb.h"
#ifdef RGB_MATRIX_ENABLE
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
}
__attribute__ ((weak))
void matrix_scan_kb(void) {
matrix_scan_user();
}
__attribute__ ((weak))
void matrix_init_user(void) {
setPinOutput(D5);
writePinHigh(D5);
}
__attribute__ ((weak))
void matrix_scan_user(void) {
matrix_init_user();
}
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
@ -190,3 +176,30 @@ led_config_t g_led_config = { {
} };
#endif
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch(keycode) {
#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
case KC_F13: // toggle rgb matrix
rgb_matrix_toggle();
return false;
case KC_F14:
rgb_matrix_step();
return false;
case KC_F15:
rgb_matrix_increase_hue();
return false;
case KC_F16:
rgb_matrix_increase_sat();
return false;
case KC_F17:
rgb_matrix_increase_val();
return false;
#endif
default:
break;
}
}
return true;
}

View file

@ -10,74 +10,75 @@
// The first section contains all of the arguements
// The second converts the arguments into a two-dimensional array
#define LAYOUT_60_ansi( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \
k40, k42, k43, k47, k48, k49, k4a, k4b \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, KC_NO}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, KC_NO}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \
}
#define LAYOUT_60_wkl( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k40, k42, k43, k47, k49, k4a, k4b \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \
}
#define LAYOUT_60_hhkb( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k42, k43, k47, k49, k4a \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \
{KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{ k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \
}
#define LAYOUT_60_wkl_split_bs( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k40, k42, k43, k47, k49, k4a, k4b \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \
}
#define LAYOUT_60_ansi_split_bs_shift( \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \
k40, k42, k43, k47, k48, k49, k4a, k4b \
) \
{ \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \
{k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \
{k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \
{k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,16 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_wkl_split_bs(
KC_ESC, 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_BSLS, KC_GRV,\
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_BSPC,\
KC_LCTRL, 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_END,\
KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL),
[1] = LAYOUT_60_wkl_split_bs(
_______, 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,\
RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\
_______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______, _______, _______,TG(0),_______),
};

View file

@ -0,0 +1,13 @@
This keymap turns RGB underglow and per-key RGB ON at the same time.
While this is the case:
RGB_TOG, RGB_MOD, etc to control the RGB underglow
F13-F17 were used to control the per key RGB
- F13 to turn the RGB on/off
- F14 to change the effect mode
- F15 to increase the HUE
- F16 to increase the SAT
- F17 to increase the VAL

View file

@ -0,0 +1 @@
RGB_MATRIX_ENABLE = IS31FL3733# Use RGB matrix

View file

@ -0,0 +1,28 @@
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_60_wkl_split_bs(
KC_ESC, 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_BSLS, KC_GRV,\
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_BSPC,\
KC_LCTRL, 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_END,\
KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL),
[1] = LAYOUT_60_wkl_split_bs(
_______, 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,\
RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\
_______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,_______,_______,_______,\
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______, _______, _______, TG(0),_______),
[2] = LAYOUT_60_wkl_split_bs(
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______, _______, _______,_______,_______),
[3] = LAYOUT_60_wkl_split_bs(
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\
_______,_______,_______, _______, _______,_______,_______),
};

View file

@ -0,0 +1 @@
VIA_ENABLE = yes

View file

@ -11,29 +11,24 @@ MCU = atmega32u4
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
# Do not put the microcontroller into power saving mode
# when we get USB suspend event. We want it to keep updating
# backlight effects.
#OPT_DEFS += -DNO_SUSPEND_POWER_DOWN
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration
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
# 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
NKRO_ENABLE = yes # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
MIDI_ENABLE = no # MIDI support
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
AUDIO_ENABLE = no # Audio output on port C6
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
#RGBLIGHT_ENABLE = yes # Use RGB bottom light
RGB_MATRIX_ENABLE = IS31FL3733# Use RGB matrix
RGBLIGHT_ENABLE = yes # Use RGB underglow light
RGB_MATRIX_ENABLE = no # Use RGB matrix
LAYOUTS = 60_ansi 60_hhkb