Skip to content
This repository has been archived by the owner on Nov 22, 2024. It is now read-only.

Commit

Permalink
fixes for qmk#15558 and somewhat revert qmk#16916
Browse files Browse the repository at this point in the history
  • Loading branch information
Vino Rodrigues committed Apr 22, 2022
1 parent d973734 commit 5f739a0
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 40 deletions.
39 changes: 20 additions & 19 deletions keyboards/idobao/id67/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/* USB Device descriptor parameter */
#define VENDOR_ID 0x6964 /* "id" */
#define PRODUCT_ID 0x0067
#define DEVICE_VER 0x0001
#define DEVICE_VER 0x0002
#define MANUFACTURER IDOBAO
#define PRODUCT ID67

Expand Down Expand Up @@ -92,29 +92,30 @@
#define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in
#define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right
#define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right
#define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard
#define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard
#define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
#define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard
#define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard
#define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue
#define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation
#define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back
#define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left
#define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE// Pulses keys hit to hue & value then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
#endif // #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
#define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back
#define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left
#define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right

#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE// Pulses keys hit to hue & value then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE // Static single hue, pulses keys hit to shifted hue then fades to current hue
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE // Hue & value pulse near a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE // Hue & value pulse near multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS // Hue & value pulse the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS // Hue & value pulse the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS // Hue & value pulse away on the same column and row of a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS // Hue & value pulse away on the same column and row of multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SPLASH // Full gradient & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_MULTISPLASH // Full gradient & value pulse away from multiple key hits then fades value out
#define ENABLE_RGB_MATRIX_SOLID_SPLASH // Hue & value pulse away from a single key hit then fades value out
#define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH // Hue & value pulse away from multiple key hits then fades value out
#endif // #if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
#endif // #if defined(RGB_MATRIX_ENABLE)
7 changes: 0 additions & 7 deletions keyboards/idobao/id67/id67.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,3 @@ led_config_t g_led_config = { {
, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2
#endif
} };

__attribute__ ((weak))
void rgb_matrix_indicators_user(void) {
if (host_keyboard_led_state().caps_lock) {
rgb_matrix_set_color(23, 0xFF, 0xFF, 0xFF);
}
}
10 changes: 5 additions & 5 deletions keyboards/idobao/id67/keymaps/vinorodrigues/config.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Idobao ID67 Keymap for a ID67 Bestype, built for Mac use
* IDOBAO ID67 Keymap for a ID67 Bestype, built for Mac use
* Copyright (C) 2022 Vino Rodrigues
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -46,17 +46,17 @@
//// #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN // Full gradient scrolling top to bottom
//// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN // Full gradient scrolling out to in
//// #define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL // Full dual gradients scrolling out to in
//// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradent Chevron shapped scrolling left to right
//// #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON // Full gradient Chevron shaped scrolling left to right
//// #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL // Full gradient spinning pinwheel around center of keyboard
//// #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL // Full gradient spinning spiral around center of keyboard
//// #define ENABLE_RGB_MATRIX_DUAL_BEACON // Full gradient spinning around center of keyboard
//// #define ENABLE_RGB_MATRIX_RAINBOW_BEACON // Full tighter gradient spinning around center of keyboard
//// #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS // Full dual gradients spinning two halfs of keyboard
//// #define ENABLE_RGB_MATRIX_RAINDROPS // Randomly changes a single key's hue
//// #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS // Randomly changes a single key's hue and saturation
//// #define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight ammount at the same time, then shifts back
//// #define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight ammount in a wave to the right, then back to the left
//// #define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight ammount and then back down in a wave to the right
//// #define ENABLE_RGB_MATRIX_HUE_BREATHING // Hue shifts up a slight amount at the same time, then shifts back
//// #define ENABLE_RGB_MATRIX_HUE_PENDULUM // Hue shifts up a slight amount in a wave to the right, then back to the left
//// #define ENABLE_RGB_MATRIX_HUE_WAVE // Hue shifts up a slight amount and then back down in a wave to the right

#undef ENABLE_RGB_MATRIX_PIXEL_RAIN
#undef ENABLE_RGB_MATRIX_PIXEL_FLOW
Expand Down
12 changes: 7 additions & 5 deletions keyboards/idobao/id67/keymaps/vinorodrigues/keymap.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Idobao ID67 Keymap for a ID67 Bestype, built for Mac use
* IDOBAO ID67 Keymap for a ID67 Bestype, built for Mac use
* Copyright (C) 2022 Vino Rodrigues
*
* This program is free software: you can redistribute it and/or modify
Expand Down Expand Up @@ -95,6 +95,8 @@ const uint8_t g_led_config_new_flags[DRIVER_LED_TOTAL] = {
0x21, 0x01, 0x04, 0x04, 0x04, 0x04, 0x24, 0x24, 0x24, 0x24, 0x04, 0x04, 0x04, 0x04, 0x21 // 123 row
};

#define ID67_CAPS_LOCK_KEY_INDEX 36 // position of Caps Lock key

bool isRGBOff = false;
bool isCapsBlink = false;
static uint16_t recording_timer;
Expand All @@ -121,15 +123,15 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {

if (host_keyboard_led_state().caps_lock) {
if (isRGBOff) {
rgb_matrix_set_color(23, v, v, v); // white
rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, v, v, v); // white
} else {
// Caps Lock key/LED
if (timer_elapsed(recording_timer) > 500) {
isCapsBlink = !isCapsBlink;
recording_timer = timer_read();
}
if (isCapsBlink) {
rgb_matrix_set_color(23, v, v, v); // white
rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, v, v, v); // white
}

// Alpha keys/LEDs
Expand All @@ -144,15 +146,15 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
uint8_t g = 0;
uint8_t b = 0;

if ((g_led_config.flags[23] & LED_FLAG_LAYER_IND) != 0) {
if ((g_led_config.flags[ID67_CAPS_LOCK_KEY_INDEX] & LED_FLAG_LAYER_IND) != 0) {
switch (current_layer) {
case LAYER_1: b = v; break; // blue
case LAYER_2: g = v; break; // green
case LAYER_3: r = v; break; // red
}
}

rgb_matrix_set_color(23, r, g, b); // off
rgb_matrix_set_color(ID67_CAPS_LOCK_KEY_INDEX, r, g, b); // off
}

// Layer indicator stuff
Expand Down
8 changes: 4 additions & 4 deletions keyboards/idobao/id67/readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# IDOBAO ID67

![id67](https://i.imgur.com/9roQ4Mih.jpeg)
![id67](https://idobao.github.io/assets/img/idobao-id67.png)

A 65% hotswap keyboard from IDOBAO.

Expand All @@ -10,9 +10,9 @@ A 65% hotswap keyboard from IDOBAO.
* Hardware Supported: IDOBAO ID67, ID67V2, ID67 Crystal & ID67 Bestype
* Hardware Availability: IDOBAO website:
* [ID67](https://www.idobao.net/products/idobao-id67-65-hot-swappable-mechanical-keyboard-kit-1)
* [ID67V2](https://idobao.net/collections/65-layout/products/idobao-id67v2-65-hot-swappable-mechanical-keyboard-kit)
* [ID67 Crystal](https://idobao.net/collections/65-layout/products/idobao-id67-crystal-keyboard-kit-gasket-mount-version)
* [ID67 Bestype](https://idobao.net/collections/65-layout/products/idobao-id67-bestype-keyboard-kit-aluminum-with-brass-weight)
* [ID67V2](https://idobao.net/products/idobao-id67v2-65-hot-swappable-mechanical-keyboard-kit)
* [ID67 Crystal](https://idobao.net/products/idobao-id67-crystal-keyboard-kit-gasket-mount-version)
* [ID67 Bestype](https://idobao.net/products/idobao-id67-bestype-keyboard-kit-aluminum-with-brass-weight)

## Layout

Expand Down

0 comments on commit 5f739a0

Please sign in to comment.