Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60eae7335b | ||
|
|
af89752bff | ||
|
|
c7f8548d9a | ||
|
|
12e6d41202 | ||
|
|
2d5c16dfd4 | ||
|
|
3b13259942 | ||
|
|
97b8567a1f | ||
|
|
f3d5b1091d | ||
|
|
7a751f1141 | ||
|
|
e83e316555 |
No files matched your search
+22
-14
@@ -124,21 +124,25 @@ Configure the hardware via your `config.h`:
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
From this point forward the configuration is the same for all the drivers. The struct rgb_led array tells the system for each led, what key electrical matrix it represents, what the physical position is on the board, and if the led is for a modifier key or not. Here is a brief example:
|
From this point forward the configuration is the same for all the drivers. The `led_config_t` struct provides a key electrical matrix to led index lookup table, what the physical position of each LED is on the board, and what type of key or usage the LED if the LED represents. Here is a brief example:
|
||||||
|
|
||||||
```C
|
```C
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
const led_config_t g_led_config = { {
|
||||||
/* {row | col << 4}
|
// Key Matrix to LED Index
|
||||||
* | {x=0..224, y=0..64}
|
{ 5, NO_LED, NO_LED, 0 },
|
||||||
* | | flags
|
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
* | | | */
|
{ 4, NO_LED, NO_LED, 1 },
|
||||||
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
|
{ 3, NO_LED, NO_LED, 2 }
|
||||||
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
|
}, {
|
||||||
....
|
// LED Index to Physical Position
|
||||||
}
|
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||||
|
}, {
|
||||||
|
// LED Index to Flag
|
||||||
|
1, 4, 4, 4, 4, 1
|
||||||
|
} };
|
||||||
```
|
```
|
||||||
|
|
||||||
The first part, `{row | col << 4}`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `{x=0..224, y=0..64}` represents the LED's physical position on the keyboard. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64 as the effects are based on this range. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
|
The first part, `// Key Matrix to LED Index`, tells the system what key this LED represents by using the key's electrical matrix row & col. The second part, `// LED Index to Physical Position` represents the LED's physical position on the keyboard. The first value, `x`, is between 0-224 (inclusive), and the second value, `y`, is between 0-64 (inclusive). This range is due to effect that calculate the center or halves for their animations. The easiest way to calculate these positions is imagine your keyboard is a grid, and the top left of the keyboard represents x, y coordinate 0, 0 and the bottom right of your keyboard represents 224, 64. Using this as a basis, you can use the following formula to calculate the physical position:
|
||||||
|
|
||||||
```C
|
```C
|
||||||
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION
|
||||||
@@ -147,7 +151,7 @@ y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION
|
|||||||
|
|
||||||
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based on the physical layout of your keyboard, not the electrical layout.
|
||||||
|
|
||||||
`flags` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
`// LED Index to Flag` is a bitmask, whether or not a certain LEDs is of a certain type. It is recommended that LEDs are set to only 1 type.
|
||||||
|
|
||||||
## Flags
|
## Flags
|
||||||
|
|
||||||
@@ -155,8 +159,8 @@ Where NUMBER_OF_COLS, NUMBER_OF_ROWS, COL_POSITION, & ROW_POSITION are all based
|
|||||||
|------------------------------------|-------------------------------------------|
|
|------------------------------------|-------------------------------------------|
|
||||||
|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
|
|`#define HAS_FLAGS(bits, flags)` |Returns true if `bits` has all `flags` set.|
|
||||||
|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
|
|`#define HAS_ANY_FLAGS(bits, flags)`|Returns true if `bits` has any `flags` set.|
|
||||||
|`#define LED_FLAG_NONE 0x00` |If thes LED has no flags. |
|
|`#define LED_FLAG_NONE 0x00` |If this LED has no flags. |
|
||||||
|`#define LED_FLAG_ALL 0xFF` |If thes LED has all flags. |
|
|`#define LED_FLAG_ALL 0xFF` |If this LED has all flags. |
|
||||||
|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
|
|`#define LED_FLAG_MODIFIER 0x01` |If the Key for this LED is a modifier. |
|
||||||
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|
|`#define LED_FLAG_UNDERGLOW 0x02` |If the LED is for underglow. |
|
||||||
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
|
|`#define LED_FLAG_KEYLIGHT 0x04` |If the LED is for key backlight. |
|
||||||
@@ -197,7 +201,10 @@ enum rgb_matrix_effects {
|
|||||||
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
RGB_MATRIX_RAINBOW_PINWHEELS, // Full dual gradients spinning two halfs of keyboard
|
||||||
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
|
RGB_MATRIX_RAINDROPS, // Randomly changes a single key's hue
|
||||||
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
RGB_MATRIX_JELLYBEAN_RAINDROPS, // Randomly changes a single key's hue and saturation
|
||||||
|
#if define(RGB_MATRIX_FRAMEBUFFER_EFFECTS)
|
||||||
|
RGB_MATRIX_TYPING_HEATMAP, // How hot is your WPM!
|
||||||
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
RGB_MATRIX_DIGITAL_RAIN, // That famous computer simulation
|
||||||
|
#endif
|
||||||
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
|
#if defined(RGB_MATRIX_KEYPRESSES) || defined(RGB_MATRIX_KEYRELEASES)
|
||||||
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
|
RGB_MATRIX_SOLID_REACTIVE_SIMPLE, // Pulses keys hit to hue & value then fades value out
|
||||||
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
|
RGB_MATRIX_SOLID_REACTIVE, // Static single hue, pulses keys hit to shifted hue then fades to current hue
|
||||||
@@ -233,6 +240,7 @@ You can disable a single effect by defining `DISABLE_[EFFECT_NAME]` in your `con
|
|||||||
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
|`#define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS` |Disables `RGB_MATRIX_RAINBOW_PINWHEELS` |
|
||||||
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
|`#define DISABLE_RGB_MATRIX_RAINDROPS` |Disables `RGB_MATRIX_RAINDROPS` |
|
||||||
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
|`#define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS` |Disables `RGB_MATRIX_JELLYBEAN_RAINDROPS` |
|
||||||
|
|`#define DISABLE_RGB_MATRIX_TYPING_HEATMAP` |Disables `RGB_MATRIX_TYPING_HEATMAP` |
|
||||||
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
|`#define DISABLE_RGB_MATRIX_DIGITAL_RAIN` |Disables `RGB_MATRIX_DIGITAL_RAIN` |
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE` |Disables `RGB_MATRIX_SOLID_REACTIVE` |
|
||||||
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
|`#define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |Disables `RGB_MATRIX_SOLID_REACTIVE_SIMPLE` |
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
/*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
enum layer {
|
||||||
|
_BASE,
|
||||||
|
_FN,
|
||||||
|
_BACKLIT
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define FN MO(_FN)
|
||||||
|
#define BACKLIT MO(_BACKLIT)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
|
/* BASE
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | + | \ |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | BACKSP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | LCTRL | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | HOME |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | FN | END |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | LALT | LGUI | SPACE | RGUI | RALT | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_BASE] = LAYOUT_ortho_7u(
|
||||||
|
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_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_LCTL, 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_HOME,
|
||||||
|
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, FN, KC_END,
|
||||||
|
KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT
|
||||||
|
),
|
||||||
|
|
||||||
|
/* FUNCTION
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ` |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | | | | | | | | | | UP | | | DEL |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | | VOLD | VOLU | MUTE | | | | | | | LEFT | RIGHT | | PG_UP |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | | | DOWN | | | PG_DN |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_FN] = LAYOUT_ortho_7u(
|
||||||
|
_______, 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_GRV,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, KC_DEL,
|
||||||
|
_______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, KC_PGUP,
|
||||||
|
BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, KC_PGDN,
|
||||||
|
_______, _______, _______, _______, _______
|
||||||
|
),
|
||||||
|
|
||||||
|
/* BACKLIT
|
||||||
|
* .-----------------------------------------------------------------------------------------------------------------------------.
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------|
|
||||||
|
* | | RGBTOG | RGBMOD | RGBHUI | RGBHUD | RGBSAI | RGBSAD | RGBVAI | RGBVAD | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------|
|
||||||
|
* | | | | | | | | | | | | | | |
|
||||||
|
* |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+-----------------+--------+--------|
|
||||||
|
* | | | | | | | |
|
||||||
|
* '-----------------------------------------------------------------------------------------------------------------------------'
|
||||||
|
*/
|
||||||
|
|
||||||
|
[_BACKLIT] = LAYOUT_ortho_7u(
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
|
_______, _______, _______, _______, _______
|
||||||
|
)
|
||||||
|
};
|
||||||
@@ -19,20 +19,18 @@
|
|||||||
#include "haptic.h"
|
#include "haptic.h"
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#include "rgblight.h"
|
#include "rgb_matrix.h"
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
/*{row | col << 4}
|
{ 5, NO_LED, NO_LED, 0 },
|
||||||
| {x=0..224, y=0..64}
|
{ NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
| | modifier
|
{ 4, NO_LED, NO_LED, 1 },
|
||||||
| | | */
|
{ 3, NO_LED, NO_LED, 2 }
|
||||||
{{1|(3<<4)}, {188, 16}, 4},
|
}, {
|
||||||
{{3|(3<<4)}, {187, 48}, 4},
|
{ 188, 16 }, { 187, 48 }, { 149, 64 }, { 112, 64 }, { 37, 48 }, { 38, 16 }
|
||||||
{{4|(2<<4)}, {149, 64}, 4},
|
}, {
|
||||||
{{4|(1<<4)}, {112, 64}, 4},
|
4, 4, 4, 4, 4, 4
|
||||||
{{3|(0<<4)}, {37, 48}, 4},
|
} };
|
||||||
{{1|(0<<4)}, {38, 16}, 4}
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint8_t *o_fb;
|
uint8_t *o_fb;
|
||||||
@@ -48,12 +46,12 @@ uint16_t counterst = 0;
|
|||||||
#define ScreenOffInterval 60000 /* milliseconds */
|
#define ScreenOffInterval 60000 /* milliseconds */
|
||||||
static uint16_t last_flush;
|
static uint16_t last_flush;
|
||||||
|
|
||||||
volatile uint8_t led_numlock = false;
|
volatile uint8_t led_numlock = false;
|
||||||
volatile uint8_t led_capslock = false;
|
volatile uint8_t led_capslock = false;
|
||||||
volatile uint8_t led_scrolllock = false;
|
volatile uint8_t led_scrolllock = false;
|
||||||
|
|
||||||
static uint8_t layer;
|
static uint8_t layer;
|
||||||
static bool queue_for_send = false;
|
static bool queue_for_send = false;
|
||||||
static uint8_t encoder_value = 32;
|
static uint8_t encoder_value = 32;
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
@@ -64,13 +62,13 @@ void draw_ui(void) {
|
|||||||
|
|
||||||
/* Boston MK title is 55 x 10 pixels */
|
/* Boston MK title is 55 x 10 pixels */
|
||||||
#define NAME_X 0
|
#define NAME_X 0
|
||||||
#define NAME_Y 0
|
#define NAME_Y 0
|
||||||
|
|
||||||
draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);
|
draw_string(NAME_X + 1, NAME_Y + 2, "BOSTON MK", PIXEL_ON, NORM, 0);
|
||||||
|
|
||||||
/* Layer indicator is 41 x 10 pixels */
|
/* Layer indicator is 41 x 10 pixels */
|
||||||
#define LAYER_INDICATOR_X 60
|
#define LAYER_INDICATOR_X 60
|
||||||
#define LAYER_INDICATOR_Y 0
|
#define LAYER_INDICATOR_Y 0
|
||||||
|
|
||||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||||
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
||||||
@@ -88,7 +86,7 @@ void draw_ui(void) {
|
|||||||
draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
draw_pixel(MATRIX_DISPLAY_X + y + y + 3, MATRIX_DISPLAY_Y + x + x + 3,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
|
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 12, 12, PIXEL_ON, NORM);
|
||||||
/* hadron oled location on thumbnail */
|
/* hadron oled location on thumbnail */
|
||||||
draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM);
|
draw_rect_filled_soft(MATRIX_DISPLAY_X + 5, MATRIX_DISPLAY_Y + 2, 6, 2, PIXEL_ON, NORM);
|
||||||
@@ -195,7 +193,7 @@ void matrix_init_kb(void) {
|
|||||||
queue_for_send = true;
|
queue_for_send = true;
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
void matrix_scan_kb(void) {
|
||||||
if (queue_for_send) {
|
if (queue_for_send) {
|
||||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// #define MASTER_RIGHT
|
// #define MASTER_RIGHT
|
||||||
#define EE_HANDS
|
#define EE_HANDS
|
||||||
|
|
||||||
// #define SSD1306OLED
|
#undef USE_I2C
|
||||||
|
#undef SSD1306OLED
|
||||||
|
|
||||||
#define USE_SERIAL_PD2
|
#define USE_SERIAL_PD2
|
||||||
|
|
||||||
@@ -35,17 +36,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
// #define TAPPING_TERM 100
|
// #define TAPPING_TERM 100
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 27
|
# define RGBLED_NUM 27
|
||||||
|
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
# define RGBLIGHT_HUE_STEP 8
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
# define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
# define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_LIMIT_VAL 100
|
# define RGBLIGHT_LIMIT_VAL 100
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses
|
||||||
|
# define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended
|
||||||
|
|
||||||
|
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||||
|
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||||
|
// #define DISABLE_RGB_MATRIX_RAINDROPS
|
||||||
|
// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
|
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_SPLASH
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define B6_AUDIO
|
# define B6_AUDIO
|
||||||
// #define NO_MUSIC_MODE
|
// #define NO_MUSIC_MODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "drashna.h"
|
#include "drashna.h"
|
||||||
#ifdef PROTOCOL_LUFA
|
|
||||||
#include "lufa.h"
|
|
||||||
#include "split_util.h"
|
|
||||||
#endif
|
|
||||||
#ifdef SSD1306OLED
|
|
||||||
#include "ssd1306.h"
|
|
||||||
#endif
|
|
||||||
#ifdef OLED_DRIVER_ENABLE
|
|
||||||
#include "oled_driver.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
extern uint8_t is_master;
|
extern uint8_t is_master;
|
||||||
@@ -20,7 +10,7 @@ extern rgblight_config_t rgblight_config;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum crkbd_keycodes {
|
enum crkbd_keycodes {
|
||||||
RGBRST = NEW_SAFE_RANGE
|
RGBRST = NEW_SAFE_RANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
#define LAYOUT_crkbd_base( \
|
#define LAYOUT_crkbd_base( \
|
||||||
@@ -31,7 +21,7 @@ enum crkbd_keycodes {
|
|||||||
LAYOUT_wrapper( \
|
LAYOUT_wrapper( \
|
||||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_MINS, \
|
||||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
KC_TAB, ALT_T(K11), K12, K13, K14, K15, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
||||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||||
)
|
)
|
||||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||||
@@ -115,35 +105,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
void matrix_init_keymap(void) {
|
||||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
#ifndef CONVERT_TO_PROTON_C
|
||||||
#ifdef SSD1306OLED
|
|
||||||
iota_gfx_init(!has_usb()); // turns on the display
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef CONVERT_TO_PROTON_C
|
|
||||||
setPinOutput(D5);
|
setPinOutput(D5);
|
||||||
writePinHigh(D5);
|
writePinHigh(D5);
|
||||||
|
|
||||||
setPinOutput(B0);
|
setPinOutput(B0);
|
||||||
writePinHigh(B0);
|
writePinHigh(B0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h
|
|
||||||
#ifdef SSD1306OLED
|
|
||||||
|
|
||||||
// When add source files to SRC in rules.mk, you can use functions.
|
#ifdef OLED_DRIVER_ENABLE
|
||||||
const char *read_logo(void);
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
char layer_state_str[24];
|
if (is_master) {
|
||||||
char modifier_state_str[24];
|
return OLED_ROTATION_270;
|
||||||
char host_led_state_str[24];
|
} else {
|
||||||
char keylog_str[24] = {};
|
return rotation;
|
||||||
char keylogs_str[21] = {};
|
}
|
||||||
int keylogs_str_idx = 0;
|
}
|
||||||
|
|
||||||
// const char *read_mode_icon(bool swap);
|
void render_crkbd_logo(void) {
|
||||||
// void set_timelog(void);
|
static const char PROGMEM crkbd_logo[] = {
|
||||||
// const char *read_timelog(void);
|
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||||
|
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
||||||
|
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
||||||
|
0};
|
||||||
|
oled_write_P(crkbd_logo, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
#define KEYLOG_LEN (int)(32 / OLED_FONT_WIDTH)
|
||||||
|
char keylog_str[KEYLOG_LEN] = {};
|
||||||
|
uint8_t keylogs_str_idx = 0;
|
||||||
|
uint16_t log_timer = 0;
|
||||||
|
|
||||||
const char code_to_name[60] = {
|
const char code_to_name[60] = {
|
||||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||||
@@ -153,261 +146,124 @@ const char code_to_name[60] = {
|
|||||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||||
|
|
||||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
void add_keylog(uint16_t keycode) {
|
||||||
char name = ' ';
|
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
|
||||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||||
if (keycode < 60) {
|
|
||||||
name = code_to_name[keycode];
|
|
||||||
}
|
|
||||||
// update keylog
|
|
||||||
snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c",
|
|
||||||
record->event.key.row, record->event.key.col,
|
|
||||||
keycode, name);
|
|
||||||
|
|
||||||
// update keylogs
|
for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
|
||||||
if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
|
keylog_str[i] = keylog_str[i - 1];
|
||||||
keylogs_str_idx = 0;
|
|
||||||
for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
|
|
||||||
keylogs_str[i] = ' ';
|
|
||||||
}
|
}
|
||||||
}
|
if (keycode < 60) {
|
||||||
|
keylog_str[0] = code_to_name[keycode];
|
||||||
keylogs_str[keylogs_str_idx] = name;
|
}
|
||||||
keylogs_str_idx++;
|
log_timer = timer_read();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *read_keylog(void) {
|
void update_log(void) {
|
||||||
return keylog_str;
|
if (timer_elapsed(log_timer) > 750) {
|
||||||
|
add_keylog(0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *read_keylogs(void) {
|
|
||||||
return keylogs_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
const char* read_modifier_state(void) {
|
|
||||||
uint8_t modifiers = get_mods();
|
|
||||||
uint8_t one_shot = get_oneshot_mods();
|
|
||||||
|
|
||||||
snprintf(modifier_state_str, sizeof(modifier_state_str), "Mods:%s %s %s %s",
|
|
||||||
(modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL) ? "CTL" : " ",
|
|
||||||
(modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI) ? "GUI" : " ",
|
|
||||||
(modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT) ? "ALT" : " ",
|
|
||||||
(modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? "SFT" : " "
|
|
||||||
);
|
|
||||||
|
|
||||||
return modifier_state_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *read_host_led_state(void) {
|
|
||||||
uint8_t leds = host_keyboard_leds();
|
|
||||||
|
|
||||||
snprintf(host_led_state_str, sizeof(host_led_state_str), "NL:%s CL:%s SL:%s",
|
|
||||||
(leds & (1 << USB_LED_NUM_LOCK)) ? "on" : "- ",
|
|
||||||
(leds & (1 << USB_LED_CAPS_LOCK)) ? "on" : "- ",
|
|
||||||
(leds & (1 << USB_LED_SCROLL_LOCK)) ? "on" : "- "
|
|
||||||
);
|
|
||||||
|
|
||||||
return host_led_state_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char* read_layer_state(void) {
|
|
||||||
switch (biton32(layer_state)) {
|
|
||||||
case _RAISE:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise ");
|
|
||||||
break;
|
|
||||||
case _LOWER:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower ");
|
|
||||||
break;
|
|
||||||
case _ADJUST:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust ");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
switch (biton32(default_layer_state)) {
|
|
||||||
case _QWERTY:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Qwerty ");
|
|
||||||
break;
|
|
||||||
case _COLEMAK:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Colemak");
|
|
||||||
break;
|
|
||||||
case _DVORAK:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Dvorak ");
|
|
||||||
break;
|
|
||||||
case _WORKMAN:
|
|
||||||
snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Workman");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return layer_state_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_keymap(void) {
|
|
||||||
iota_gfx_task();
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_render_user(struct CharacterMatrix *matrix) {
|
|
||||||
if (is_master) {
|
|
||||||
//If you want to change the display of OLED, you need to change here
|
|
||||||
matrix_write_ln(matrix, read_layer_state());
|
|
||||||
matrix_write_ln(matrix, read_modifier_state());
|
|
||||||
// matrix_write_ln(matrix, read_keylog());
|
|
||||||
matrix_write_ln(matrix, read_keylogs());
|
|
||||||
// matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui));
|
|
||||||
// matrix_write(matrix, read_host_led_state());
|
|
||||||
//matrix_write_ln(matrix, read_timelog());
|
|
||||||
} else {
|
|
||||||
matrix_write(matrix, read_logo());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
|
||||||
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
|
||||||
memcpy(dest->display, source->display, sizeof(dest->display));
|
|
||||||
dest->dirty = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void iota_gfx_task_user(void) {
|
|
||||||
struct CharacterMatrix matrix;
|
|
||||||
matrix_clear(&matrix);
|
|
||||||
matrix_render_user(&matrix);
|
|
||||||
matrix_update(&display, &matrix);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
if (record->event.pressed) { add_keylog(keycode); }
|
||||||
case KC_A ... KC_SLASH:
|
return true;
|
||||||
case KC_F1 ... KC_F12:
|
|
||||||
case KC_INSERT ... KC_UP:
|
|
||||||
case KC_KP_SLASH ... KC_KP_DOT:
|
|
||||||
case KC_F13 ... KC_F24:
|
|
||||||
if (record->event.pressed) { set_keylog(keycode, record); }
|
|
||||||
break;
|
|
||||||
// set_timelog();
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef OLED_DRIVER_ENABLE
|
|
||||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
|
||||||
if (is_master) {
|
|
||||||
return OLED_ROTATION_270;
|
|
||||||
} else {
|
|
||||||
return rotation;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void render_crkbd_logo(void) {
|
|
||||||
static const char PROGMEM crkbd_logo[] = {
|
|
||||||
0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94,
|
|
||||||
0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4,
|
|
||||||
0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
|
|
||||||
0};
|
|
||||||
oled_write_P(crkbd_logo, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void render_status(void) {
|
void render_status(void) {
|
||||||
|
|
||||||
oled_write_P(PSTR("Layer"), false);
|
oled_write_P(PSTR("Layer"), false);
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
case 0:
|
case 0:
|
||||||
oled_write_P(PSTR("Base "), false);
|
oled_write_P(PSTR("Base "), false);
|
||||||
break;
|
break;
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
oled_write_P(PSTR("Raise"), false);
|
oled_write_P(PSTR("Raise"), false);
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
oled_write_P(PSTR("Lower"), false);
|
oled_write_P(PSTR("Lower"), false);
|
||||||
break;
|
break;
|
||||||
case _ADJUST:
|
case _ADJUST:
|
||||||
oled_write_P(PSTR("Adjst"), false);
|
oled_write_P(PSTR("Adjst"), false);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
oled_write_P(PSTR("Unkn "), false);
|
oled_write_P(PSTR("Unkn "), false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
oled_write_P(PSTR("Lyout"), false);
|
oled_write_P(PSTR("Lyout"), false);
|
||||||
switch (biton32(default_layer_state)) {
|
switch (biton32(default_layer_state)) {
|
||||||
case _QWERTY:
|
case _QWERTY:
|
||||||
oled_write_P(PSTR("QWRTY"), false);
|
oled_write_P(PSTR("QWRTY"), false);
|
||||||
break;
|
break;
|
||||||
case _COLEMAK:
|
case _COLEMAK:
|
||||||
oled_write_P(PSTR("COLMK"), false);
|
oled_write_P(PSTR("COLMK"), false);
|
||||||
break;
|
break;
|
||||||
case _DVORAK:
|
case _DVORAK:
|
||||||
oled_write_P(PSTR("DVRAK"), false);
|
oled_write_P(PSTR("DVRAK"), false);
|
||||||
break;
|
break;
|
||||||
case _WORKMAN:
|
case _WORKMAN:
|
||||||
oled_write_P(PSTR("WRKMN"), false);
|
oled_write_P(PSTR("WRKMN"), false);
|
||||||
break;
|
break;
|
||||||
case _NORMAN:
|
case _NORMAN:
|
||||||
oled_write_P(PSTR("NORMN"), false);
|
oled_write_P(PSTR("NORMN"), false);
|
||||||
break;
|
break;
|
||||||
case _MALTRON:
|
case _MALTRON:
|
||||||
oled_write_P(PSTR("MLTRN"), false);
|
oled_write_P(PSTR("MLTRN"), false);
|
||||||
break;
|
break;
|
||||||
case _EUCALYN:
|
case _EUCALYN:
|
||||||
oled_write_P(PSTR("ECLYN"), false);
|
oled_write_P(PSTR("ECLYN"), false);
|
||||||
break;
|
break;
|
||||||
case _CARPLAX:
|
case _CARPLAX:
|
||||||
oled_write_P(PSTR("CRPLX"), false);
|
oled_write_P(PSTR("CRPLX"), false);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t modifiers = get_mods();
|
uint8_t modifiers = get_mods();
|
||||||
uint8_t one_shot = get_oneshot_mods();
|
uint8_t one_shot = get_oneshot_mods();
|
||||||
|
|
||||||
oled_write_P(PSTR("Mods:"), false);
|
oled_write_P(PSTR("Mods:"), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
|
oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
|
oled_write_P( (modifiers & MOD_MASK_CTRL || one_shot & MOD_MASK_CTRL ) ? PSTR(" CTL ") : PSTR(" "), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
|
oled_write_P( (modifiers & MOD_MASK_ALT || one_shot & MOD_MASK_ALT ) ? PSTR(" ALT ") : PSTR(" "), false);
|
||||||
oled_write_P( (modifiers & MOD_MASK_SHIFT || one_shot & MOD_MASK_SHIFT) ? PSTR(" SFT ") : PSTR(" "), false);
|
oled_write_P( (modifiers & MOD_MASK_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), false);
|
||||||
|
|
||||||
|
|
||||||
oled_write_P(PSTR("BTMGK"), false);
|
oled_write_P(PSTR("BTMGK"), false);
|
||||||
static const char PROGMEM mode_logo[4][4] = {
|
|
||||||
{0x95,0x96,0x0a,0},
|
|
||||||
{0xb5,0xb6,0x0a,0},
|
|
||||||
{0x97,0x98,0x0a,0},
|
|
||||||
{0xb7,0xb8,0x0a,0} };
|
|
||||||
|
|
||||||
if (keymap_config.swap_lalt_lgui != false) {
|
if (keymap_config.swap_lalt_lgui) {
|
||||||
oled_write_P(mode_logo[0], false);
|
oled_write_P(PSTR(" Mac "), false);
|
||||||
oled_write_P(mode_logo[1], false);
|
} else {
|
||||||
} else {
|
oled_write_P(PSTR(" Win "), false);
|
||||||
oled_write_P(mode_logo[2], false);
|
}
|
||||||
oled_write_P(mode_logo[3], false);
|
|
||||||
}
|
|
||||||
|
|
||||||
uint8_t led_usb_state = host_keyboard_leds();
|
uint8_t led_usb_state = host_keyboard_leds();
|
||||||
oled_write_P(PSTR("Lock:"), false);
|
oled_write_P(PSTR("Lock:"), false);
|
||||||
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
oled_write_P(led_usb_state & (1<<USB_LED_NUM_LOCK) ? PSTR(" NUM ") : PSTR(" "), false);
|
||||||
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
oled_write_P(led_usb_state & (1<<USB_LED_CAPS_LOCK) ? PSTR(" CAPS") : PSTR(" "), false);
|
||||||
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
oled_write_P(led_usb_state & (1<<USB_LED_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
||||||
|
|
||||||
|
oled_write(keylog_str, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void oled_task_user(void) {
|
void oled_task_user(void) {
|
||||||
if (is_master) {
|
if (is_master) {
|
||||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||||
} else {
|
} else {
|
||||||
render_crkbd_logo();
|
render_crkbd_logo();
|
||||||
oled_scroll_left(); // Turns on scrolling
|
oled_scroll_left(); // Turns on scrolling
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void matrix_scan_keymap(void) { update_log(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint16_t get_tapping_term(uint16_t keycode) {
|
uint16_t get_tapping_term(uint16_t keycode) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case ALT_T(KC_A):
|
case ALT_T(KC_A):
|
||||||
return TAPPING_TERM + 100;
|
return TAPPING_TERM + 100;
|
||||||
default:
|
default:
|
||||||
return TAPPING_TERM;
|
return TAPPING_TERM;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,9 +14,10 @@ MIDI_ENABLE = no # MIDI controls
|
|||||||
AUDIO_ENABLE = no # Audio output on port C6
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
UNICODE_ENABLE = no # Unicode
|
UNICODE_ENABLE = no # Unicode
|
||||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||||
|
RGB_MATRIX_ENABLE = WS2812
|
||||||
|
|
||||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
@@ -24,3 +25,7 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
|||||||
BOOTLOADER = qmk-dfu
|
BOOTLOADER = qmk-dfu
|
||||||
|
|
||||||
OLED_DRIVER_ENABLE = yes
|
OLED_DRIVER_ENABLE = yes
|
||||||
|
|
||||||
|
ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
||||||
|
RGB_MATRIX_SPLIT_RIGHT=yes
|
||||||
|
endif
|
||||||
@@ -11,11 +11,6 @@
|
|||||||
|
|
||||||
extern keymap_config_t keymap_config;
|
extern keymap_config_t keymap_config;
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
|
||||||
//Following line allows macro to read current RGB settings
|
|
||||||
extern rgblight_config_t rgblight_config;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
extern uint8_t is_master;
|
extern uint8_t is_master;
|
||||||
|
|
||||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||||
@@ -241,6 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||||||
void matrix_init_user(void) {
|
void matrix_init_user(void) {
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
RGB_current_mode = rgblight_config.mode;
|
RGB_current_mode = rgblight_config.mode;
|
||||||
|
UPDATE_KEYMAP_STATUS();
|
||||||
#endif
|
#endif
|
||||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||||
#ifdef SSD1306OLED
|
#ifdef SSD1306OLED
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
This is the c configuration file for the keymap
|
||||||
|
|
||||||
|
Copyright 2012 Jun Wako <[email protected]>
|
||||||
|
Copyright 2015 Jack Humbert
|
||||||
|
|
||||||
|
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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
//#define USE_MATRIX_I2C
|
||||||
|
|
||||||
|
/* Select hand configuration */
|
||||||
|
|
||||||
|
#define MASTER_LEFT
|
||||||
|
// #define MASTER_RIGHT
|
||||||
|
// #define EE_HANDS
|
||||||
|
|
||||||
|
#define SSD1306OLED
|
||||||
|
|
||||||
|
#define USE_SERIAL_PD2
|
||||||
|
|
||||||
|
#define TAPPING_FORCE_HOLD
|
||||||
|
#define TAPPING_TERM 300
|
||||||
|
|
||||||
|
#undef RGBLED_NUM
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
#define RGBLED_NUM 27
|
||||||
|
#define RGBLIGHT_LIMIT_VAL 120
|
||||||
|
#define RGBLIGHT_HUE_STEP 10
|
||||||
|
#define RGBLIGHT_SAT_STEP 17
|
||||||
|
#define RGBLIGHT_VAL_STEP 17
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rs.h"
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||||
|
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||||
|
LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,ENTS,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
LALT,LGUI,SPC , BSPC,CODE,FN
|
||||||
|
// `----+----+----' `+---+----+----'c
|
||||||
|
),
|
||||||
|
[_CODE] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||||
|
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||||
|
, 6 , 7 , 8 , 9 , 0 , AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
, ,DOT , , ,
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
LTOG,LHUI,LSAI,LVAI,LRST,BRMU, VOLU, ,PGUP, , , ,
|
||||||
|
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
|
||||||
|
LMOD,LHUD,LSAD,LVAD,RST ,BRMD, VOLD,CTRA,PGDN,CTRE, , ,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
, , , MUTE, ,
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
#ifdef SSD1306OLED
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "ssd1306.h"
|
||||||
|
#ifdef PROTOCOL_LUFA
|
||||||
|
#include "lufa.h"
|
||||||
|
#include "split_util.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
extern uint8_t is_master;
|
||||||
|
|
||||||
|
// When add source files to SRC in rules.mk, you can use functions.
|
||||||
|
const char *read_logo(void);
|
||||||
|
const char *read_keylog(void);
|
||||||
|
const char *read_keylogs(void);
|
||||||
|
void set_keylog(uint16_t keycode, keyrecord_t *record);
|
||||||
|
|
||||||
|
void matrix_scan_user(void) { iota_gfx_task(); }
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint8_t state;
|
||||||
|
char name[8];
|
||||||
|
} LAYER_DISPLAY_NAME;
|
||||||
|
|
||||||
|
#define LAYER_DISPLAY_MAX 5
|
||||||
|
const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
|
||||||
|
{0, "Base"},
|
||||||
|
{2, "Code"},
|
||||||
|
{4, "Fn"},
|
||||||
|
{6, "Fn+Code"},
|
||||||
|
{__UINT8_MAX__, "?"},
|
||||||
|
};
|
||||||
|
static uint8_t layer_name_idx;
|
||||||
|
static char layer_status_buf[24] = "Layer: Base\n";
|
||||||
|
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
// Following line allows macro to read current RGB settings
|
||||||
|
extern rgblight_config_t rgblight_config;
|
||||||
|
void update_keymap_status(void) {
|
||||||
|
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s RGB: %d\n",
|
||||||
|
layer_display_name[layer_name_idx].name, rgblight_config.mode);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void update_keymap_status(void) {
|
||||||
|
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s\n",
|
||||||
|
layer_display_name[layer_name_idx].name);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_user(void) {
|
||||||
|
iota_gfx_init(!has_usb()); // turns on the display
|
||||||
|
update_keymap_status();
|
||||||
|
}
|
||||||
|
|
||||||
|
// declared in users/rs/rs.c
|
||||||
|
void rgb_mod_changed_keymap(void) {
|
||||||
|
update_keymap_status();
|
||||||
|
}
|
||||||
|
|
||||||
|
// declared in users/rs/rs.c
|
||||||
|
void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
set_keylog(keycode, record);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
for (layer_name_idx = 0; layer_name_idx < LAYER_DISPLAY_MAX; ++layer_name_idx) {
|
||||||
|
if (state == 0 && layer_display_name[layer_name_idx].state == default_layer_state) {
|
||||||
|
break;
|
||||||
|
} else if (state != 0 && layer_display_name[layer_name_idx].state == state) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
update_keymap_status();
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void render_keymap_status(struct CharacterMatrix *matrix) {
|
||||||
|
matrix_write(matrix, layer_status_buf);
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_render_user(struct CharacterMatrix *matrix) {
|
||||||
|
if (is_master) {
|
||||||
|
render_keymap_status(matrix);
|
||||||
|
matrix_write_ln(matrix, read_keylog());
|
||||||
|
matrix_write_ln(matrix, read_keylogs());
|
||||||
|
} else {
|
||||||
|
matrix_write(matrix, read_logo());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
|
||||||
|
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
|
||||||
|
memcpy(dest->display, source->display, sizeof(dest->display));
|
||||||
|
dest->dirty = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void iota_gfx_task_user(void) {
|
||||||
|
struct CharacterMatrix matrix;
|
||||||
|
matrix_clear(&matrix);
|
||||||
|
matrix_render_user(&matrix);
|
||||||
|
matrix_update(&display, &matrix);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# RS40: Code Friendly 40% Keymap
|
||||||
|
|
||||||
|
This keymap is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one.
|
||||||
|
|
||||||
|
Because I sometime have to use my internal keyboard I my macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc.
|
||||||
|
|
||||||
|
See [rs readme](../../../../users/rs/readme.md) for a list of other keyboards supported by this keymap.
|
||||||
|
|
||||||
|
## Base Layer
|
||||||
|
|
||||||
|
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=E&_x:8%3B&=I%3B&@_y:-0.87&x:2%3B&=W&_x:1%3B&=R&_x:6%3B&=U&_x:1%3B&=O%3B&@_y:-0.8799999999999999&x:5%3B&=T&_x:4%3B&=Y%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=Q&_x:12%3B&=P&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=D&_x:8%3B&=K%3B&@_y:-0.8700000000000001&x:2%3B&=S&_x:1%3B&=F&_x:6%3B&=J&_x:1%3B&=L%3B&@_y:-0.8799999999999999&x:5%3B&=G&_x:4%3B&=H%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465&a:5%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=A&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%22%0A'%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=C&_x:8&a:5%3B&=%3C%0A,%3B&@_y:-0.8700000000000001&x:2&a:7%3B&=X&_x:1%3B&=V&_x:6%3B&=M&_x:1&a:5%3B&=%3E%0A.%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=B&_x:4%3B&=N%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=Z&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=Space%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||||
|
|
||||||
|
## Code Layer
|
||||||
|
|
||||||
|
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=%23&_x:8%3B&=*%3B&@_y:-0.87&x:2%3B&=%2F@&_x:1%3B&=$&_x:6&a:5%3B&=%3C%0A(&_x:1%3B&=%3E%0A)%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=%25&_x:4%3B&=%5E%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=!&_x:12%3B&=!%2F=&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=3&_x:8%3B&=↑%3B&@_y:-0.8700000000000001&x:2%3B&=2&_x:1%3B&=4&_x:6&a:5%3B&=%7B%0A%5B&_x:1%3B&=%7D%0A%5D%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=5&_x:4&a:5%3B&=%2F_%0A-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=1&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%7C%0A%5C%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=8&_x:8%3B&=↓%3B&@_y:-0.8700000000000001&x:2%3B&=7&_x:1%3B&=9&_x:6%3B&=←&_x:1%3B&=→%3B&@_y:-0.8799999999999999&x:5%3B&=0&_x:4%3B&=%2F&%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=6&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=.%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||||
|
|
||||||
|
## Fn Layer
|
||||||
|
|
||||||
|
[](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=F3&_x:8%3B&=F8%3B&@_y:-0.87&x:2%3B&=F2&_x:1%3B&=F4&_x:6%3B&=F7&_x:1%3B&=F9%3B&@_y:-0.8799999999999999&x:5%3B&=F5&_x:4%3B&=F6%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=&_c=%236750f2&t=%2344b8b8%3B&=F1&_x:12%3B&=F10&_c=%233a1ee6&t=%23b84465%3B&=F11%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value+&_x:8%3B&=Page%20Up%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat+&_x:1%3B&=RGB%20Reset&_x:6%3B&=&_x:1%3B&=%3B&@_y:-0.8799999999999999&x:5%3B&=Bright+&_x:4%3B&=Vol+%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Toggle&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue+&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value-&_x:8%3B&=Page%20Down%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat-&_x:1%3B&=Reset&_x:6%3B&=Ctrl+A&_x:1%3B&=Ctrl+E%3B&@_y:-0.8799999999999999&x:5%3B&=Bright-&_x:4%3B&=Vol-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Mode&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue-&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Mute%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
|
||||||
|
# Build Options
|
||||||
|
# change to "no" to disable the options, or define them in the Makefile in
|
||||||
|
# the appropriate keymap folder that will get included automatically
|
||||||
|
#
|
||||||
|
BOOTMAGIC_ENABLE = no # 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)
|
||||||
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||||
|
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||||
|
MIDI_ENABLE = no # MIDI controls
|
||||||
|
AUDIO_ENABLE = no # Audio output on port C6
|
||||||
|
UNICODE_ENABLE = no # Unicode
|
||||||
|
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||||
|
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
|
||||||
|
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||||
|
TAP_DANCE_ENABLE = no
|
||||||
|
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
|
||||||
|
# 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 you want to change the display of OLED, you need to change here
|
||||||
|
SRC += oled.c \
|
||||||
|
./lib/glcdfont.c \
|
||||||
|
./lib/rgb_state_reader.c \
|
||||||
|
./lib/layer_state_reader.c \
|
||||||
|
./lib/logo_reader.c \
|
||||||
|
./lib/keylogger.c \
|
||||||
+56
-69
@@ -51,78 +51,65 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
// 05 06 06 05
|
// 05 06 06 05
|
||||||
// 15 14 07 07 14 15 3
|
// 15 14 07 07 14 15 3
|
||||||
|
|
||||||
/* {row | col << 4} logical layout rows/cols
|
|
||||||
* | {x=0..224, y=0..64} physical layout
|
|
||||||
* | | | modifier
|
|
||||||
* | | | */
|
|
||||||
#define RGB_MATRIX_LEFT_LEDS \
|
|
||||||
{ { 0xFF }, { 85, 16 }, 2 }, /* 1 */ \
|
|
||||||
{ { 0xFF }, { 50, 13 }, 2 }, /* 2 */ \
|
|
||||||
{ { 0xFF }, { 16, 20 }, 2 }, /* 3 */ \
|
|
||||||
{ { 0xFF }, { 16, 38 }, 2 }, /* 4 */ \
|
|
||||||
{ { 0xFF }, { 50, 48 }, 2 }, /* 5 */ \
|
|
||||||
{ { 0xFF }, { 85, 52 }, 2 }, /* 6 */ \
|
|
||||||
{ { 3 | ( 5 << 4 ) }, { 95, 63 }, 1 }, /* 7 */ \
|
|
||||||
{ { 2 | ( 5 << 4 ) }, { 85, 39 }, 4 }, /* 8 */ \
|
|
||||||
{ { 1 | ( 5 << 4 ) }, { 85, 21 }, 4 }, /* 9 */ \
|
|
||||||
{ { 0 | ( 5 << 4 ) }, { 85, 4 }, 4 }, /* 10 */ \
|
|
||||||
{ { 0 | ( 4 << 4 ) }, { 68, 02 }, 4 }, /* 11 */ \
|
|
||||||
{ { 1 | ( 4 << 4 ) }, { 68, 19 }, 4 }, /* 12 */ \
|
|
||||||
{ { 2 | ( 4 << 4 ) }, { 68, 37 }, 4 }, /* 13 */ \
|
|
||||||
{ { 3 | ( 4 << 4 ) }, { 80, 58 }, 1 }, /* 14 */ \
|
|
||||||
{ { 3 | ( 3 << 4 ) }, { 60, 55 }, 1 }, /* 15 */ \
|
|
||||||
{ { 2 | ( 3 << 4 ) }, { 50, 35 }, 4 }, /* 16 */ \
|
|
||||||
{ { 1 | ( 3 << 4 ) }, { 50, 13 }, 4 }, /* 17 */ \
|
|
||||||
{ { 0 | ( 3 << 4 ) }, { 50, 0 }, 4 }, /* 18 */ \
|
|
||||||
{ { 0 | ( 2 << 4 ) }, { 33, 3 }, 4 }, /* 19 */ \
|
|
||||||
{ { 1 | ( 2 << 4 ) }, { 33, 20 }, 4 }, /* 20 */ \
|
|
||||||
{ { 2 | ( 2 << 4 ) }, { 33, 37 }, 4 }, /* 21 */ \
|
|
||||||
{ { 2 | ( 1 << 4 ) }, { 16, 42 }, 4 }, /* 22 */ \
|
|
||||||
{ { 1 | ( 1 << 4 ) }, { 16, 24 }, 4 }, /* 23 */ \
|
|
||||||
{ { 0 | ( 1 << 4 ) }, { 16, 7 }, 4 }, /* 24 */ \
|
|
||||||
{ { 0 | ( 0 << 4 ) }, { 0, 7 }, 1 }, /* 25 */ \
|
|
||||||
{ { 1 | ( 0 << 4 ) }, { 0, 24 }, 1 }, /* 26 */ \
|
|
||||||
{ { 2 | ( 0 << 4 ) }, { 0, 41 }, 1 }, /* 27 */
|
|
||||||
|
|
||||||
#define RGB_MATRIX_RIGHT_LEDS \
|
|
||||||
{ { 0xFF }, { 139, 16 }, 2 }, /* 1 */ \
|
|
||||||
{ { 0xFF }, { 174, 13 }, 2 }, /* 2 */ \
|
|
||||||
{ { 0xFF }, { 208, 20 }, 2 }, /* 3 */ \
|
|
||||||
{ { 0xFF }, { 208, 38 }, 2 }, /* 4 */ \
|
|
||||||
{ { 0xFF }, { 174, 48 }, 2 }, /* 5 */ \
|
|
||||||
{ { 0xFF }, { 139, 52 }, 2 }, /* 6 */ \
|
|
||||||
{ { 7 | ( 5 << 4 ) }, { 129, 63 }, 1 }, /* 7 */ \
|
|
||||||
{ { 6 | ( 5 << 4 ) }, { 139, 39 }, 4 }, /* 8 */ \
|
|
||||||
{ { 5 | ( 5 << 4 ) }, { 139, 21 }, 4 }, /* 9 */ \
|
|
||||||
{ { 4 | ( 5 << 4 ) }, { 139, 4 }, 4 }, /* 10 */ \
|
|
||||||
{ { 4 | ( 4 << 4 ) }, { 156, 02 }, 4 }, /* 11 */ \
|
|
||||||
{ { 5 | ( 4 << 4 ) }, { 156, 19 }, 4 }, /* 12 */ \
|
|
||||||
{ { 6 | ( 4 << 4 ) }, { 156, 37 }, 4 }, /* 13 */ \
|
|
||||||
{ { 7 | ( 4 << 4 ) }, { 144, 58 }, 1 }, /* 14 */ \
|
|
||||||
{ { 7 | ( 3 << 4 ) }, { 164, 55 }, 1 }, /* 15 */ \
|
|
||||||
{ { 6 | ( 3 << 4 ) }, { 174, 35 }, 4 }, /* 16 */ \
|
|
||||||
{ { 5 | ( 3 << 4 ) }, { 174, 13 }, 4 }, /* 17 */ \
|
|
||||||
{ { 4 | ( 3 << 4 ) }, { 174, 0 }, 4 }, /* 18 */ \
|
|
||||||
{ { 4 | ( 2 << 4 ) }, { 191, 3 }, 4 }, /* 19 */ \
|
|
||||||
{ { 5 | ( 2 << 4 ) }, { 191, 20 }, 4 }, /* 20 */ \
|
|
||||||
{ { 6 | ( 2 << 4 ) }, { 191, 37 }, 4 }, /* 21 */ \
|
|
||||||
{ { 6 | ( 1 << 4 ) }, { 208, 42 }, 4 }, /* 22 */ \
|
|
||||||
{ { 5 | ( 1 << 4 ) }, { 208, 24 }, 4 }, /* 23 */ \
|
|
||||||
{ { 4 | ( 1 << 4 ) }, { 208, 7 }, 4 }, /* 24 */ \
|
|
||||||
{ { 4 | ( 0 << 4 ) }, { 224, 7 }, 1 }, /* 25 */ \
|
|
||||||
{ { 5 | ( 0 << 4 ) }, { 224, 24 }, 1 }, /* 26 */ \
|
|
||||||
{ { 6 | ( 0 << 4 ) }, { 224, 41 }, 1 }, /* 27 */
|
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_SPLIT_RIGHT
|
#ifdef RGB_MATRIX_SPLIT_RIGHT
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
RGB_MATRIX_RIGHT_LEDS
|
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
||||||
RGB_MATRIX_LEFT_LEDS
|
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
||||||
};
|
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED },
|
||||||
|
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
||||||
|
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
||||||
|
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED }
|
||||||
|
}, {
|
||||||
|
{ 139, 16 }, { 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 },
|
||||||
|
{ 139, 39 }, { 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 },
|
||||||
|
{ 164, 55 }, { 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 },
|
||||||
|
{ 208, 42 }, { 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }, { 85, 16 },
|
||||||
|
{ 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 }, { 85, 39 },
|
||||||
|
{ 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 }, { 60, 55 },
|
||||||
|
{ 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 }, { 16, 42 },
|
||||||
|
{ 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }
|
||||||
|
}, {
|
||||||
|
2, 2, 2, 2, 2, 2, 1,
|
||||||
|
4, 4, 4, 4, 4, 4, 1,
|
||||||
|
1, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 1, 1, 1, 2,
|
||||||
|
2, 2, 2, 2, 2, 1, 4,
|
||||||
|
4, 4, 4, 4, 4, 1, 1,
|
||||||
|
4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 1, 1, 1
|
||||||
|
} };
|
||||||
#else
|
#else
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
RGB_MATRIX_LEFT_LEDS
|
{ 24, 23, 18, 17, 10, 9, NO_LED },
|
||||||
RGB_MATRIX_RIGHT_LEDS
|
{ 25, 22, 19, 16, 11, 8, NO_LED },
|
||||||
};
|
{ 26, 21, 20, 15, 12, 7, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, 14, 13, 6, NO_LED },
|
||||||
|
{ 51, 50, 45, 44, 37, 36, NO_LED },
|
||||||
|
{ 52, 49, 46, 43, 38, 35, NO_LED },
|
||||||
|
{ 53, 48, 47, 42, 39, 34, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, 41, 40, 33, NO_LED }
|
||||||
|
}, {
|
||||||
|
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }, { 95, 63 },
|
||||||
|
{ 85, 39 }, { 85, 21 }, { 85, 4 }, { 68, 2 }, { 68, 19 }, { 68, 37 }, { 80, 58 },
|
||||||
|
{ 60, 55 }, { 50, 35 }, { 50, 13 }, { 50, 0 }, { 33, 3 }, { 33, 20 }, { 33, 37 },
|
||||||
|
{ 16, 42 }, { 16, 24 }, { 16, 7 }, { 0, 7 }, { 0, 24 }, { 0, 41 }, { 139, 16 },
|
||||||
|
{ 174, 13 }, { 208, 20 }, { 208, 38 }, { 174, 48 }, { 139, 52 }, { 129, 63 }, { 139, 39 },
|
||||||
|
{ 139, 21 }, { 139, 4 }, { 156, 2 }, { 156, 19 }, { 156, 37 }, { 144, 58 }, { 164, 55 },
|
||||||
|
{ 174, 35 }, { 174, 13 }, { 174, 0 }, { 191, 3 }, { 191, 20 }, { 191, 37 }, { 208, 42 },
|
||||||
|
{ 208, 24 }, { 208, 7 }, { 224, 7 }, { 224, 24 }, { 224, 41 }
|
||||||
|
}, {
|
||||||
|
2, 2, 2, 2, 2, 2, 1,
|
||||||
|
4, 4, 4, 4, 4, 4, 1,
|
||||||
|
1, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 1, 1, 1, 2,
|
||||||
|
2, 2, 2, 2, 2, 1, 4,
|
||||||
|
4, 4, 4, 4, 4, 1, 1,
|
||||||
|
4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 1, 1, 1
|
||||||
|
} };
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+30
-73
@@ -14,6 +14,7 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "rgb.h"
|
#include "rgb.h"
|
||||||
|
#include "rgb_matrix_types.h"
|
||||||
|
|
||||||
// Optional override functions below.
|
// Optional override functions below.
|
||||||
// You can leave any or all of these undefined.
|
// You can leave any or all of these undefined.
|
||||||
@@ -52,76 +53,32 @@ void led_set_kb(uint8_t usb_led) {
|
|||||||
led_set_user(usb_led);
|
led_set_user(usb_led);
|
||||||
}
|
}
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{0|(0<<4)}, {15*0, 0}, 4}, // Esc
|
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||||
{{0|(1<<4)}, {15*1, 0}, 4}, // 1
|
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
||||||
{{0|(2<<4)}, {15*2, 0}, 4}, // 2
|
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
||||||
{{0|(3<<4)}, {15*3, 0}, 4}, // 3
|
{ 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||||
{{0|(4<<4)}, {15*4, 0}, 4}, // 4
|
{ 58, 59, 60, 61, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 62, 63, NO_LED, 64, 65, 66 }
|
||||||
{{0|(5<<4)}, {15*5, 0}, 4}, // 5
|
}, {
|
||||||
{{0|(6<<4)}, {15*6, 0}, 4}, // 6
|
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
|
||||||
{{0|(7<<4)}, {15*7, 0}, 4}, // 7
|
{ 0, 0 }, { 15, 0 }, { 30, 0 }, { 45, 0 }, { 60, 0 }, { 75, 0 }, { 90, 0 }, { 105, 0 }, { 120, 0 }, { 135, 0 }, { 150, 0 }, { 165, 0 }, { 180, 0 }, { 202, 0 }, { 225, 0 },
|
||||||
{{0|(8<<4)}, {15*8, 0}, 4}, // 8
|
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
|
||||||
{{0|(9<<4)}, {15*9, 0}, 4}, // 9
|
{ 7, 16 }, { 22, 16 }, { 37, 16 }, { 52, 16 }, { 67, 16 }, { 82, 16 }, { 97, 16 }, { 112, 16 }, { 127, 16 }, { 142, 16 }, { 157, 16 }, { 172, 16 }, { 187, 16 }, { 206, 16 }, { 225, 16 },
|
||||||
{{0|(10<<4)}, {15*10, 0}, 4}, // 0
|
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
|
||||||
{{0|(11<<4)}, {15*11, 0}, 4}, // -
|
{ 11, 32 }, { 26, 32 }, { 41, 32 }, { 56, 32 }, { 71, 32 }, { 86, 32 }, { 101, 32 }, { 116, 32 }, { 131, 32 }, { 146, 32 }, { 161, 32 }, { 176, 32 }, { 198, 32 }, { 225, 32 },
|
||||||
{{0|(12<<4)}, {15*12, 0}, 4}, // =
|
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
|
||||||
{{0|(13<<4)}, {15*13.5, 0}, 1}, // Backspace
|
{ 18, 48 }, { 30, 48 }, { 45, 48 }, { 60, 48 }, { 75, 48 }, { 90, 48 }, { 105, 48 }, { 120, 48 }, { 135, 48 }, { 150, 48 }, { 165, 48 }, { 191, 48 }, { 210, 48 }, { 225, 48 },
|
||||||
{{0|(14<<4)}, {15*15, 0}, 1}, // Ins
|
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||||
|
{ 3, 64 }, { 22, 64 }, { 33, 64 }, { 101, 64 }, { 135, 64 }, { 153, 64 }, { 195, 64 }, { 210, 64 }, { 225, 64 }
|
||||||
{{1|(0<<4)}, {15*0.5, 16}, 1}, // Tab
|
}, {
|
||||||
{{1|(1<<4)}, {15*1.5, 16}, 4}, // Q
|
// Esc, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =, Backspace, Ins
|
||||||
{{1|(2<<4)}, {15*2.5, 16}, 4}, // W
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(3<<4)}, {15*3.5, 16}, 4}, // E
|
// Tab, Q, W, E, R, T, Y, U, I, O, P, [, ], , Del
|
||||||
{{1|(4<<4)}, {15*4.5, 16}, 4}, // R
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(5<<4)}, {15*5.5, 16}, 4}, // T
|
// Capslock, A, S, D, F, G, H, J, K, L, ;, ', Enter, Pgup
|
||||||
{{1|(6<<4)}, {15*6.5, 16}, 4}, // Y
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(7<<4)}, {15*7.5, 16}, 4}, // U
|
// LShift, Z, X, C, V, B, N, M, ,, ., /, Shift, Up, Pgdn
|
||||||
{{1|(8<<4)}, {15*8.5, 16}, 4}, // I
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
||||||
{{1|(9<<4)}, {15*9.5, 16}, 4}, // O
|
// Ctrl, GUI, Alt, Space, RAlt, FN, Left, Down, Right
|
||||||
{{1|(10<<4)}, {15*10.5, 16}, 4}, // P
|
1, 1, 1, 4, 1, 1, 1, 1, 1
|
||||||
{{1|(11<<4)}, {15*11.5, 16}, 4}, // [
|
} };
|
||||||
{{1|(12<<4)}, {15*12.5, 16}, 4}, // ]
|
|
||||||
{{1|(13<<4)}, {15*13.75, 16}, 1}, //
|
|
||||||
{{1|(14<<4)}, {15*15, 16}, 1}, // Del
|
|
||||||
|
|
||||||
{{2|(0<<4)}, {15*0.75, 32}, 1}, // Capslock
|
|
||||||
{{2|(1<<4)}, {15*1.75, 32}, 4}, // A
|
|
||||||
{{2|(2<<4)}, {15*2.75, 32}, 4}, // S
|
|
||||||
{{2|(3<<4)}, {15*3.75, 32}, 4}, // D
|
|
||||||
{{2|(4<<4)}, {15*4.75, 32}, 4}, // F
|
|
||||||
{{2|(5<<4)}, {15*5.75, 32}, 4}, // G
|
|
||||||
{{2|(6<<4)}, {15*6.75, 32}, 4}, // H
|
|
||||||
{{2|(7<<4)}, {15*7.75, 32}, 4}, // J
|
|
||||||
{{2|(8<<4)}, {15*8.75, 32}, 4}, // K
|
|
||||||
{{2|(9<<4)}, {15*9.75, 32}, 4}, // L
|
|
||||||
{{2|(10<<4)}, {15*10.75, 32}, 4}, // ;
|
|
||||||
{{2|(11<<4)}, {15*11.75, 32}, 4}, // '
|
|
||||||
{{2|(13<<4)}, {15*13.25, 32}, 1}, // Enter
|
|
||||||
{{2|(14<<4)}, {15*15, 32}, 1}, // Pgup
|
|
||||||
|
|
||||||
{{3|(0<<4)}, {15*1.25, 48}, 1}, // LShift
|
|
||||||
{{3|(2<<4)}, {15*2, 48}, 4}, // Z
|
|
||||||
{{3|(3<<4)}, {15*3, 48}, 4}, // X
|
|
||||||
{{3|(4<<4)}, {15*4, 48}, 4}, // C
|
|
||||||
{{3|(5<<4)}, {15*5, 48}, 4}, // V
|
|
||||||
{{3|(6<<4)}, {15*6, 48}, 4}, // B
|
|
||||||
{{3|(7<<4)}, {15*7, 48}, 4}, // N
|
|
||||||
{{3|(8<<4)}, {15*8, 48}, 4}, // M
|
|
||||||
{{3|(9<<4)}, {15*9, 48}, 4}, // ,
|
|
||||||
{{3|(10<<4)}, {15*10, 48}, 4}, // .
|
|
||||||
{{3|(11<<4)}, {15*11, 48}, 4}, // /
|
|
||||||
{{3|(12<<4)}, {15*12.75, 48}, 1}, // Shift
|
|
||||||
{{3|(13<<4)}, {15*14, 48}, 1}, // Up
|
|
||||||
{{3|(14<<4)}, {15*15, 48}, 1}, // Pgdn
|
|
||||||
|
|
||||||
{{4|(0<<4)}, {15*0.25, 64}, 1}, // Ctrl
|
|
||||||
{{4|(1<<4)}, {15*1.5, 64}, 1}, // GUI
|
|
||||||
{{4|(2<<4)}, {15*2.25, 64}, 1}, // Alt
|
|
||||||
{{4|(3<<4)}, {15*6.75, 64}, 4}, // Space
|
|
||||||
{{4|(9<<4)}, {15*9, 64}, 1}, // RAlt
|
|
||||||
{{4|(10<<4)}, {15*10.25, 64}, 1}, // FN
|
|
||||||
{{4|(12<<4)}, {15*13, 64}, 1}, // Left
|
|
||||||
{{4|(13<<4)}, {15*14, 64}, 1}, // Down
|
|
||||||
{{4|(14<<4)}, {15*15, 64}, 1}, // Right
|
|
||||||
};
|
|
||||||
@@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift|
|
* | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift|
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right|
|
* | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right|
|
||||||
* `-----------------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_BL] = LAYOUT_all(
|
[_BL] = LAYOUT_all(
|
||||||
@@ -30,25 +30,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
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_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,
|
||||||
LT(_FL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
LT(_FL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_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_A, KC_UP, KC_RSFT,
|
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_A, KC_UP, KC_RSFT,
|
||||||
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, LT(_NL, KC_SPC), KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||||
|
|
||||||
/* ,-----------------------------------------------------------------------------------------.
|
/* ,-----------------------------------------------------------------------------------------.
|
||||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | |PgUp | | | | | | |
|
* | | | | PgUp| | | | | Up | | | | | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | Left| Down| Up |Right| | | |
|
* | | |Home |PgDwn| End | | | Left| Down|Right| | | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | |PgDwn| | | | | | |
|
* | | | | | | | | | | | | | | |
|
||||||
* |-----------------------------------------------------------------------------------------+
|
* |-----------------------------------------------------------------------------------------+
|
||||||
* | | | | | | | | | |
|
* | | | | | | | | | |
|
||||||
* `-----------------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_FL] = LAYOUT_all(
|
[_FL] = LAYOUT_all(
|
||||||
_______, 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_NO, KC_DEL,
|
_______, 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_NO, KC_DEL,
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, KC_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
|
_______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
|
||||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______,
|
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||||
|
|
||||||
/* ,-----------------------------------------------------------------------------------------.
|
/* ,-----------------------------------------------------------------------------------------.
|
||||||
@@ -64,30 +64,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
* `-----------------------------------------------------------------------------------------'
|
* `-----------------------------------------------------------------------------------------'
|
||||||
*/
|
*/
|
||||||
[_ML] = LAYOUT_all(
|
[_ML] = LAYOUT_all(
|
||||||
KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
|
KC_MEDIA_EJECT, BR_DOWN, BR_UP, BL_TOGG, RGB_TOG, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_INC, _______,
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
_______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, BL_DEC, RGB_MODE_FORWARD),
|
||||||
|
|
||||||
/* ,-----------------------------------------------------------------------------------------.
|
|
||||||
* | | | | | | | | | % | ( | ) | < | > | |
|
|
||||||
* |-----------------------------------------------------------------------------------------+
|
|
||||||
* | | | | | | | | * | 0 | 1 | 2 | 3 | | |
|
|
||||||
* |-----------------------------------------------------------------------------------------+
|
|
||||||
* | | | | | | | | . | - | 4 | 5 | 6 | |
|
|
||||||
* |-----------------------------------------------------------------------------------------+
|
|
||||||
* | | | | | | | | , | = | 7 | 8 | 9 | | |
|
|
||||||
* |-----------------------------------------------------------------------------------------+
|
|
||||||
* | | | | | | | | | |
|
|
||||||
* `-----------------------------------------------------------------------------------------'
|
|
||||||
*/
|
|
||||||
[_NL] = LAYOUT_all(
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______,
|
|
||||||
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_COMMA, KC_EQL, KC_7, KC_8, KC_9, _______, _______,
|
|
||||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = yes
|
||||||
@@ -52,7 +52,7 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, E_3, D_3, F_3},
|
{0, E_3, D_3, F_3},
|
||||||
{0, E_2, D_2, F_2},
|
{0, E_2, D_2, F_2},
|
||||||
{0, E_1, D_1, F_1},
|
{0, E_1, D_1, F_1},
|
||||||
|
|
||||||
{0, E_13, D_13, F_13},
|
{0, E_13, D_13, F_13},
|
||||||
{0, E_14, D_14, F_14},
|
{0, E_14, D_14, F_14},
|
||||||
|
|
||||||
@@ -71,70 +71,25 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
|
{ 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||||
|
{ 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
|
||||||
|
{ 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42 }
|
||||||
|
}, {
|
||||||
|
{ 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
|
||||||
|
{ 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
|
||||||
|
{ 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
|
||||||
|
{ 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 122, 63 },
|
||||||
|
{ 101, 63 }, { 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
|
||||||
|
}, {
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1, 1
|
||||||
|
} };
|
||||||
|
|
||||||
{{0|(11<<4)}, {20.36*11, 0}, 1},
|
|
||||||
{{0|(10<<4)}, {20.36*10, 0}, 1},
|
|
||||||
{{0|(9<<4)}, {20.36*9, 0}, 1},
|
|
||||||
{{0|(8<<4)}, {20.36*8, 0}, 1},
|
|
||||||
{{0|(7<<4)}, {20.36*7, 0}, 1},
|
|
||||||
{{0|(6<<4)}, { 20.36*6, 0}, 1},
|
|
||||||
{{0|(5<<4)}, { 20.36*5, 0}, 1},
|
|
||||||
{{0|(4<<4)}, { 20.36*4, 0}, 1},
|
|
||||||
{{0|(3<<4)}, { 20.36*3, 0}, 1},
|
|
||||||
{{0|(2<<4)}, { 20.36*2, 0}, 1},
|
|
||||||
{{0|(1<<4)}, { 20.36*1, 0}, 1},
|
|
||||||
{{0|(0<<4)}, { 20.36*0, 0}, 1},
|
|
||||||
|
|
||||||
{{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
|
|
||||||
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
|
|
||||||
|
|
||||||
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
|
|
||||||
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
|
|
||||||
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
|
|
||||||
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
|
|
||||||
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
|
|
||||||
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
|
|
||||||
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
|
|
||||||
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
|
|
||||||
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
|
|
||||||
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
|
|
||||||
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
|
|
||||||
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
|
|
||||||
|
|
||||||
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
|
|
||||||
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
|
|
||||||
|
|
||||||
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
|
|
||||||
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
|
|
||||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
|
||||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
|
||||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
|
||||||
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
|
|
||||||
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
|
|
||||||
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
|
|
||||||
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
|
|
||||||
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
|
|
||||||
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
|
|
||||||
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
|
|
||||||
|
|
||||||
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
|
|
||||||
{{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
|
|
||||||
|
|
||||||
{{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
|
|
||||||
{{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
|
|
||||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
|
||||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
|
||||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
|
||||||
{{3|(6<<4)}, { 20.36*6, 21.33*3}, 1},
|
|
||||||
{{3|(5<<4)}, { 20.36*5, 21.33*3}, 1},
|
|
||||||
{{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
|
|
||||||
{{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
|
|
||||||
{{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
|
|
||||||
{{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
|
|
||||||
{{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
|
|
||||||
|
|
||||||
};
|
|
||||||
#else
|
#else
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
/* Refer to IS31 manual for these locations
|
/* Refer to IS31 manual for these locations
|
||||||
@@ -205,69 +160,25 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
|
{ 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||||
|
{ 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28 },
|
||||||
|
{ 52, 51, 50, 49, 48, NO_LED, 47, 46, 45, 44, 43, 42 }
|
||||||
|
}, {
|
||||||
|
{ 223, 0 }, { 203, 0 }, { 183, 0 }, { 162, 0 }, { 142, 0 }, { 122, 0 }, { 101, 0 }, { 81, 0 }, { 61, 0 }, { 40, 0 }, { 20, 0 }, { 0, 0 },
|
||||||
|
{ 223, 10 }, { 0, 10 }, { 223, 21 }, { 203, 21 }, { 183, 21 }, { 162, 21 }, { 142, 21 }, { 122, 21 }, { 101, 21 }, { 81, 21 }, { 61, 21 }, { 40, 21 },
|
||||||
|
{ 20, 21 }, { 0, 21 }, { 223, 31 }, { 0, 31 }, { 223, 42 }, { 203, 42 }, { 183, 42 }, { 162, 42 }, { 142, 42 }, { 122, 42 }, { 101, 42 }, { 81, 42 },
|
||||||
|
{ 61, 42 }, { 40, 42 }, { 20, 42 }, { 0, 42 }, { 223, 53 }, { 0, 53 }, { 223, 63 }, { 203, 63 }, { 183, 63 }, { 162, 63 }, { 142, 63 }, { 111, 63 },
|
||||||
|
{ 81, 63 }, { 61, 63 }, { 40, 63 }, { 20, 63 }, { 0, 63 }
|
||||||
|
}, {
|
||||||
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
|
1, 1, 1, 1, 1
|
||||||
|
} };
|
||||||
|
|
||||||
{{0|(11<<4)}, {20.36*11, 0}, 1},
|
|
||||||
{{0|(10<<4)}, {20.36*10, 0}, 1},
|
|
||||||
{{0|(9<<4)}, {20.36*9, 0}, 1},
|
|
||||||
{{0|(8<<4)}, {20.36*8, 0}, 1},
|
|
||||||
{{0|(7<<4)}, {20.36*7, 0}, 1},
|
|
||||||
{{0|(6<<4)}, { 20.36*6, 0}, 1},
|
|
||||||
{{0|(5<<4)}, { 20.36*5, 0}, 1},
|
|
||||||
{{0|(4<<4)}, { 20.36*4, 0}, 1},
|
|
||||||
{{0|(3<<4)}, { 20.36*3, 0}, 1},
|
|
||||||
{{0|(2<<4)}, { 20.36*2, 0}, 1},
|
|
||||||
{{0|(1<<4)}, { 20.36*1, 0}, 1},
|
|
||||||
{{0|(0<<4)}, { 20.36*0, 0}, 1},
|
|
||||||
|
|
||||||
{{0|(12<<4)}, {20.36*11, 21.33*0.5}, 1},
|
|
||||||
{{0|(13<<4)}, {20.36*0,21.33*0.5}, 1},
|
|
||||||
|
|
||||||
{{1|(11<<4)}, {20.36*11, 21.33}, 1},
|
|
||||||
{{1|(10<<4)}, {20.36*10, 21.33}, 4},
|
|
||||||
{{1|(9<<4)}, {20.36*9, 21.33}, 4},
|
|
||||||
{{1|(8<<4)}, {20.36*8, 21.33}, 4},
|
|
||||||
{{1|(7<<4)}, {20.36*7, 21.33}, 4},
|
|
||||||
{{1|(6<<4)}, { 20.36*6, 21.33}, 4},
|
|
||||||
{{1|(5<<4)}, { 20.36*5, 21.33}, 4},
|
|
||||||
{{1|(4<<4)}, { 20.36*4, 21.33}, 4},
|
|
||||||
{{1|(3<<4)}, { 20.36*3, 21.33}, 4},
|
|
||||||
{{1|(2<<4)}, { 20.36*2, 21.33}, 4},
|
|
||||||
{{1|(1<<4)}, { 20.36*1, 21.33}, 4},
|
|
||||||
{{1|(0<<4)}, { 20.36*0, 21.33}, 1},
|
|
||||||
|
|
||||||
{{1|(12<<4)}, {20.36*11, 21.33*1.5}, 1},
|
|
||||||
{{1|(13<<4)}, {20.36*0,21.33*1.5}, 1},
|
|
||||||
|
|
||||||
{{2|(11<<4)}, {20.36*11, 21.33*2}, 1},
|
|
||||||
{{2|(10<<4)}, {20.36*10, 21.33*2}, 4},
|
|
||||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
|
||||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
|
||||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
|
||||||
{{2|(6<<4)}, { 20.36*6, 21.33*2}, 4},
|
|
||||||
{{2|(5<<4)}, { 20.36*5, 21.33*2}, 4},
|
|
||||||
{{2|(4<<4)}, { 20.36*4, 21.33*2}, 4},
|
|
||||||
{{2|(3<<4)}, { 20.36*3, 21.33*2}, 4},
|
|
||||||
{{2|(2<<4)}, { 20.36*2, 21.33*2}, 4},
|
|
||||||
{{2|(1<<4)}, { 20.36*1, 21.33*2}, 4},
|
|
||||||
{{2|(0<<4)}, { 20.36*0, 21.33*2}, 1},
|
|
||||||
|
|
||||||
{{2|(12<<4)}, {20.36*11, 21.33*2.5}, 1},
|
|
||||||
{{2|(13<<4)}, {20.36*0,21.33*2.5}, 1},
|
|
||||||
|
|
||||||
{{3|(11<<4)}, {20.36*11, 21.33*3}, 1},
|
|
||||||
{{3|(10<<4)}, {20.36*10, 21.33*3}, 1},
|
|
||||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
|
||||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
|
||||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
|
||||||
{{3|(6<<4)}, { 20.36*5.5, 21.33*3}, 1},
|
|
||||||
{{3|(4<<4)}, { 20.36*4, 21.33*3}, 1},
|
|
||||||
{{3|(3<<4)}, { 20.36*3, 21.33*3}, 1},
|
|
||||||
{{3|(2<<4)}, { 20.36*2, 21.33*3}, 1},
|
|
||||||
{{3|(1<<4)}, { 20.36*1, 21.33*3}, 1},
|
|
||||||
{{3|(0<<4)}, { 20.36*0, 21.33*3}, 1}
|
|
||||||
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,11 +31,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
),
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,12 +53,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+100
-319
@@ -65,69 +65,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, K_16, J_16, L_16},
|
{0, K_16, J_16, L_16},
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{0|(13<<4)}, {16*13.5, 0}, 1},
|
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 28 },
|
||||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 14 },
|
||||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED },
|
||||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
{ 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 }
|
||||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
}, {
|
||||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
|
||||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
{ 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
|
||||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
{ 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 },
|
||||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
{ 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 },
|
||||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
{ 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
|
||||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
}, {
|
||||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{2|(13<<4)}, {16*13.75, 24}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
|
||||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
1, 4, 1, 1, 1
|
||||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
} };
|
||||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
|
||||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
|
||||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
|
||||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
|
||||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
|
||||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
|
||||||
{{1|(13<<4)}, {16*12.75, 32}, 1},
|
|
||||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
|
||||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
|
||||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
|
||||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
|
||||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
|
||||||
{{3|(11<<4)}, {16*13.125, 48}, 1},
|
|
||||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
|
||||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
|
||||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
|
||||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
|
||||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
|
||||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
|
||||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
|
||||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
|
||||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {16*13.875, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {16*12.625, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {16*11.375, 64}, 1},
|
|
||||||
{{4|(9<<4)}, {16*10.125, 64}, 1},
|
|
||||||
{{4|(5<<4)}, { 16*6.375, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 16*2.625, 64}, 1},
|
|
||||||
{{4|(1<<4)}, { 16*1.375, 64}, 1},
|
|
||||||
{{4|(0<<4)}, { 16*0.125, 64}, 1},
|
|
||||||
};
|
|
||||||
#elif defined (dzrgb60_hhkb)
|
#elif defined (dzrgb60_hhkb)
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
{0, H_15, G_15, I_15},
|
{0, H_15, G_15, I_15},
|
||||||
@@ -194,70 +151,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, K_16, J_16, L_16},
|
{0, K_16, J_16, L_16},
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{2|(12<<4)}, {16*14, 0}, 1},
|
{ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
|
||||||
{{0|(13<<4)}, {16*13, 0}, 1},
|
{ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15 },
|
||||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 29 },
|
||||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 },
|
||||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
{ 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 }
|
||||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
}, {
|
||||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
{ 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 },
|
||||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
{ 0, 0 }, { 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 },
|
||||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
{ 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 },
|
||||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
{ 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 },
|
||||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
{ 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 }
|
||||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
}, {
|
||||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{1|(13<<4)}, {16*13.75, 16}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
1, 1, 4, 1, 1, 1
|
||||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
} };
|
||||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
|
||||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
|
||||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
|
||||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
|
||||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
|
||||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
|
||||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
|
||||||
{{2|(13<<4)}, {16*12.75, 32}, 1},
|
|
||||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
|
||||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
|
||||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
|
||||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
|
||||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
|
||||||
{{3|(13<<4)}, {16*14, 48}, 1},
|
|
||||||
{{3|(11<<4)}, {16*12.625, 48}, 4},
|
|
||||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
|
||||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
|
||||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
|
||||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
|
||||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
|
||||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
|
||||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
|
||||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
|
||||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {16*13.625, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {16*12.375, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {16*11.125, 64}, 1},
|
|
||||||
{{4|(5<<4)}, { 16*7, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 16*2.875, 64}, 1},
|
|
||||||
{{4|(1<<4)}, { 16*1.625, 64}, 1},
|
|
||||||
{{4|(0<<4)}, { 16*0.375, 64}, 1},
|
|
||||||
};
|
|
||||||
#elif defined (dzrgb60_hhkb_iso)
|
#elif defined (dzrgb60_hhkb_iso)
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
{0, H_15, G_15, I_15},
|
{0, H_15, G_15, I_15},
|
||||||
@@ -324,70 +237,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, K_16, J_16, L_16},
|
{0, K_16, J_16, L_16},
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{2|(12<<4)}, {16*14, 0}, 1},
|
{ 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
|
||||||
{{0|(13<<4)}, {16*13, 0}, 1},
|
{ 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 29 },
|
||||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
{ 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 0, 15 },
|
||||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, NO_LED, 42 },
|
||||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
{ 61, 60, 59, NO_LED, NO_LED, 58, NO_LED, NO_LED, NO_LED, NO_LED, 57, 56, NO_LED, 55 }
|
||||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
}, {
|
||||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
{ 224, 0 }, { 208, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 },
|
||||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
{ 0, 0 }, { 220, 24 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 },
|
||||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
{ 4, 16 }, { 204, 32 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 },
|
||||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
{ 224, 48 }, { 202, 48 }, { 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 218, 64 },
|
||||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
{ 198, 64 }, { 178, 64 }, { 112, 64 }, { 46, 64 }, { 26, 64 }, { 6, 64 }
|
||||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
}, {
|
||||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{2|(13<<4)}, {16*13.75, 24}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
1, 1, 4, 1, 1, 1
|
||||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
} };
|
||||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
|
||||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
|
||||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
|
||||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
|
||||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
|
||||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
|
||||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
|
||||||
{{1|(13<<4)}, {16*12.75, 32}, 1},
|
|
||||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
|
||||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
|
||||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
|
||||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
|
||||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
|
||||||
{{3|(13<<4)}, {16*14, 48}, 1},
|
|
||||||
{{3|(11<<4)}, {16*12.625, 48}, 4},
|
|
||||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
|
||||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
|
||||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
|
||||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
|
||||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
|
||||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
|
||||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
|
||||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
|
||||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {16*13.625, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {16*12.375, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {16*11.125, 64}, 1},
|
|
||||||
{{4|(5<<4)}, { 16*7, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 16*2.875, 64}, 1},
|
|
||||||
{{4|(1<<4)}, { 16*1.625, 64}, 1},
|
|
||||||
{{4|(0<<4)}, { 16*0.375, 64}, 1},
|
|
||||||
};
|
|
||||||
#elif defined (dzrgb60_ansi)
|
#elif defined (dzrgb60_ansi)
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
{0, K_14, J_14, L_14},
|
{0, K_14, J_14, L_14},
|
||||||
@@ -453,69 +322,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, K_16, J_16, L_16},
|
{0, K_16, J_16, L_16},
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{0|(13<<4)}, {16*13.5, 0}, 1},
|
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 },
|
||||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
{ 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, NO_LED, NO_LED },
|
||||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
{ 60, 59, 58, NO_LED, NO_LED, 57, NO_LED, NO_LED, NO_LED, 56, 55, 54, NO_LED, 53 }
|
||||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
}, {
|
||||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
{ 216, 0 }, { 192, 0 }, { 176, 0 }, { 160, 0 }, { 144, 0 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 }, { 32, 0 }, { 16, 0 }, { 0, 0 },
|
||||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
{ 220, 16 }, { 200, 16 }, { 184, 16 }, { 168, 16 }, { 152, 16 }, { 136, 16 }, { 120, 16 }, { 104, 16 }, { 88, 16 }, { 72, 16 }, { 56, 16 }, { 40, 16 }, { 24, 16 }, { 4, 16 },
|
||||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
{ 214, 24 }, { 188, 32 }, { 172, 32 }, { 156, 32 }, { 140, 32 }, { 124, 32 }, { 108, 32 }, { 92, 32 }, { 76, 32 }, { 60, 32 }, { 44, 32 }, { 28, 32 }, { 6, 32 }, { 210, 48 },
|
||||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
{ 180, 48 }, { 164, 48 }, { 148, 48 }, { 132, 48 }, { 116, 48 }, { 100, 48 }, { 84, 48 }, { 68, 48 }, { 52, 48 }, { 20, 48 }, { 10, 48 }, { 222, 64 }, { 202, 64 }, { 182, 64 },
|
||||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
{ 162, 64 }, { 102, 64 }, { 42, 64 }, { 22, 64 }, { 2, 64 }
|
||||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
}, {
|
||||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{1|(13<<4)}, {16*13.75, 16}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(12<<4)}, {16*12.5, 16}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1,
|
||||||
{{1|(11<<4)}, {16*11.5, 16}, 4},
|
1, 4, 1, 1, 1
|
||||||
{{1|(10<<4)}, {16*10.5, 16}, 4},
|
} };
|
||||||
{{1|(9<<4)}, { 16*9.5, 16}, 4},
|
|
||||||
{{1|(8<<4)}, { 16*8.5, 16}, 4},
|
|
||||||
{{1|(7<<4)}, { 16*7.5, 16}, 4},
|
|
||||||
{{1|(6<<4)}, { 16*6.5, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 16*5.5, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 16*4.5, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 16*3.5, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 16*2.5, 16}, 4},
|
|
||||||
{{1|(1<<4)}, { 16*1.5, 16}, 4},
|
|
||||||
{{1|(0<<4)}, { 16*0.25, 16}, 1},
|
|
||||||
{{2|(13<<4)}, {16*13.375, 24}, 1},
|
|
||||||
{{2|(11<<4)}, {16*11.75, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {16*10.75, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {16*9.75, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {16*8.75, 32}, 4},
|
|
||||||
{{2|(7<<4)}, {16*7.75, 32}, 4},
|
|
||||||
{{2|(6<<4)}, { 16*6.75, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 16*5.75, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 16*4.75, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 16*3.75, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 16*2.75, 32}, 4},
|
|
||||||
{{2|(1<<4)}, { 16*1.75, 32}, 4},
|
|
||||||
{{2|(0<<4)}, { 16*0.375, 32}, 1},
|
|
||||||
{{3|(11<<4)}, {16*13.125, 48}, 1},
|
|
||||||
{{3|(10<<4)}, {16*11.25, 48}, 4},
|
|
||||||
{{3|(9<<4)}, {16*10.25, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {16*9.25, 48}, 4},
|
|
||||||
{{3|(7<<4)}, {16*8.25, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {16*7.25, 48}, 4},
|
|
||||||
{{3|(5<<4)}, {16*6.25, 48}, 4},
|
|
||||||
{{3|(4<<4)}, {16*5.25, 48}, 4},
|
|
||||||
{{3|(3<<4)}, {16*4.25, 48}, 4},
|
|
||||||
{{3|(2<<4)}, {16*3.25, 48}, 4},
|
|
||||||
{{3|(1<<4)}, {16*1.25, 48}, 4},
|
|
||||||
{{3|(0<<4)}, {16*0.625, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {16*13.875, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {16*12.625, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {16*11.375, 64}, 1},
|
|
||||||
{{4|(9<<4)}, {16*10.125, 64}, 1},
|
|
||||||
{{4|(5<<4)}, { 16*6.375, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 16*2.625, 64}, 1},
|
|
||||||
{{4|(1<<4)}, { 16*1.375, 64}, 1},
|
|
||||||
{{4|(0<<4)}, { 16*0.125, 64}, 1},
|
|
||||||
};
|
|
||||||
#else
|
#else
|
||||||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
||||||
{0, K_14, J_14, L_14},
|
{0, K_14, J_14, L_14},
|
||||||
@@ -583,71 +409,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, K_16, J_16, L_16},
|
{0, K_16, J_16, L_16},
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{0|(13<<4)}, {17.23*13, 0}, 1},
|
{ 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
{{0|(12<<4)}, {17.23*12, 0}, 1},
|
{ 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14 },
|
||||||
{{0|(11<<4)}, {17.23*11, 0}, 1},
|
{ 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, NO_LED, 28 },
|
||||||
{{0|(10<<4)}, {17.23*10, 0}, 1},
|
{ 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, NO_LED, 41 },
|
||||||
{{0|(9<<4)}, {17.23*9, 0}, 1},
|
{ 62, 61, 60, NO_LED, NO_LED, 59, NO_LED, NO_LED, 58, 57, 56, 55, NO_LED, 54 }
|
||||||
{{0|(8<<4)}, {17.23*8, 0}, 1},
|
}, {
|
||||||
{{0|(7<<4)}, {17.23*7, 0}, 1},
|
{ 223, 0 }, { 206, 0 }, { 189, 0 }, { 172, 0 }, { 155, 0 }, { 137, 0 }, { 120, 0 }, { 103, 0 }, { 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 },
|
||||||
{{0|(6<<4)}, { 17.23*6, 0}, 1},
|
{ 223, 16 }, { 206, 16 }, { 189, 16 }, { 172, 16 }, { 155, 16 }, { 137, 16 }, { 120, 16 }, { 103, 16 }, { 86, 16 }, { 68, 16 }, { 51, 16 }, { 34, 16 }, { 17, 16 }, { 0, 16 },
|
||||||
{{0|(5<<4)}, { 17.23*5, 0}, 1},
|
{ 223, 32 }, { 189, 32 }, { 172, 32 }, { 155, 32 }, { 137, 32 }, { 120, 32 }, { 103, 32 }, { 86, 32 }, { 68, 32 }, { 51, 32 }, { 34, 32 }, { 17, 32 }, { 0, 32 }, { 223, 48 },
|
||||||
{{0|(4<<4)}, { 17.23*4, 0}, 1},
|
{ 189, 48 }, { 172, 48 }, { 155, 48 }, { 137, 48 }, { 120, 48 }, { 103, 48 }, { 86, 48 }, { 68, 48 }, { 51, 48 }, { 34, 48 }, { 17, 48 }, { 0, 48 }, { 223, 64 }, { 189, 64 },
|
||||||
{{0|(3<<4)}, { 17.23*3, 0}, 1},
|
{ 172, 64 }, { 155, 64 }, { 137, 64 }, { 86, 64 }, { 34, 64 }, { 17, 64 }, { 0, 64 }
|
||||||
{{0|(2<<4)}, { 17.23*2, 0}, 1},
|
}, {
|
||||||
{{0|(1<<4)}, { 17.23*1, 0}, 1},
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
{{0|(0<<4)}, { 17.23*0, 0}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{1|(13<<4)}, {17.23*13, 16}, 1},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{1|(12<<4)}, {17.23*12, 16}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1,
|
||||||
{{1|(11<<4)}, {17.23*11, 16}, 4},
|
1, 1, 1, 4, 1, 1, 1
|
||||||
{{1|(10<<4)}, {17.23*10, 16}, 4},
|
} };
|
||||||
{{1|(9<<4)}, {17.23*9, 16}, 4},
|
|
||||||
{{1|(8<<4)}, {17.23*8, 16}, 4},
|
|
||||||
{{1|(7<<4)}, {17.23*7, 16}, 4},
|
|
||||||
{{1|(6<<4)}, { 17.23*6, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 17.23*5, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 17.23*4, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 17.23*3, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 17.23*2, 16}, 4},
|
|
||||||
{{1|(1<<4)}, { 17.23*1, 16}, 4},
|
|
||||||
{{1|(0<<4)}, { 17.23*0, 16}, 1},
|
|
||||||
{{2|(13<<4)}, {17.23*13, 32}, 1},
|
|
||||||
{{2|(11<<4)}, {17.23*11, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {17.23*10, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {17.23*9, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {17.23*8, 32}, 4},
|
|
||||||
{{2|(7<<4)}, {17.23*7, 32}, 4},
|
|
||||||
{{2|(6<<4)}, { 17.23*6, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 17.23*5, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 17.23*4, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 17.23*3, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 17.23*2, 32}, 4},
|
|
||||||
{{2|(1<<4)}, { 17.23*1, 32}, 4},
|
|
||||||
{{2|(0<<4)}, { 17.23*0, 32}, 1},
|
|
||||||
{{3|(13<<4)}, {17.23*13, 48}, 1},
|
|
||||||
{{3|(11<<4)}, {17.23*11, 48}, 4},
|
|
||||||
{{3|(10<<4)}, {17.23*10, 48}, 4},
|
|
||||||
{{3|(9<<4)}, {17.23*9, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {17.23*8, 48}, 4},
|
|
||||||
{{3|(7<<4)}, {17.23*7, 48}, 4},
|
|
||||||
{{3|(6<<4)}, { 17.23*6, 48}, 4},
|
|
||||||
{{3|(5<<4)}, { 17.23*5, 48}, 4},
|
|
||||||
{{3|(4<<4)}, { 17.23*4, 48}, 4},
|
|
||||||
{{3|(3<<4)}, { 17.23*3, 48}, 4},
|
|
||||||
{{3|(2<<4)}, { 17.23*2, 48}, 4},
|
|
||||||
{{3|(1<<4)}, { 17.23*1, 48}, 4},
|
|
||||||
{{3|(0<<4)}, { 17.23*0, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {17.23*13, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {17.23*11, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {17.23*10, 64}, 1},
|
|
||||||
{{4|(9<<4)}, {17.23*9, 64}, 1},
|
|
||||||
{{4|(8<<4)}, {17.23*8, 64}, 1},
|
|
||||||
{{4|(5<<4)}, { 17.23*5, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 17.23*2, 64}, 1},
|
|
||||||
{{4|(1<<4)}, { 17.23*1, 64}, 1},
|
|
||||||
{{4|(0<<4)}, { 17.23*0, 64}, 1},
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|||||||
@@ -38,11 +38,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,11 +39,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS),
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,11 +38,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
KC_TRNS, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,40 +50,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void rgb_matrix_layer_helper(uint8_t red, uint8_t green, uint8_t blue, bool default_layer)
|
extern led_config_t g_led_config;
|
||||||
{
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
rgb_led led;
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
led = g_rgb_leds[i];
|
}
|
||||||
|
}
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rgb_matrix_indicators_user(void)
|
void rgb_matrix_indicators_user(void)
|
||||||
{
|
{
|
||||||
uint8_t this_led = host_keyboard_leds();
|
uint8_t this_led = host_keyboard_leds();
|
||||||
|
|
||||||
if (!g_suspend_state) {
|
if (!g_suspend_state) {
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
case _LAYER1:
|
case _LAYER1:
|
||||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
|
||||||
|
|
||||||
case _LAYER2:
|
case _LAYER2:
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
|
||||||
|
|
||||||
case _LAYER4:
|
case _LAYER4:
|
||||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this_led & (1 << USB_LED_CAPS_LOCK)) {
|
if (this_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||||
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
|
rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
case _LAYER3:
|
case _LAYER3:
|
||||||
if (this_led & (1 << USB_LED_NUM_LOCK)) {
|
if (this_led & (1 << USB_LED_NUM_LOCK)) {
|
||||||
@@ -91,7 +87,7 @@ void rgb_matrix_indicators_user(void)
|
|||||||
} else {
|
} else {
|
||||||
rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
|
rgb_matrix_set_color(13, 0x00, 0x00, 0x00);
|
||||||
}
|
}
|
||||||
|
|
||||||
rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
|
rgb_matrix_set_color(0, 0x00, 0xFF, 0x00);
|
||||||
rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
|
rgb_matrix_set_color(1, 0x00, 0x00, 0x00);
|
||||||
rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
|
rgb_matrix_set_color(1, 0x00, 0xFF, 0x00);
|
||||||
|
|||||||
@@ -73,76 +73,26 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{1, C9_16, C7_15, C6_15}, // LD16
|
{1, C9_16, C7_15, C6_15}, // LD16
|
||||||
{1, C8_16, C7_16, C6_16}, // LD17
|
{1, C8_16, C7_16, C6_16}, // LD17
|
||||||
};
|
};
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
|
||||||
{{1|(7<<4)}, {16*7, 16}, 4},
|
led_config_t g_led_config = { {
|
||||||
{{1|(6<<4)}, {16*6, 16}, 4},
|
{ 17, 16, 15, 14, 13, 12, 11, 10, 9, 18, 19, 20, 21, 22, 23 },
|
||||||
{{1|(5<<4)}, {16*5, 16}, 4},
|
{ 7, 6, 5, 4, 3, 2, 1, 0, 26, 27, 28, 29, 30, 31, 24 },
|
||||||
{{1|(4<<4)}, {16*4, 16}, 4},
|
{ 8, 48, 47, 46, 45, 44, 43, 51, 52, 53, 54, 55, NO_LED, 56, 25 },
|
||||||
{{1|(3<<4)}, {16*3, 16}, 4},
|
{ 49, 40, 39, 38, 37, 36, 60, 61, 62, 63, 57, 58, NO_LED, 59, 32 },
|
||||||
{{1|(2<<4)}, {16*2, 16}, 4},
|
{ 50, 42, 41, NO_LED, NO_LED, 35, NO_LED, NO_LED, 64, 65, 66, 67, NO_LED, 34, 33 }
|
||||||
{{1|(1<<4)}, {16*1, 16}, 4},
|
}, {
|
||||||
{{1|(0<<4)}, {16*0, 16}, 1},
|
{ 112, 16 }, { 96, 16 }, { 80, 16 }, { 64, 16 }, { 48, 16 }, { 32, 16 }, { 16, 16 }, { 0, 16 }, { 0, 32 }, { 128, 0 }, { 112, 0 }, { 96, 0 }, { 80, 0 }, { 64, 0 }, { 48, 0 },
|
||||||
{{2|(0<<4)}, {16*0, 32}, 1},
|
{ 32, 0 }, { 16, 0 }, { 0, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 224, 0 }, { 224, 16 }, { 224, 32 }, { 128, 16 }, { 144, 16 }, { 160, 16 }, { 176, 16 },
|
||||||
{{0|(8<<4)}, {16*8, 0}, 1},
|
{ 192, 16 }, { 208, 16 }, { 224, 48 }, { 224, 64 }, { 208, 64 }, { 80, 64 }, { 80, 48 }, { 64, 48 }, { 48, 48 }, { 32, 48 }, { 16, 48 }, { 32, 64 }, { 16, 64 }, { 96, 32 }, { 80, 32 },
|
||||||
{{0|(7<<4)}, {16*7, 0}, 1},
|
{ 64, 32 }, { 48, 32 }, { 32, 32 }, { 16, 32 }, { 0, 48 }, { 0, 64 }, { 112, 32 }, { 128, 32 }, { 144, 32 }, { 160, 32 }, { 176, 32 }, { 208, 32 }, { 160, 48 }, { 176, 48 }, { 208, 48 },
|
||||||
{{0|(6<<4)}, {16*6, 0}, 1},
|
{ 96, 48 }, { 112, 48 }, { 128, 48 }, { 144, 48 }, { 128, 64 }, { 144, 64 }, { 160, 64 }, { 176, 64 }
|
||||||
{{0|(5<<4)}, {16*5, 0}, 1},
|
}, {
|
||||||
{{0|(4<<4)}, {16*4, 0}, 1},
|
4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||||
{{0|(3<<4)}, {16*3, 0}, 1},
|
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4,
|
||||||
{{0|(2<<4)}, {16*2, 0}, 1},
|
4, 4, 1, 1, 1, 1, 4, 4, 4, 4, 4, 1, 1, 4, 4,
|
||||||
{{0|(1<<4)}, {16*1, 0}, 1},
|
4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0|(0<<4)}, {16*0, 0}, 1},
|
4, 4, 4, 4, 1, 1, 1, 1
|
||||||
{{0|(9<<4)}, {16*9, 0}, 1},
|
} };
|
||||||
{{0|(10<<4)}, {16*10, 0}, 1},
|
|
||||||
{{0|(11<<4)}, {16*11, 0}, 1},
|
|
||||||
{{0|(12<<4)}, {16*12, 0}, 1},
|
|
||||||
{{0|(13<<4)}, {16*13, 0}, 1},
|
|
||||||
{{0|(14<<4)}, {16*14, 0}, 1},
|
|
||||||
{{1|(14<<4)}, {16*14, 16}, 1},
|
|
||||||
{{2|(14<<4)}, {16*14, 32}, 1},
|
|
||||||
{{1|(8<<4)}, {16*8, 16}, 4},
|
|
||||||
{{1|(9<<4)}, {16*9, 16}, 4},
|
|
||||||
{{1|(10<<4)}, {16*10, 16}, 4},
|
|
||||||
{{1|(11<<4)}, {16*11, 16}, 4},
|
|
||||||
{{1|(12<<4)}, {16*12, 16}, 4},
|
|
||||||
{{1|(13<<4)}, {16*13, 16}, 4},
|
|
||||||
{{3|(14<<4)}, {16*14, 48}, 1},
|
|
||||||
{{4|(14<<4)}, {16*14, 64}, 1},
|
|
||||||
{{4|(13<<4)}, {16*13, 64}, 1},
|
|
||||||
{{4|(5<<4)}, {16*5, 64}, 1},
|
|
||||||
{{3|(5<<4)}, {16*5, 48}, 4},
|
|
||||||
{{3|(4<<4)}, {16*4, 48}, 4},
|
|
||||||
{{3|(3<<4)}, {16*3, 48}, 4},
|
|
||||||
{{3|(2<<4)}, {16*2, 48}, 4},
|
|
||||||
{{3|(1<<4)}, {16*1, 48}, 4},
|
|
||||||
{{4|(2<<4)}, {16*2, 64}, 1},
|
|
||||||
{{4|(1<<4)}, {16*1, 64}, 1},
|
|
||||||
{{2|(6<<4)}, {16*6, 32}, 4},
|
|
||||||
{{2|(5<<4)}, {16*5, 32}, 4},
|
|
||||||
{{2|(4<<4)}, {16*4, 32}, 4},
|
|
||||||
{{2|(3<<4)}, {16*3, 32}, 4},
|
|
||||||
{{2|(2<<4)}, {16*2, 32}, 4},
|
|
||||||
{{2|(1<<4)}, {16*1, 32}, 4},
|
|
||||||
{{3|(0<<4)}, {16*0, 48}, 1},
|
|
||||||
{{4|(0<<4)}, {16*0, 64}, 1},
|
|
||||||
{{2|(7<<4)}, {16*7, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {16*8, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {16*9, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {16*10, 32}, 4},
|
|
||||||
{{2|(11<<4)}, {16*11, 32}, 4},
|
|
||||||
{{2|(13<<4)}, {16*13, 32}, 4},
|
|
||||||
{{3|(10<<4)}, {16*10, 48}, 4},
|
|
||||||
{{3|(11<<4)}, {16*11, 48}, 4},
|
|
||||||
{{3|(13<<4)}, {16*13, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {16*6, 48}, 4},
|
|
||||||
{{3|(7<<4)}, {16*7, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {16*8, 48}, 4},
|
|
||||||
{{3|(9<<4)}, {16*9, 48}, 4},
|
|
||||||
{{4|(8<<4)}, {16*8, 64}, 1},
|
|
||||||
{{4|(9<<4)}, {16*9, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {16*10, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {16*11, 64}, 1},
|
|
||||||
};
|
|
||||||
|
|
||||||
void suspend_power_down_kb(void)
|
void suspend_power_down_kb(void)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -269,68 +269,39 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
|
{ 28, 33, 38, 43, 47, NO_LED },
|
||||||
|
{ 27, 32, 37, 42, 46, NO_LED },
|
||||||
|
{ 26, 31, 36, 41, 45, NO_LED },
|
||||||
|
{ 25, 30, 35, 40, 44, NO_LED },
|
||||||
|
{ 24, 29, 34, 39, NO_LED, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
|
{ 0, 5, 10, 15, NO_LED, NO_LED },
|
||||||
|
{ 1, 6, 11, 16, 20, NO_LED },
|
||||||
|
{ 2, 7, 12, 17, 21, NO_LED },
|
||||||
|
{ 3, 8, 13, 18, 22, NO_LED },
|
||||||
|
{ 4, 9, 14, 19, 23, NO_LED },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED }
|
||||||
|
}, {
|
||||||
|
{ 137, 0 }, { 154, 0 }, { 172, 0 }, { 189, 0 }, { 206, 0 }, { 137, 12 },
|
||||||
|
{ 154, 12 }, { 172, 12 }, { 189, 12 }, { 206, 12 }, { 137, 25 }, { 154, 25 },
|
||||||
|
{ 172, 25 }, { 189, 25 }, { 206, 25 }, { 137, 38 }, { 154, 38 }, { 172, 38 },
|
||||||
|
{ 189, 38 }, { 206, 38 }, { 154, 51 }, { 172, 51 }, { 189, 51 }, { 206, 51 },
|
||||||
|
{ 86, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 86, 12 },
|
||||||
|
{ 68, 12 }, { 51, 12 }, { 34, 12 }, { 17, 12 }, { 86, 25 }, { 68, 25 },
|
||||||
|
{ 51, 25 }, { 34, 25 }, { 17, 25 }, { 86, 38 }, { 68, 38 }, { 51, 38 },
|
||||||
|
{ 34, 38 }, { 17, 38 }, { 68, 51 }, { 51, 51 }, { 34, 51 }, { 17, 51 }
|
||||||
|
}, {
|
||||||
|
4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 1, 1, 1, 1,
|
||||||
|
4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 4, 4, 4, 4,
|
||||||
|
4, 4, 1, 1, 1, 1
|
||||||
|
} };
|
||||||
|
|
||||||
/*{row | col << 4}
|
|
||||||
| {x=0..224, y=0..64}
|
|
||||||
| | flags
|
|
||||||
| | | */
|
|
||||||
{{ 8|(0<<4)}, {17.2* 8, 12.8*0}, 4}, // LED 1 on right > Key 6
|
|
||||||
{{ 9|(0<<4)}, {17.2* 9, 12.8*0}, 4}, // LED 2 > Key 7
|
|
||||||
{{10|(0<<4)}, {17.2*10, 12.8*0}, 4}, // LED 3 > Key 8
|
|
||||||
{{11|(0<<4)}, {17.2*11, 12.8*0}, 4}, // LED 4 > Key 9
|
|
||||||
{{12|(0<<4)}, {17.2*12, 12.8*0}, 4}, // LED 5 > Key 0
|
|
||||||
|
|
||||||
{{ 8|(1<<4)}, {17.2* 8, 12.8*1}, 4}, // LED 6
|
|
||||||
{{ 9|(1<<4)}, {17.2* 9, 12.8*1}, 4}, // LED 7
|
|
||||||
{{10|(1<<4)}, {17.2*10, 12.8*1}, 4}, // LED 8
|
|
||||||
{{11|(1<<4)}, {17.2*11, 12.8*1}, 4}, // LED 9
|
|
||||||
{{12|(1<<4)}, {17.2*12, 12.8*1}, 4}, // LED 10
|
|
||||||
|
|
||||||
{{ 8|(2<<4)}, {17.2* 8, 12.8*2}, 4}, // LED 11
|
|
||||||
{{ 9|(2<<4)}, {17.2* 9, 12.8*2}, 4}, // LED 12
|
|
||||||
{{10|(2<<4)}, {17.2*10, 12.8*2}, 4}, // LED 13
|
|
||||||
{{11|(2<<4)}, {17.2*11, 12.8*2}, 4}, // LED 14
|
|
||||||
{{12|(2<<4)}, {17.2*12, 12.8*2}, 4}, // LED 15
|
|
||||||
|
|
||||||
{{ 8|(3<<4)}, {17.2* 8, 12.8*3}, 4}, // LED 16
|
|
||||||
{{ 9|(3<<4)}, {17.2* 9, 12.8*3}, 4}, // LED 17
|
|
||||||
{{10|(3<<4)}, {17.2*10, 12.8*3}, 4}, // LED 18
|
|
||||||
{{11|(3<<4)}, {17.2*11, 12.8*3}, 4}, // LED 19
|
|
||||||
{{12|(3<<4)}, {17.2*12, 12.8*3}, 4}, // LED 20
|
|
||||||
|
|
||||||
{{ 9|(4<<4)}, {17.2* 9, 12.8*4}, 1}, // LED 21
|
|
||||||
{{10|(4<<4)}, {17.2*10, 12.8*4}, 1}, // LED 22
|
|
||||||
{{11|(4<<4)}, {17.2*11, 12.8*4}, 1}, // LED 23
|
|
||||||
{{12|(4<<4)}, {17.2*12, 12.8*4}, 1}, // LED 24
|
|
||||||
|
|
||||||
{{ 5|(0<<4)}, {17.2* 5, 12.8*0}, 4}, // LED 1 on left > Key 5
|
|
||||||
{{ 4|(0<<4)}, {17.2* 4, 12.8*0}, 4}, // LED 2 > Key 4
|
|
||||||
{{ 3|(0<<4)}, {17.2* 3, 12.8*0}, 4}, // LED 3 > Key 3
|
|
||||||
{{ 2|(0<<4)}, {17.2* 2, 12.8*0}, 4}, // LED 4 > Key 2
|
|
||||||
{{ 1|(0<<4)}, {17.2* 1, 12.8*0}, 4}, // LED 5 > Key 1
|
|
||||||
|
|
||||||
{{ 5|(1<<4)}, {17.2* 5, 12.8*1}, 4}, // LED 6
|
|
||||||
{{ 4|(1<<4)}, {17.2* 4, 12.8*1}, 4}, // LED 7
|
|
||||||
{{ 3|(1<<4)}, {17.2* 3, 12.8*1}, 4}, // LED 8
|
|
||||||
{{ 2|(1<<4)}, {17.2* 2, 12.8*1}, 4}, // LED 9
|
|
||||||
{{ 1|(1<<4)}, {17.2* 1, 12.8*1}, 4}, // LED 10
|
|
||||||
|
|
||||||
{{ 5|(2<<4)}, {17.2* 5, 12.8*2}, 4}, // LED 11
|
|
||||||
{{ 4|(2<<4)}, {17.2* 4, 12.8*2}, 4}, // LED 12
|
|
||||||
{{ 3|(2<<4)}, {17.2* 3, 12.8*2}, 4}, // LED 13
|
|
||||||
{{ 2|(2<<4)}, {17.2* 2, 12.8*2}, 4}, // LED 14
|
|
||||||
{{ 1|(2<<4)}, {17.2* 1, 12.8*2}, 4}, // LED 15
|
|
||||||
|
|
||||||
{{ 5|(3<<4)}, {17.2* 5, 12.8*3}, 4}, // LED 16
|
|
||||||
{{ 4|(3<<4)}, {17.2* 4, 12.8*3}, 4}, // LED 17
|
|
||||||
{{ 3|(3<<4)}, {17.2* 3, 12.8*3}, 4}, // LED 18
|
|
||||||
{{ 2|(3<<4)}, {17.2* 2, 12.8*3}, 4}, // LED 19
|
|
||||||
{{ 1|(3<<4)}, {17.2* 1, 12.8*3}, 4}, // LED 20
|
|
||||||
|
|
||||||
{{ 4|(4<<4)}, {17.2* 4, 12.8*4}, 1}, // LED 21
|
|
||||||
{{ 3|(4<<4)}, {17.2* 3, 12.8*4}, 1}, // LED 22
|
|
||||||
{{ 2|(4<<4)}, {17.2* 2, 12.8*4}, 1}, // LED 23
|
|
||||||
{{ 1|(4<<4)}, {17.2* 1, 12.8*4}, 1}, // LED 24 > Key Hack
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
@@ -1,25 +1,7 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rs.h"
|
||||||
enum layers {
|
|
||||||
_QWERTY,
|
|
||||||
_HYPER,
|
|
||||||
_SIGN
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
|
||||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
|
||||||
#define KC_HYPE MO(_HYPER)
|
|
||||||
#define KC_SIGN MO(_SIGN)
|
|
||||||
#define KC_RST RESET
|
|
||||||
// Brightness
|
|
||||||
#define KC_BRUP KC_PAUS
|
|
||||||
#define KC_BRDN KC_SLCK
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_kc(
|
[_QWERTY] = LAYOUT_kc(
|
||||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL ,
|
TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL ,
|
||||||
@@ -28,32 +10,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
|
LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
|
||||||
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
||||||
SIGN, ,LCTL,LALT,LGUI, SPC, BSPC, HYPE,LEFT, UP ,DOWN,RIGHT
|
FN , ,LCTL,LALT,LGUI, SPC, BSPC, CODE,LEFT, UP ,DOWN,RIGHT
|
||||||
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
|
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
|
||||||
),
|
),
|
||||||
|
[_CODE] = LAYOUT_kc(
|
||||||
|
|
||||||
[_HYPER] = LAYOUT_kc(
|
|
||||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
GRV , 1 , 2 , 3 , 4 , 5 , , , 6 , 7 , 8 , 9 , 0 , ,
|
GRV ,EXLM, AT ,HASH, DLR,PERC, , ,CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
, , ,PGUP, , , , , , , UP ,LBRC,RBRC,BSLS,
|
, 1 , 2 , 3 , 4 , 5 , , ,MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
, ,HOME,PGDN,END , , , VOLU, ,LEFT,DOWN,RGHT, ,PIPE,
|
, 6 , 7 , 8 , 9 , 0 , DOT, ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||||
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
||||||
, , , , , , VOLD, ,MUTE, , ,
|
, , , , , , , , , , ,
|
||||||
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
||||||
),
|
),
|
||||||
|
[_FN] = LAYOUT_kc(
|
||||||
[_SIGN] = LAYOUT_kc(
|
|
||||||
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
|
||||||
TILD,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LBRC,RBRC, ,
|
, F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 , F10,F11 ,
|
||||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
RST , F1 , F2 , F3 , F4 , F5 , F6 , , , , ,LCBR,RCBR,PIPE,
|
, , , , , ,BRMU, , , ,PGUP, , , ,
|
||||||
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
|
||||||
, 1 , 2 , 3 , 4 , 5 , , BRUP, 6 , 7 , 8 , 9 , 0 , ,
|
, , , , , RST,BRMD, VOLU, ,CTRA,PGDN,CTRE, , ,
|
||||||
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
|
||||||
, , , , , , BRDN, , , , ,
|
, , , , , , VOLD,MUTE, , , ,
|
||||||
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
@@ -1,13 +1 @@
|
|||||||
# Code friendly 60% keymap
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
|
|
||||||
I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys.
|
|
||||||
|
|
||||||
The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement.
|
|
||||||
|
|
||||||
The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout.
|
|
||||||
|
|
||||||
Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc.
|
|
||||||
|
|
||||||
This keymap is also available for other keyboards:
|
|
||||||
- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c)
|
|
||||||
- [Iris/rs](../../../iris/keymaps/rs/keymap.c)
|
|
||||||
@@ -114,91 +114,79 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{0, E_16, D_16, F_16},
|
{0, E_16, D_16, F_16},
|
||||||
{0, B_16, A_16, C_16},
|
{0, B_16, A_16, C_16},
|
||||||
};
|
};
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
|
||||||
/* {row | col << 4}
|
led_config_t g_led_config = { {
|
||||||
* | {x=0..224, y=0..64}
|
{ 0, 1, 4, 5, 12, 13, 36, 20, 21, 24, 25, 16, 17, 28 },
|
||||||
* | | flags
|
{ 2, 6, 7, 14, 15, 37, 38, 22, 23, 26, 27, 18, 19, 30 },
|
||||||
* | | | */
|
{ 3, 8, 9, 32, 33, 39, 40, 44, 45, 48, 49, 52, 31, NO_LED },
|
||||||
|
{ 59, 10, 11, 34, 35, 41, 42, 46, 47, 50, 53, 54, 56, NO_LED },
|
||||||
|
{ 60, 61, 62, NO_LED, NO_LED, 43, 51, 55, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED }
|
||||||
|
}, {
|
||||||
//cs1
|
//cs1
|
||||||
{{0|(0<<4)}, { 0, 0}, 1},
|
{ 0, 0 }, { 17, 0 }, { 0, 16 }, { 0, 32 },
|
||||||
{{0|(1<<4)}, { 17, 0}, 4},
|
|
||||||
{{1|(0<<4)}, { 0, 16}, 1},
|
|
||||||
{{2|(0<<4)}, { 0, 32}, 1},
|
|
||||||
|
|
||||||
//cs2
|
//cs2
|
||||||
{{0|(2<<4)}, { 34, 0}, 4},
|
{ 34, 0 }, { 51, 0 }, { 17, 16 }, { 34, 16 },
|
||||||
{{0|(3<<4)}, { 51, 0}, 4},
|
|
||||||
{{1|(1<<4)}, { 17, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 34, 16}, 4},
|
|
||||||
//cs3
|
//cs3
|
||||||
{{2|(1<<4)}, { 17, 32}, 4},
|
{ 17, 32 }, { 34, 32 }, { 17, 48 }, { 34, 48 },
|
||||||
{{2|(2<<4)}, { 34, 32}, 4},
|
|
||||||
{{3|(1<<4)}, { 17, 48}, 4},
|
|
||||||
{{3|(2<<4)}, { 34, 48}, 4},
|
|
||||||
//cs4
|
//cs4
|
||||||
{{0|(4<<4)}, { 68, 0}, 4},
|
{ 68, 0 }, { 85, 0 }, { 51, 16 }, { 68, 16 },
|
||||||
{{0|(5<<4)}, { 85, 0}, 4},
|
|
||||||
{{1|(3<<4)}, { 51, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 68, 16}, 4},
|
|
||||||
//cs5
|
//cs5
|
||||||
{{0|(11<<4)}, {187, 0}, 4},
|
{ 187, 0 }, { 204, 0 }, { 187, 16 }, { 204, 16 },
|
||||||
{{0|(12<<4)}, {204, 0}, 4},
|
|
||||||
{{1|(11<<4)}, {187, 16}, 4},
|
|
||||||
{{1|(12<<4)}, {204, 16}, 4},
|
|
||||||
//cs6
|
//cs6
|
||||||
{{0|(7<<4)}, {119, 0}, 4},
|
{ 119, 0 }, { 136, 0 }, { 119, 16 }, { 136, 16 },
|
||||||
{{0|(8<<4)}, {136, 0}, 4},
|
|
||||||
{{1|(7<<4)}, {119, 16}, 4},
|
|
||||||
{{1|(8<<4)}, {136, 16}, 4},
|
|
||||||
//cs7
|
//cs7
|
||||||
{{0|(9<<4)}, {153, 0}, 4},
|
{ 153, 0 }, { 170, 0 }, { 153, 16 }, { 170, 16 },
|
||||||
{{0|(10<<4)}, {170, 0}, 4},
|
|
||||||
{{1|(9<<4)}, {153, 16}, 4},
|
|
||||||
{{1|(10<<4)}, {170, 16}, 4},
|
|
||||||
//cs8
|
//cs8
|
||||||
{{0|(13<<4)}, {221, 0}, 4},
|
{ 221, 0 }, { 221, 0 }, { 221, 32 }, { 221, 16 },
|
||||||
{{0|(14<<4)}, {221, 0}, 4},
|
|
||||||
{{1|(13<<4)}, {221, 32}, 1},
|
|
||||||
{{2|(12<<4)}, {221, 16}, 1},
|
|
||||||
//cs9
|
//cs9
|
||||||
{{2|(3<<4)}, { 51, 32}, 4},
|
{ 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 },
|
||||||
{{2|(4<<4)}, { 68, 32}, 4},
|
|
||||||
{{3|(3<<4)}, { 51, 48}, 4},
|
|
||||||
{{3|(4<<4)}, { 68, 48}, 4},
|
|
||||||
//cs10
|
//cs10
|
||||||
{{0|(6<<4)}, {102, 0}, 4},
|
{ 102, 0 }, { 85, 16 }, { 102, 16 }, { 85, 32 },
|
||||||
{{1|(5<<4)}, { 85, 16}, 4},
|
|
||||||
{{1|(6<<4)}, {102, 16}, 4},
|
|
||||||
{{2|(5<<4)}, { 85, 32}, 4},
|
|
||||||
//cs11
|
//cs11
|
||||||
{{2|(6<<4)}, {102, 32}, 4},
|
{ 102, 32 }, { 85, 48 }, { 102, 48 }, { 102, 64 },
|
||||||
{{3|(5<<4)}, { 85, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {102, 48}, 4},
|
|
||||||
{{4|(5<<4)}, {102, 64}, 4},
|
|
||||||
//cs12
|
//cs12
|
||||||
{{2|(7<<4)}, {119, 32}, 4},
|
{ 119, 32 }, { 136, 32 }, { 119, 48 }, { 136, 48 },
|
||||||
{{2|(8<<4)}, {136, 32}, 4},
|
|
||||||
{{3|(7<<4)}, {119, 48}, 4},
|
|
||||||
{{3|(8<<4)}, {136, 48}, 4},
|
|
||||||
//cs13
|
//cs13
|
||||||
{{2|(9<<4)}, {153, 32}, 4},
|
{ 153, 32 }, { 170, 32 }, { 153, 48 }, { 136, 48 },
|
||||||
{{2|(10<<4)}, {170, 32}, 4},
|
|
||||||
{{3|(9<<4)}, {153, 48}, 4},
|
|
||||||
{{4|(6<<4)}, {136, 48}, 1},
|
|
||||||
//cs14
|
//cs14
|
||||||
{{2|(11<<4)}, {187, 32}, 4},
|
{ 187, 32 }, { 170, 48 }, { 187, 48 }, { 153, 48 },
|
||||||
{{3|(10<<4)}, {170, 48}, 4},
|
|
||||||
{{3|(11<<4)}, {187, 48}, 1},
|
|
||||||
{{4|(7<<4)}, {153, 48}, 1},
|
|
||||||
//cs15
|
//cs15
|
||||||
{{3|(12<<4)}, {221, 48}, 1},
|
{ 221, 48 }, { 221, 64 }, { 204, 64 },
|
||||||
|
|
||||||
{{4|(9<<4)}, {221, 64}, 1},
|
|
||||||
{{4|(8<<4)}, {204, 64}, 1},
|
|
||||||
//cs16
|
//cs16
|
||||||
{{3|(0<<4)}, { 0, 48}, 1},
|
{ 0, 48 }, { 0, 64 }, { 17, 64 }, { 34, 64 }
|
||||||
{{4|(0<<4)}, { 0, 64}, 1},
|
}, {
|
||||||
{{4|(1<<4)}, { 17, 64}, 1},
|
//cs1
|
||||||
{{4|(2<<4)}, { 34, 64}, 1},
|
1, 4, 1, 1,
|
||||||
};
|
//cs2
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs3
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs4
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs5
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs6
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs7
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs8
|
||||||
|
4, 4, 1, 1,
|
||||||
|
//cs9
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs10
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs11
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs12
|
||||||
|
4, 4, 4, 4,
|
||||||
|
//cs13
|
||||||
|
4, 4, 4, 1,
|
||||||
|
//cs14
|
||||||
|
4, 4, 1, 1,
|
||||||
|
//cs15
|
||||||
|
1, 1, 1,
|
||||||
|
//cs16
|
||||||
|
1, 1, 1, 1
|
||||||
|
} };
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -9,23 +9,17 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
#include "drashna.h"
|
#include "drashna.h"
|
||||||
|
|
||||||
// Blank template at the bottom
|
|
||||||
|
|
||||||
enum customKeycodes {
|
|
||||||
URL = 1
|
|
||||||
};
|
|
||||||
|
|
||||||
#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
|
|
||||||
#define LAYOUT_gergo_base( \
|
#define LAYOUT_gergo_base( \
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A \
|
||||||
) \
|
) \
|
||||||
LAYOUT_gergo_wrapper( \
|
LAYOUT_gergo_wrapper( \
|
||||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_PIPE, \
|
||||||
KC_TAB, ALT_T(K11), K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, RGUI_T(KC_QUOT), \
|
KC_TAB, K11, K12, K13, K14, K15, _______, _______, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||||
_______, _______, KC_SPC, LT(_LOWER, KC_BSPC), LT(_RAISE, KC_DEL), KC_ENT, _______, _______ \
|
KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
|
||||||
)
|
)
|
||||||
|
|
||||||
#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__)
|
#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__)
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CONSOLE_ENABLE = no
|
||||||
|
COMMAND_ENABLE = no
|
||||||
@@ -19,24 +19,19 @@
|
|||||||
#include "haptic.h"
|
#include "haptic.h"
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#include "rgblight.h"
|
#include "rgb_matrix.h"
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
/*{row | col << 4}
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
| {x=0..224, y=0..64}
|
{ NO_LED, 6, NO_LED, NO_LED, 7, NO_LED, NO_LED, 8, NO_LED, NO_LED, 9, NO_LED, NO_LED, 0, NO_LED },
|
||||||
| | modifier
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
| | | */
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED },
|
||||||
{{1|(13<<4)}, {195, 3}, 4},
|
{ NO_LED, 5, NO_LED, NO_LED, 4, NO_LED, NO_LED, 3, NO_LED, NO_LED, 2, NO_LED, NO_LED, 1, NO_LED }
|
||||||
{{4|(13<<4)}, {195, 16}, 4},
|
}, {
|
||||||
{{4|(10<<4)}, {150, 16}, 4},
|
{ 195, 3 }, { 195, 16 }, { 150, 16 }, { 105, 16 }, { 60, 16 }, { 15, 16 }, { 15, 3 }, { 60, 3 }, { 105, 3 }, { 150, 3 }
|
||||||
{{4|(7<<4)}, {105, 16}, 4},
|
}, {
|
||||||
{{4|(4<<4)}, {60, 16}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4
|
||||||
{{4|(1<<4)}, {15, 16}, 4},
|
} };
|
||||||
{{1|(1<<4)}, {15, 3}, 4},
|
|
||||||
{{1|(4<<4)}, {60, 3}, 4},
|
|
||||||
{{1|(7<<4)}, {105, 3}, 4},
|
|
||||||
{{1|(10<<4)}, {150, 3}, 4}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -53,12 +48,12 @@ uint16_t counterst = 0;
|
|||||||
#define ScreenOffInterval 60000 /* milliseconds */
|
#define ScreenOffInterval 60000 /* milliseconds */
|
||||||
static uint16_t last_flush;
|
static uint16_t last_flush;
|
||||||
|
|
||||||
volatile uint8_t led_numlock = false;
|
volatile uint8_t led_numlock = false;
|
||||||
volatile uint8_t led_capslock = false;
|
volatile uint8_t led_capslock = false;
|
||||||
volatile uint8_t led_scrolllock = false;
|
volatile uint8_t led_scrolllock = false;
|
||||||
|
|
||||||
static uint8_t layer;
|
static uint8_t layer;
|
||||||
static bool queue_for_send = false;
|
static bool queue_for_send = false;
|
||||||
static uint8_t encoder_value = 32;
|
static uint8_t encoder_value = 32;
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
@@ -69,7 +64,7 @@ void draw_ui(void) {
|
|||||||
|
|
||||||
/* Layer indicator is 41 x 10 pixels */
|
/* Layer indicator is 41 x 10 pixels */
|
||||||
#define LAYER_INDICATOR_X 5
|
#define LAYER_INDICATOR_X 5
|
||||||
#define LAYER_INDICATOR_Y 0
|
#define LAYER_INDICATOR_Y 0
|
||||||
|
|
||||||
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
draw_string(LAYER_INDICATOR_X + 1, LAYER_INDICATOR_Y + 2, "LAYER", PIXEL_ON, NORM, 0);
|
||||||
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
draw_rect_filled_soft(LAYER_INDICATOR_X + 32, LAYER_INDICATOR_Y + 1, 9, 9, PIXEL_ON, NORM);
|
||||||
@@ -83,7 +78,7 @@ void draw_ui(void) {
|
|||||||
for (uint8_t y = 0; y < MATRIX_COLS; y++) {
|
for (uint8_t y = 0; y < MATRIX_COLS; y++) {
|
||||||
draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM);
|
draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM);
|
||||||
/* hadron oled location on thumbnail */
|
/* hadron oled location on thumbnail */
|
||||||
draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM);
|
draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM);
|
||||||
@@ -162,7 +157,7 @@ void read_host_led_state(void) {
|
|||||||
if (led_capslock == false){
|
if (led_capslock == false){
|
||||||
led_capslock = true;}
|
led_capslock = true;}
|
||||||
} else {
|
} else {
|
||||||
if (led_capslock == true){
|
if (led_capslock == true){
|
||||||
led_capslock = false;}
|
led_capslock = false;}
|
||||||
}
|
}
|
||||||
if (leds & (1 << USB_LED_SCROLL_LOCK)) {
|
if (leds & (1 << USB_LED_SCROLL_LOCK)) {
|
||||||
@@ -197,7 +192,7 @@ void matrix_init_kb(void) {
|
|||||||
queue_for_send = true;
|
queue_for_send = true;
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void) {
|
void matrix_scan_kb(void) {
|
||||||
if (queue_for_send) {
|
if (queue_for_send) {
|
||||||
#ifdef QWIIC_MICRO_OLED_ENABLE
|
#ifdef QWIIC_MICRO_OLED_ENABLE
|
||||||
|
|||||||
+63
-155
@@ -165,83 +165,37 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{1, C9_16, C7_15, C6_15} //D16
|
{1, C9_16, C7_15, C6_15} //D16
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
//
|
{ 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
|
{ 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED },
|
||||||
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15,
|
{ 48, 49, 50, 51, 52, 45, 44, 20, 21, 22, 23, 15, 14, 13 },
|
||||||
// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, ---, A14,
|
{ 47, NO_LED, 46, 53, 54, 55, 56, 19, 18, 17, 16, 24, NO_LED, 25 },
|
||||||
// D3, ---, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10,
|
{ 60, 59, 58, 57, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 }
|
||||||
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
|
}, {
|
||||||
/* {row | col << 4}
|
//A1-A16
|
||||||
* | {x=0..224, y=0..64}
|
{ 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 32 },
|
||||||
* | | flags
|
{ 224, 16 }, { 197, 32 },
|
||||||
* | | | */
|
//B1-B14
|
||||||
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
|
{ 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 },
|
||||||
{{0|(12<<4)}, {204, 0}, 4},
|
//C1-C16
|
||||||
{{0|(11<<4)}, {187, 0}, 4},
|
{ 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 },
|
||||||
{{0|(10<<4)}, {170, 0}, 4},
|
{ 102, 32 }, { 85, 32 },
|
||||||
{{0|(9<<4)}, {153, 0}, 4},
|
//D1-D16
|
||||||
{{0|(8<<4)}, {136, 0}, 4},
|
{ 32, 48 }, { 10, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 }, { 17, 68 },
|
||||||
{{0|(7<<4)}, {119, 0}, 4},
|
{ 0, 68 }
|
||||||
{{1|(7<<4)}, {119, 16}, 4},
|
}, {
|
||||||
{{1|(8<<4)}, {136, 16}, 4},
|
//A1-A16
|
||||||
{{1|(9<<4)}, {153, 16}, 4},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{1|(10<<4)}, {170, 16}, 4},
|
4, 4,
|
||||||
{{1|(11<<4)}, {187, 16}, 4},
|
//B1-B14
|
||||||
{{1|(12<<4)}, {204, 16}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1,
|
||||||
{{2|(13<<4)}, {224, 32}, 1},
|
//C1-C16
|
||||||
{{2|(12<<4)}, {224, 16}, 4},
|
4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4,
|
||||||
{{2|(11<<4)}, {197, 32}, 4},
|
4, 4,
|
||||||
|
//D1-D16
|
||||||
{{3|(10<<4)}, {170, 48}, 4}, //B1-B14
|
4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1,
|
||||||
{{3|(9<<4)}, {153, 48}, 4},
|
1
|
||||||
{{3|(8<<4)}, {136, 48}, 4},
|
} };
|
||||||
{{3|(7<<4)}, {119, 48}, 4},
|
|
||||||
{{2|(7<<4)}, {119, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {136, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {153, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {170, 32}, 4},
|
|
||||||
{{3|(11<<4)}, {187, 48}, 4},
|
|
||||||
{{3|(13<<4)}, {214, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {224, 64}, 1},
|
|
||||||
{{4|(12<<4)}, {204, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {187, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {170, 64}, 1},
|
|
||||||
|
|
||||||
{{0|(6<<4)}, {102, 0}, 4}, //C1-C16
|
|
||||||
{{0|(5<<4)}, { 85, 0}, 4},
|
|
||||||
{{0|(4<<4)}, { 68, 0}, 4},
|
|
||||||
{{0|(3<<4)}, { 51, 0}, 4},
|
|
||||||
{{0|(2<<4)}, { 34, 0}, 4},
|
|
||||||
{{0|(1<<4)}, { 17, 0}, 4},
|
|
||||||
{{0|(0<<4)}, { 0, 0}, 1},
|
|
||||||
{{1|(0<<4)}, { 0, 16}, 1},
|
|
||||||
{{1|(1<<4)}, { 17, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 34, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 51, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 68, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 85, 16}, 4},
|
|
||||||
{{1|(6<<4)}, {102, 16}, 4},
|
|
||||||
{{2|(6<<4)}, {102, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 85, 32}, 4},
|
|
||||||
|
|
||||||
{{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
|
|
||||||
//D2
|
|
||||||
{{3|(0<<4)}, { 10, 48}, 1},
|
|
||||||
{{2|(0<<4)}, { 0, 32}, 1},
|
|
||||||
{{2|(1<<4)}, { 17, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 34, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 51, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 68, 32}, 4},
|
|
||||||
{{3|(3<<4)}, { 51, 48}, 4},
|
|
||||||
{{3|(4<<4)}, { 68, 48}, 4},
|
|
||||||
{{3|(5<<4)}, { 85, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {102, 48}, 4},
|
|
||||||
{{4|(3<<4)}, {102, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 34, 68}, 1},
|
|
||||||
{{4|(1<<4)}, { 17, 68}, 1},
|
|
||||||
{{4|(0<<4)}, { 0, 68}, 1}
|
|
||||||
};
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@@ -319,83 +273,37 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{1, C9_16, C7_15, C6_15} //D16
|
{1, C9_16, C7_15, C6_15} //D16
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
//
|
{ 36, 35, 34, 33, 32, 31, 30, 6, 5, 4, 3, 2, 1, 0 },
|
||||||
// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1,
|
{ 37, 38, 39, 40, 41, 42, 43, 7, 8, 9, 10, 11, 12, NO_LED },
|
||||||
// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---,
|
{ 49, 50, 51, 52, 53, 45, 44, 20, 21, 22, 23, 15, 14, 13 },
|
||||||
// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, A15, A14,
|
{ 48, 47, 46, 54, 55, 56, 57, 19, 18, 17, 16, 24, NO_LED, 25 },
|
||||||
// D3, D2, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10,
|
{ 61, 60, 59, 58, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 29, 28, 27, 26 }
|
||||||
// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11
|
}, {
|
||||||
/* {row | col << 4}
|
//A1-A16
|
||||||
* | {x=0..224, y=0..64}
|
{ 224, 0 }, { 204, 0 }, { 187, 0 }, { 170, 0 }, { 153, 0 }, { 136, 0 }, { 119, 0 }, { 119, 16 }, { 136, 16 }, { 153, 16 }, { 170, 16 }, { 187, 16 }, { 204, 16 }, { 224, 8 },
|
||||||
* | | flags
|
{ 204, 32 }, { 187, 32 },
|
||||||
* | | | */
|
//B1-B14
|
||||||
{{0|(13<<4)}, {224, 0}, 1}, //A1-A16
|
{ 170, 48 }, { 153, 48 }, { 136, 48 }, { 119, 48 }, { 119, 32 }, { 136, 32 }, { 153, 32 }, { 170, 32 }, { 187, 48 }, { 214, 48 }, { 224, 64 }, { 204, 64 }, { 187, 64 }, { 170, 64 },
|
||||||
{{0|(12<<4)}, {204, 0}, 4},
|
//C1-C16
|
||||||
{{0|(11<<4)}, {187, 0}, 4},
|
{ 102, 0 }, { 85, 0 }, { 68, 0 }, { 51, 0 }, { 34, 0 }, { 17, 0 }, { 0, 0 }, { 0, 16 }, { 17, 16 }, { 34, 16 }, { 51, 16 }, { 68, 16 }, { 85, 16 }, { 102, 16 },
|
||||||
{{0|(10<<4)}, {170, 0}, 4},
|
{ 102, 32 }, { 85, 32 },
|
||||||
{{0|(9<<4)}, {153, 0}, 4},
|
//D1-D16
|
||||||
{{0|(8<<4)}, {136, 0}, 4},
|
{ 32, 48 }, { 17, 48 }, { 0, 48 }, { 0, 32 }, { 17, 32 }, { 34, 32 }, { 51, 32 }, { 68, 32 }, { 51, 48 }, { 68, 48 }, { 85, 48 }, { 102, 48 }, { 102, 64 }, { 34, 68 },
|
||||||
{{0|(7<<4)}, {119, 0}, 4},
|
{ 17, 68 }, { 0, 68 }
|
||||||
{{1|(7<<4)}, {119, 16}, 4},
|
}, {
|
||||||
{{1|(8<<4)}, {136, 16}, 4},
|
//A1-A16
|
||||||
{{1|(9<<4)}, {153, 16}, 4},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{1|(10<<4)}, {170, 16}, 4},
|
4, 4,
|
||||||
{{1|(11<<4)}, {187, 16}, 4},
|
//B1-B14
|
||||||
{{1|(12<<4)}, {204, 16}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, 1, 1,
|
||||||
{{2|(13<<4)}, {224, 8}, 1},
|
//C1-C16
|
||||||
{{2|(12<<4)}, {204, 32}, 4},
|
4, 4, 4, 4, 4, 4, 1, 1, 4, 4, 4, 4, 4, 4,
|
||||||
{{2|(11<<4)}, {187, 32}, 4},
|
4, 4,
|
||||||
|
//D1-D16
|
||||||
{{3|(10<<4)}, {170, 48}, 4}, //B1-B14
|
4, 4, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{3|(9<<4)}, {153, 48}, 4},
|
1, 1
|
||||||
{{3|(8<<4)}, {136, 48}, 4},
|
} };
|
||||||
{{3|(7<<4)}, {119, 48}, 4},
|
|
||||||
{{2|(7<<4)}, {119, 32}, 4},
|
|
||||||
{{2|(8<<4)}, {136, 32}, 4},
|
|
||||||
{{2|(9<<4)}, {153, 32}, 4},
|
|
||||||
{{2|(10<<4)}, {170, 32}, 4},
|
|
||||||
{{3|(11<<4)}, {187, 48}, 4},
|
|
||||||
{{3|(13<<4)}, {214, 48}, 1},
|
|
||||||
{{4|(13<<4)}, {224, 64}, 1},
|
|
||||||
{{4|(12<<4)}, {204, 64}, 1},
|
|
||||||
{{4|(11<<4)}, {187, 64}, 1},
|
|
||||||
{{4|(10<<4)}, {170, 64}, 1},
|
|
||||||
|
|
||||||
{{0|(6<<4)}, {102, 0}, 4}, //C1-C16
|
|
||||||
{{0|(5<<4)}, { 85, 0}, 4},
|
|
||||||
{{0|(4<<4)}, { 68, 0}, 4},
|
|
||||||
{{0|(3<<4)}, { 51, 0}, 4},
|
|
||||||
{{0|(2<<4)}, { 34, 0}, 4},
|
|
||||||
{{0|(1<<4)}, { 17, 0}, 4},
|
|
||||||
{{0|(0<<4)}, { 0, 0}, 1},
|
|
||||||
{{1|(0<<4)}, { 0, 16}, 1},
|
|
||||||
{{1|(1<<4)}, { 17, 16}, 4},
|
|
||||||
{{1|(2<<4)}, { 34, 16}, 4},
|
|
||||||
{{1|(3<<4)}, { 51, 16}, 4},
|
|
||||||
{{1|(4<<4)}, { 68, 16}, 4},
|
|
||||||
{{1|(5<<4)}, { 85, 16}, 4},
|
|
||||||
{{1|(6<<4)}, {102, 16}, 4},
|
|
||||||
{{2|(6<<4)}, {102, 32}, 4},
|
|
||||||
{{2|(5<<4)}, { 85, 32}, 4},
|
|
||||||
|
|
||||||
{{3|(2<<4)}, { 32, 48}, 4}, //D1-D16
|
|
||||||
{{3|(1<<4)}, { 17, 48}, 4},
|
|
||||||
{{3|(0<<4)}, { 0, 48}, 1},
|
|
||||||
{{2|(0<<4)}, { 0, 32}, 1},
|
|
||||||
{{2|(1<<4)}, { 17, 32}, 4},
|
|
||||||
{{2|(2<<4)}, { 34, 32}, 4},
|
|
||||||
{{2|(3<<4)}, { 51, 32}, 4},
|
|
||||||
{{2|(4<<4)}, { 68, 32}, 4},
|
|
||||||
{{3|(3<<4)}, { 51, 48}, 4},
|
|
||||||
{{3|(4<<4)}, { 68, 48}, 4},
|
|
||||||
{{3|(5<<4)}, { 85, 48}, 4},
|
|
||||||
{{3|(6<<4)}, {102, 48}, 4},
|
|
||||||
{{4|(3<<4)}, {102, 64}, 4},
|
|
||||||
{{4|(2<<4)}, { 34, 68}, 1},
|
|
||||||
{{4|(1<<4)}, { 17, 68}, 1},
|
|
||||||
{{4|(0<<4)}, { 0, 68}, 1}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -492,4 +400,4 @@ void suspend_power_down_kb(void)
|
|||||||
void suspend_wakeup_init_kb(void)
|
void suspend_wakeup_init_kb(void)
|
||||||
{
|
{
|
||||||
rgb_matrix_set_suspend_state(false);
|
rgb_matrix_set_suspend_state(false);
|
||||||
}
|
}
|
||||||
@@ -16,15 +16,26 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
/*
|
||||||
|
| Knob 1: Vol Dn/Up | | Knob 2: Page Dn/Up |
|
||||||
|
| Press: Mute | Home | Press: Play/Pause |
|
||||||
|
| Hold: Layer 2 | Up | RGB Mode |
|
||||||
|
| Left | Down | Right |
|
||||||
|
*/
|
||||||
[0] = LAYOUT(
|
[0] = LAYOUT(
|
||||||
KC_MUTE, KC_HOME, KC_MPLY, \
|
KC_MUTE, KC_HOME, KC_MPLY,
|
||||||
MO(1), KC_UP, RGB_MOD, \
|
MO(1) , KC_UP , RGB_MOD,
|
||||||
KC_LEFT, KC_DOWN, KC_RGHT \
|
KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
),
|
),
|
||||||
|
/*
|
||||||
|
| RESET | N/A | Media Stop |
|
||||||
|
| Held: Layer 2 | Home | RGB Mode |
|
||||||
|
| Media Previous | End | Media Next |
|
||||||
|
*/
|
||||||
[1] = LAYOUT(
|
[1] = LAYOUT(
|
||||||
RESET, BL_STEP, KC_STOP, \
|
RESET , BL_STEP, KC_STOP,
|
||||||
_______, KC_HOME, RGB_MOD, \
|
_______, KC_HOME, RGB_MOD,
|
||||||
KC_MPRV, KC_END, KC_MNXT \
|
KC_MPRV, KC_END , KC_MNXT
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// Macro keys for some apps
|
||||||
|
#define SLACKUP LALT(LSFT(KC_UP))
|
||||||
|
#define SLACKDN LALT(LSFT(KC_DOWN))
|
||||||
|
#define RELOAD LGUI(KC_R)
|
||||||
|
|
||||||
|
enum custom_keycodes {
|
||||||
|
PAWFIVE = SAFE_RANGE
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[0] = LAYOUT(
|
||||||
|
RESET , PAWFIVE, RELOAD ,
|
||||||
|
SLACKUP, KC_UP , KC_PGUP,
|
||||||
|
SLACKDN, KC_DOWN, KC_PGDN
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Call the post init code.
|
||||||
|
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||||
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL); // sets mode to Slow breathing without saving
|
||||||
|
}
|
||||||
|
|
||||||
|
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
switch (keycode) {
|
||||||
|
case PAWFIVE:
|
||||||
|
if (record->event.pressed) {
|
||||||
|
SEND_STRING("+:pawfive:\n");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
// Tab right
|
||||||
|
tap_code16(LSFT(LGUI(KC_RBRC)));
|
||||||
|
} else {
|
||||||
|
// Tab left
|
||||||
|
tap_code16(LSFT(LGUI(KC_LBRC)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
// History forward
|
||||||
|
tap_code16(LGUI(KC_RBRC));
|
||||||
|
} else {
|
||||||
|
// History back
|
||||||
|
tap_code16(LGUI(KC_LBRC));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,172 @@
|
|||||||
|
/* Copyright 2019 Chuck Lauer Vose <[email protected]>
|
||||||
|
*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
|
// // Debugging
|
||||||
|
// #include <print.h>
|
||||||
|
|
||||||
|
#define BASE TO(_BASE)
|
||||||
|
#define PANIC TO(_PANIC)
|
||||||
|
#define FLIGHT TO(_FLIGHT)
|
||||||
|
#define RCS TO(_RCS)
|
||||||
|
|
||||||
|
enum my_layers {
|
||||||
|
_BASE = 0,
|
||||||
|
_PANIC,
|
||||||
|
_FLIGHT,
|
||||||
|
_RCS
|
||||||
|
};
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_BASE] = LAYOUT(
|
||||||
|
KC_MUTE, PANIC , XXXXXXX,
|
||||||
|
FLIGHT , XXXXXXX, RCS ,
|
||||||
|
XXXXXXX, XXXXXXX, XXXXXXX
|
||||||
|
),
|
||||||
|
[_PANIC] = LAYOUT(
|
||||||
|
RESET , BASE , XXXXXXX,
|
||||||
|
_______, XXXXXXX, _______,
|
||||||
|
KC_F2 , KC_F5 , KC_F9
|
||||||
|
),
|
||||||
|
[_FLIGHT] = LAYOUT(
|
||||||
|
XXXXXXX, _______, KC_M ,
|
||||||
|
BASE , KC_W , _______,
|
||||||
|
KC_A , KC_S , KC_D
|
||||||
|
),
|
||||||
|
[_RCS] = LAYOUT(
|
||||||
|
XXXXXXX, _______, XXXXXXX,
|
||||||
|
_______, KC_I , BASE ,
|
||||||
|
KC_J , KC_K , KC_L
|
||||||
|
)
|
||||||
|
};
|
||||||
|
|
||||||
|
bool base_mode = false;
|
||||||
|
bool panic_mode = false;
|
||||||
|
bool flight_mode = false;
|
||||||
|
bool rcs_mode = false;
|
||||||
|
|
||||||
|
uint32_t layer_state_set_user(uint32_t state) {
|
||||||
|
base_mode = false;
|
||||||
|
panic_mode = false;
|
||||||
|
flight_mode = false;
|
||||||
|
rcs_mode = false;
|
||||||
|
|
||||||
|
switch (biton32(state)) {
|
||||||
|
case _PANIC:
|
||||||
|
panic_mode = true; // For use in encoder evaluation
|
||||||
|
rgblight_sethsv_noeeprom(HSV_RED);
|
||||||
|
break;
|
||||||
|
case _FLIGHT:
|
||||||
|
flight_mode = true; // For use in encoder evaluation
|
||||||
|
rgblight_sethsv_noeeprom(HSV_CYAN);
|
||||||
|
break;
|
||||||
|
case _RCS:
|
||||||
|
rcs_mode = true; // For use in encoder evaluation
|
||||||
|
rgblight_sethsv_noeeprom(HSV_BLUE);
|
||||||
|
break;
|
||||||
|
default: // for any other layers, or the default layer
|
||||||
|
base_mode = true;
|
||||||
|
rgblight_sethsv_noeeprom(HSV_SPRINGGREEN);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
|
||||||
|
void keyboard_post_init_user(void) {
|
||||||
|
// Call the post init code.
|
||||||
|
rgblight_enable_noeeprom(); // enables Rgb, without saving settings
|
||||||
|
rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING + 1); // sets mode to Slow breathing without saving
|
||||||
|
rgblight_sethsv_noeeprom(HSV_SPRINGGREEN);
|
||||||
|
}
|
||||||
|
|
||||||
|
// bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
// switch (keycode) {
|
||||||
|
// uprintf("Keycode: %s\n", keycode);
|
||||||
|
// if (record->event.pressed) {
|
||||||
|
// print("pressed");
|
||||||
|
// // Do something when pressed
|
||||||
|
// } else {
|
||||||
|
// print("unpressed");
|
||||||
|
// // Do something else when release
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
|
||||||
|
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||||
|
if(base_mode == true) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
// Volume up
|
||||||
|
tap_code(KC_VOLU);
|
||||||
|
} else {
|
||||||
|
// Volume down
|
||||||
|
tap_code(KC_VOLD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
// Time warp faster
|
||||||
|
tap_code(KC_DOT);
|
||||||
|
} else {
|
||||||
|
// Time warp slower
|
||||||
|
tap_code(KC_COMM);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(rcs_mode == true) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
// RCS Forward
|
||||||
|
tap_code(KC_H);
|
||||||
|
} else {
|
||||||
|
// RCS Backward
|
||||||
|
tap_code(KC_N);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
// RCS Rotate Left
|
||||||
|
tap_code(KC_Q);
|
||||||
|
} else {
|
||||||
|
// RCS Rotate Right
|
||||||
|
tap_code(KC_E);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(flight_mode == true) {
|
||||||
|
if (index == 0) {
|
||||||
|
if (clockwise) {
|
||||||
|
// Throttle up
|
||||||
|
tap_code(KC_LSFT);
|
||||||
|
} else {
|
||||||
|
// Throttle down
|
||||||
|
tap_code(KC_LCTL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (index == 1) {
|
||||||
|
if (clockwise) {
|
||||||
|
// Trim left
|
||||||
|
tap_code16(LALT(KC_A));
|
||||||
|
} else {
|
||||||
|
// Trim right
|
||||||
|
tap_code16(LALT(KC_D));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -29,24 +29,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define EE_HANDS
|
#define EE_HANDS
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 18 // Number of LEDs
|
# define RGBLED_NUM 18 // Number of LEDs
|
||||||
#define RGBLED_SPLIT { 9, 9 }
|
# define RGBLED_SPLIT { 9, 9 }
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
# define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
# define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
# define RGBLIGHT_VAL_STEP 12
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
|
||||||
|
|
||||||
#define RGBLIGHT_LIMIT_VAL 225
|
# define RGBLIGHT_LIMIT_VAL 225
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define C6_AUDIO
|
# define C6_AUDIO
|
||||||
#ifdef RGBLIGHT_ENABLE
|
# ifdef RGBLIGHT_ENABLE
|
||||||
#define NO_MUSIC_MODE
|
# define NO_MUSIC_MODE
|
||||||
#endif //RGBLIGHT_ENABLE
|
# endif //RGBLIGHT_ENABLE
|
||||||
#endif //AUDIO_ENABLE
|
#endif //AUDIO_ENABLE
|
||||||
|
|
||||||
#define QMK_ESC_OUTPUT F6 // usually COL
|
#define QMK_ESC_OUTPUT F6 // usually COL
|
||||||
@@ -56,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#ifdef KEYBOARD_keebio_iris_rev2
|
#ifdef KEYBOARD_keebio_iris_rev2
|
||||||
#define PRODUCT Drashna Hacked Iris Rev.2
|
# define PRODUCT Drashna Hacked Iris Rev.2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SHFT_LED1 6
|
#define SHFT_LED1 6
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||||
KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
KC_TAB , K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, OS_LALT, OS_RGUI, K26, K27, K28, K29, RCTL_T(K2A), OS_RSFT, \
|
||||||
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE \
|
||||||
)
|
)
|
||||||
#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__)
|
#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__)
|
||||||
@@ -113,22 +113,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
void matrix_init_keymap(void) {
|
||||||
#ifndef CONVERT_TO_PROTON_C
|
#ifndef CONVERT_TO_PROTON_C
|
||||||
setPinOutput(D5);
|
setPinOutput(D5);
|
||||||
writePinHigh(D5);
|
writePinHigh(D5);
|
||||||
|
|
||||||
setPinOutput(B0);
|
setPinOutput(B0);
|
||||||
writePinHigh(B0);
|
writePinHigh(B0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void keyboard_post_init_keymap(void) {
|
void keyboard_post_init_keymap(void) {
|
||||||
#if BACKLIGHT_ENABLE
|
#if BACKLIGHT_ENABLE
|
||||||
backlight_enable();
|
backlight_enable();
|
||||||
backlight_level(5);
|
backlight_level(5);
|
||||||
#ifdef BACKLIGHT_BREATHING
|
#ifdef BACKLIGHT_BREATHING
|
||||||
breathing_enable();
|
breathing_enable();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ AUDIO_ENABLE = no
|
|||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = no
|
||||||
SWAP_HANDS_ENABLE = no
|
SWAP_HANDS_ENABLE = no
|
||||||
|
SPACE_CADET_ENABLE = no
|
||||||
|
|
||||||
INDICATOR_LIGHTS = no
|
INDICATOR_LIGHTS = no
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "../drashna/config.h"
|
#include "../drashna/config.h"
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 16 // Number of LEDs
|
# define RGBLED_NUM 16 // Number of LEDs
|
||||||
#undef RGBLED_SPLIT
|
# undef RGBLED_SPLIT
|
||||||
#define RGBLED_SPLIT { 8, 8 }
|
# define RGBLED_SPLIT { 8, 8 }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#ifdef KEYBOARD_keebio_iris_rev2
|
#ifdef KEYBOARD_keebio_iris_rev2
|
||||||
#define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
|
# define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef SHFT_LED1
|
#undef SHFT_LED1
|
||||||
|
|||||||
@@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "../drashna/config.h"
|
#include "../drashna/config.h"
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 16 // Number of LEDs
|
# define RGBLED_NUM 16 // Number of LEDs
|
||||||
#undef RGBLED_SPLIT
|
# undef RGBLED_SPLIT
|
||||||
#define RGBLED_SPLIT { 8, 8 }
|
# define RGBLED_SPLIT { 8, 8 }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#ifdef KEYBOARD_keebio_iris_rev2
|
#ifdef KEYBOARD_keebio_iris_rev2
|
||||||
#define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
|
# define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef SHFT_LED1
|
#undef SHFT_LED1
|
||||||
|
|||||||
@@ -35,4 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define RGBLIGHT_SLEEP
|
#define RGBLIGHT_SLEEP
|
||||||
#define RGBLIGHT_HUE_STEP 1
|
#define RGBLIGHT_HUE_STEP 1
|
||||||
#define RGBLIGHT_SAT_STEP 1
|
#define RGBLIGHT_SAT_STEP 1
|
||||||
#define RGBLIGHT_VAL_STEP 1
|
#define RGBLIGHT_VAL_STEP 1
|
||||||
@@ -1,48 +1,45 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rs.h"
|
||||||
enum layers {
|
|
||||||
_QWERTY,
|
|
||||||
_HYPER,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
|
||||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
|
||||||
#define KC_HYPE MO(_HYPER)
|
|
||||||
#define KC_RST RESET
|
|
||||||
// Brightness
|
|
||||||
#define KC_BRUP KC_PAUS
|
|
||||||
#define KC_BRDN KC_SLCK
|
|
||||||
#define KC_BLTG BL_TOGG
|
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_kc(
|
[_QWERTY] = LAYOUT_kc(
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
|
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL,
|
TAB , Q , W , E , R , T , Y , U , I , O , P ,EQL ,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
ESCC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT,
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
LSFT, Z , X , C , V , B ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
|
LSFT, Z , X , C , V , B ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
LALT,LGUI,SPC, BSPC,HYPE,ENT
|
LALT,LGUI,SPC , BSPC,CODE,FN
|
||||||
// `----+----+----' `+---+----+----'
|
// `----+----+----' `+---+----+----'
|
||||||
), // |
|
),
|
||||||
// |
|
[_CODE] = LAYOUT_kc(
|
||||||
[_HYPER] = LAYOUT_kc( // V
|
|
||||||
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 ,LBRC,RBRC, ,
|
, , , , , , , , , , , ,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
, , ,PGUP, ,BRUP, , , UP ,LCBR,RCBR,BSLS,
|
GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
|
||||||
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
, ,HOME,PGDN,END ,BRDN, MINS,LEFT,DOWN,RGHT, ,PIPE,
|
, 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
|
||||||
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
, , , , , ,BLTG, VOLU, , , , , , ,
|
, 6 , 7 , 8 , 9 , 0 , , ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
|
||||||
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
, , , VOLD, ,MUTE
|
, , DOT, , ,
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT_kc(
|
||||||
|
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
|
||||||
|
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
, , , , , , , , , , , ,
|
||||||
|
//|----+----+----+----+----+----| |----+----+----+----+----+----|
|
||||||
|
BLTG,BLUP, , , ,BRMU, , ,PGUP, , , ,
|
||||||
|
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
|
||||||
|
,BLDN, , ,RST ,BRMD, , VOLU, ,CTRA,PGDN,CTRE, , ,
|
||||||
|
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
|
||||||
|
, , , VOLD,MUTE,
|
||||||
// `----+----+----' `----+----+----'
|
// `----+----+----' `----+----+----'
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,13 +1 @@
|
|||||||
# Code friendly 60% keymap
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
|
|
||||||
I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys.
|
|
||||||
|
|
||||||
The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement.
|
|
||||||
|
|
||||||
The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout.
|
|
||||||
|
|
||||||
Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc.
|
|
||||||
|
|
||||||
This keymap is also available for other keyboards:
|
|
||||||
- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c)
|
|
||||||
- [ErgoTravel/rs](../../../ergotravel/keymaps/rs/keymap.c)
|
|
||||||
@@ -1 +1,2 @@
|
|||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
@@ -21,35 +21,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#define MATRIX_ROWS 5
|
#define MATRIX_ROWS 5
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 16
|
# define RGBLED_NUM 16
|
||||||
|
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
# define RGBLIGHT_HUE_STEP 8
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
# define RGBLIGHT_SAT_STEP 8
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
# define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
|
||||||
#undef LOCKING_SUPPORT_ENABLE
|
|
||||||
#undef LOCKING_RESYNC_ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
/* disable action features */
|
|
||||||
//#define NO_ACTION_LAYER
|
|
||||||
//#define NO_ACTION_TAPPING
|
|
||||||
//#define NO_ACTION_ONESHOT
|
|
||||||
//#define NO_ACTION_MACRO
|
|
||||||
//#define NO_ACTION_FUNCTION
|
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#define PRODUCT Drashnas Viterbi Macro Pad
|
#define PRODUCT Drashnas Viterbi Macro Pad
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define C6_AUDIO
|
# define C6_AUDIO
|
||||||
#define NO_MUSIC_MODE
|
# define NO_MUSIC_MODE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LAYOUT_ortho_5x7( \
|
#define LAYOUT_ortho_5x7( \
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ RGBLIGHT_ENABLE = yes
|
|||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
SPLIT_KEYBOARD = no
|
SPLIT_KEYBOARD = no
|
||||||
|
SPACE_CADET_ENABLE = no
|
||||||
|
|
||||||
NO_SECRETS = yes
|
NO_SECRETS = yes
|
||||||
MACROS_ENABLED = yes
|
MACROS_ENABLED = yes
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "../drashna/config.h"
|
#include "../drashna/config.h"
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLED_NUM 12
|
# define RGBLED_NUM 12
|
||||||
#endif
|
#endif
|
||||||
@@ -20,123 +20,34 @@
|
|||||||
//
|
//
|
||||||
// There is a quick-and-dirty implementation of this under ledvis.html
|
// There is a quick-and-dirty implementation of this under ledvis.html
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
/* 0 */ { { (0)|(0 << 4) }, { 8, 56 }, 4 }, // KC_ESC
|
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 },
|
||||||
/* 1 */ { { (0)|(1 << 4) }, { 22, 56 }, 4 }, // KC_1
|
{ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29 },
|
||||||
/* 2 */ { { (0)|(2 << 4) }, { 35, 56 }, 4 }, // KC_2
|
{ 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, NO_LED, 42, 43 },
|
||||||
/* 3 */ { { (0)|(3 << 4) }, { 49, 56 }, 4 }, // KC_3
|
{ 44, NO_LED, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||||
/* 4 */ { { (0)|(4 << 4) }, { 63, 56 }, 4 }, // KC_4
|
{ 58, 59, 60, NO_LED, NO_LED, NO_LED, 61, NO_LED, NO_LED, NO_LED, 62, 63, 64, 65, 66 }
|
||||||
/* 5 */ { { (0)|(5 << 4) }, { 77, 56 }, 4 }, // KC_5
|
}, {
|
||||||
/* 6 */ { { (0)|(6 << 4) }, { 91, 56 }, 4 }, // KC_6
|
{ 8, 56 }, { 22, 56 }, { 35, 56 }, { 49, 56 }, { 63, 56 }, { 77, 56 }, { 91, 56 }, { 105, 56 }, { 118, 56 }, { 132, 56 }, { 146, 56 }, { 160, 56 }, { 174, 56 }, { 195, 56 }, { 215, 56 },
|
||||||
/* 7 */ { { (0)|(7 << 4) }, { 105, 56 }, 4 }, // KC_7
|
{ 11, 44 }, { 28, 44 }, { 42, 44 }, { 56, 44 }, { 70, 44 }, { 84, 44 }, { 98, 44 }, { 112, 44 }, { 125, 44 }, { 139, 44 }, { 153, 44 }, { 167, 44 }, { 181, 44 }, { 198, 44 }, { 215, 44 },
|
||||||
/* 8 */ { { (0)|(8 << 4) }, { 118, 56 }, 4 }, // KC_8
|
{ 13, 32 }, { 32, 32 }, { 46, 32 }, { 60, 32 }, { 73, 32 }, { 87, 32 }, { 101, 32 }, { 115, 32 }, { 129, 32 }, { 143, 32 }, { 156, 32 }, { 170, 32 }, { 193, 32 }, { 215, 32 }, { 16, 19 },
|
||||||
/* 9 */ { { (0)|(9 << 4) }, { 132, 56 }, 4 }, // KC_9
|
{ 39, 19 }, { 53, 19 }, { 67, 19 }, { 80, 19 }, { 94, 19 }, { 108, 19 }, { 122, 19 }, { 136, 19 }, { 150, 19 }, { 163, 19 }, { 182, 19 }, { 201, 19 }, { 215, 19 }, { 9, 7 }, { 27, 7 },
|
||||||
/* 10 */ { { (0)|(10 << 4) }, { 146, 56 }, 4 }, // KC_0
|
{ 44, 7 }, { 96, 7 }, { 148, 7 }, { 165, 7 }, { 188, 7 }, { 201, 7 }, { 215, 7 },
|
||||||
/* 11 */ { { (0)|(11 << 4) }, { 160, 56 }, 4 }, // KC_MINS
|
|
||||||
/* 12 */ { { (0)|(12 << 4) }, { 174, 56 }, 4 }, // KC_EQL
|
|
||||||
/* 13 */ { { (0)|(13 << 4) }, { 195, 56 }, 4 }, // KC_BSPC
|
|
||||||
/* 14 */ { { (0)|(14 << 4) }, { 215, 56 }, 4 }, // KC_DEL
|
|
||||||
/* 15 */ { { (1)|(0 << 4) }, { 11, 44 }, 4 }, // KC_TAB
|
|
||||||
/* 16 */ { { (1)|(1 << 4) }, { 28, 44 }, 4 }, // KC_Q
|
|
||||||
/* 17 */ { { (1)|(2 << 4) }, { 42, 44 }, 4 }, // KC_W
|
|
||||||
/* 18 */ { { (1)|(3 << 4) }, { 56, 44 }, 4 }, // KC_E
|
|
||||||
/* 19 */ { { (1)|(4 << 4) }, { 70, 44 }, 4 }, // KC_R
|
|
||||||
/* 20 */ { { (1)|(5 << 4) }, { 84, 44 }, 4 }, // KC_T
|
|
||||||
/* 21 */ { { (1)|(6 << 4) }, { 98, 44 }, 4 }, // KC_Y
|
|
||||||
/* 22 */ { { (1)|(7 << 4) }, { 112, 44 }, 4 }, // KC_U
|
|
||||||
/* 23 */ { { (1)|(8 << 4) }, { 125, 44 }, 4 }, // KC_I
|
|
||||||
/* 24 */ { { (1)|(9 << 4) }, { 139, 44 }, 4 }, // KC_O
|
|
||||||
/* 25 */ { { (1)|(10 << 4) }, { 153, 44 }, 4 }, // KC_P
|
|
||||||
/* 26 */ { { (1)|(11 << 4) }, { 167, 44 }, 4 }, // KC_LBRC
|
|
||||||
/* 27 */ { { (1)|(12 << 4) }, { 181, 44 }, 4 }, // KC_RBRC
|
|
||||||
/* 28 */ { { (1)|(13 << 4) }, { 198, 44 }, 4 }, // KC_BSLS
|
|
||||||
/* 29 */ { { (1)|(14 << 4) }, { 215, 44 }, 4 }, // KC_HOME
|
|
||||||
/* 30 */ { { (2)|(0 << 4) }, { 13, 32 }, 1 }, // KC_CAPS
|
|
||||||
/* 31 */ { { (2)|(1 << 4) }, { 32, 32 }, 4 }, // KC_A
|
|
||||||
/* 32 */ { { (2)|(2 << 4) }, { 46, 32 }, 4 }, // KC_S
|
|
||||||
/* 33 */ { { (2)|(3 << 4) }, { 60, 32 }, 4 }, // KC_D
|
|
||||||
/* 34 */ { { (2)|(4 << 4) }, { 73, 32 }, 4 }, // KC_F
|
|
||||||
/* 35 */ { { (2)|(5 << 4) }, { 87, 32 }, 4 }, // KC_G
|
|
||||||
/* 36 */ { { (2)|(6 << 4) }, { 101, 32 }, 4 }, // KC_H
|
|
||||||
/* 37 */ { { (2)|(7 << 4) }, { 115, 32 }, 4 }, // KC_J
|
|
||||||
/* 38 */ { { (2)|(8 << 4) }, { 129, 32 }, 4 }, // KC_K
|
|
||||||
/* 39 */ { { (2)|(9 << 4) }, { 143, 32 }, 4 }, // KC_L
|
|
||||||
/* 40 */ { { (2)|(10 << 4) }, { 156, 32 }, 4 }, // KC_SCLN
|
|
||||||
/* 41 */ { { (2)|(11 << 4) }, { 170, 32 }, 4 }, // KC_QUOT
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* 42 */ { { (2)|(13 << 4) }, { 193, 32 }, 4 }, // KC_ENT
|
|
||||||
/* 43 */ { { (2)|(14 << 4) }, { 215, 32 }, 4 }, // KC_PGUP
|
|
||||||
/* 44 */ { { (3)|(0 << 4) }, { 16, 19 }, 4 }, // KC_LSFT
|
|
||||||
/* 45 */ { { (3)|(2 << 4) }, { 39, 19 }, 4 }, // KC_Z
|
|
||||||
/* 46 */ { { (3)|(3 << 4) }, { 53, 19 }, 4 }, // KC_X
|
|
||||||
/* 47 */ { { (3)|(4 << 4) }, { 67, 19 }, 4 }, // KC_C
|
|
||||||
/* 48 */ { { (3)|(5 << 4) }, { 80, 19 }, 4 }, // KC_V
|
|
||||||
/* 49 */ { { (3)|(6 << 4) }, { 94, 19 }, 4 }, // KC_B
|
|
||||||
/* 50 */ { { (3)|(7 << 4) }, { 108, 19 }, 4 }, // KC_N
|
|
||||||
/* 51 */ { { (3)|(8 << 4) }, { 122, 19 }, 4 }, // KC_M
|
|
||||||
/* 52 */ { { (3)|(9 << 4) }, { 136, 19 }, 4 }, // KC_COMM
|
|
||||||
/* 53 */ { { (3)|(10 << 4) }, { 150, 19 }, 4 }, // KC_DOT
|
|
||||||
/* 54 */ { { (3)|(11 << 4) }, { 163, 19 }, 4 }, // KC_SLSH
|
|
||||||
/* 55 */ { { (3)|(12 << 4) }, { 182, 19 }, 4 }, // KC_RSFT
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* 56 */ { { (3)|(13 << 4) }, { 201, 19 }, 4 }, // KC_UP
|
|
||||||
/* 57 */ { { (3)|(14 << 4) }, { 215, 19 }, 4 }, // KC_PGDN
|
|
||||||
/* 58 */ { { (4)|(0 << 4) }, { 9, 7 }, 4 }, // KC_LCTL
|
|
||||||
/* 59 */ { { (4)|(1 << 4) }, { 27, 7 }, 4 }, // KC_LGUI
|
|
||||||
/* 60 */ { { (4)|(2 << 4) }, { 44, 7 }, 4 }, // KC_LALT
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* 61 */ { { (4)|(6 << 4) }, { 96, 7 }, 4 }, // KC_SPC
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* _________________________________________ */ // ____
|
|
||||||
/* 62 */ { { (4)|(10 << 4) }, { 148, 7 }, 4 }, // KC_RALT
|
|
||||||
/* 63 */ { { (4)|(11 << 4) }, { 165, 7 }, 4 }, // MO(1)
|
|
||||||
/* 64 */ { { (4)|(12 << 4) }, { 188, 7 }, 4 }, // KC_LEFT
|
|
||||||
/* 65 */ { { (4)|(13 << 4) }, { 201, 7 }, 4 }, // KC_DOWN
|
|
||||||
/* 66 */ { { (4)|(14 << 4) }, { 215, 7 }, 4 }, // KC_RGHT
|
|
||||||
|
|
||||||
// Underglow LEDs
|
// Underglow LEDs
|
||||||
{ { 255 }, { 1, 1 }, 2 },
|
{ 1, 1 }, { 15, 0 }, { 31, 0 }, { 47, 0 }, { 63, 0 }, { 79, 0 }, { 95, 0 }, { 112, 0 }, { 128, 0 }, { 144, 0 }, { 160, 0 }, { 176, 0 }, { 192, 0 }, { 208, 0 }, { 222, 1 },
|
||||||
{ { 255 }, { 15, 0 }, 2 },
|
{ 224, 13 }, { 224, 25 }, { 224, 38 }, { 224, 50 }, { 222, 62 }, { 191, 64 }, { 179, 64 }, { 167, 64 }, { 153, 64 }, { 139, 64 }, { 125, 64 }, { 112, 64 }, { 98, 64 }, { 84, 64 }, { 70, 64 },
|
||||||
{ { 255 }, { 31, 0 }, 2 },
|
{ 56, 64 }, { 42, 64 }, { 28, 64 }, { 1, 62 }, { 0, 50 }, { 0, 38 }, { 0, 25 }, { 0, 13 }
|
||||||
{ { 255 }, { 47, 0 }, 2 },
|
}, {
|
||||||
{ { 255 }, { 63, 0 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 255 }, { 79, 0 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 255 }, { 95, 0 }, 2 },
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 255 }, { 112, 0 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 255 }, { 128, 0 }, 2 },
|
4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 255 }, { 144, 0 }, 2 },
|
// Underglow LEDs
|
||||||
{ { 255 }, { 160, 0 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
{ { 255 }, { 176, 0 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
{ { 255 }, { 192, 0 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2
|
||||||
{ { 255 }, { 208, 0 }, 2 },
|
} };
|
||||||
{ { 255 }, { 222, 1 }, 2 },
|
|
||||||
{ { 255 }, { 224, 13 }, 2 },
|
|
||||||
{ { 255 }, { 224, 25 }, 2 },
|
|
||||||
{ { 255 }, { 224, 38 }, 2 },
|
|
||||||
{ { 255 }, { 224, 50 }, 2 },
|
|
||||||
{ { 255 }, { 222, 62 }, 2 },
|
|
||||||
{ { 255 }, { 191, 64 }, 2 },
|
|
||||||
{ { 255 }, { 179, 64 }, 2 },
|
|
||||||
{ { 255 }, { 167, 64 }, 2 },
|
|
||||||
{ { 255 }, { 153, 64 }, 2 },
|
|
||||||
{ { 255 }, { 139, 64 }, 2 },
|
|
||||||
{ { 255 }, { 125, 64 }, 2 },
|
|
||||||
{ { 255 }, { 112, 64 }, 2 },
|
|
||||||
{ { 255 }, { 98, 64 }, 2 },
|
|
||||||
{ { 255 }, { 84, 64 }, 2 },
|
|
||||||
{ { 255 }, { 70, 64 }, 2 },
|
|
||||||
{ { 255 }, { 56, 64 }, 2 },
|
|
||||||
{ { 255 }, { 42, 64 }, 2 },
|
|
||||||
{ { 255 }, { 28, 64 }, 2 },
|
|
||||||
{ { 255 }, { 1, 62 }, 2 },
|
|
||||||
{ { 255 }, { 0, 50 }, 2 },
|
|
||||||
{ { 255 }, { 0, 38 }, 2 },
|
|
||||||
{ { 255 }, { 0, 25 }, 2 },
|
|
||||||
{ { 255 }, { 0, 13 }, 2 },
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef USB_LED_INDICATOR_ENABLE
|
#ifdef USB_LED_INDICATOR_ENABLE
|
||||||
void rgb_matrix_indicators_kb(void)
|
void rgb_matrix_indicators_kb(void)
|
||||||
|
|||||||
@@ -5,134 +5,72 @@
|
|||||||
#include "rgb_matrix.h"
|
#include "rgb_matrix.h"
|
||||||
#include "config_led.h"
|
#include "config_led.h"
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ 0, 1, 2, 3, 4, 5, 6, 7 },
|
||||||
|
{ 16, 17, 18, 19, 20, 21, 22, 23 },
|
||||||
|
{ 33, 34, 35, 36, 37, 38, 39, 40 },
|
||||||
|
{ 50, 51, 52, 53, 54, 55, 56, 57 },
|
||||||
|
{ 63, 64, 65, 66, 67, 68, 69, 70 },
|
||||||
|
{ 76, 77, 78, 79, 80, 81, 82, 83 },
|
||||||
|
{ 8, 9, 10, 11, 12, 13, 14, 15 },
|
||||||
|
{ 24, 25, 26, 27, 28, 29, 30, 31 },
|
||||||
|
{ 41, 42, 43, 44, 45, 46, 47, 48 },
|
||||||
|
{ 58, 59, 60, 61, 62, 75, 49, 32 },
|
||||||
|
{ 71, 72, 73, 74, 84, 85, 86, NO_LED }
|
||||||
|
}, {
|
||||||
// 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_PSCR, KC_SLCK, KC_PAUS
|
// 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_PSCR, KC_SLCK, KC_PAUS
|
||||||
{ { 0|(0<<4) }, { 7, 5 }, 4 },
|
{ 7, 5 }, { 31, 5 }, { 43, 5 }, { 55, 5 }, { 67, 5 }, { 85, 5 }, { 97, 5 }, { 109, 5 },
|
||||||
{ { 0|(1<<4) }, { 31, 5 }, 4 },
|
{ 121, 5 }, { 139, 5 }, { 151, 5 }, { 163, 5 }, { 175, 5 }, { 193, 5 }, { 205, 5 }, { 217, 5 },
|
||||||
{ { 0|(2<<4) }, { 43, 5 }, 4 },
|
|
||||||
{ { 0|(3<<4) }, { 55, 5 }, 4 },
|
|
||||||
{ { 0|(4<<4) }, { 67, 5 }, 4 },
|
|
||||||
{ { 0|(5<<4) }, { 85, 5 }, 4 },
|
|
||||||
{ { 0|(6<<4) }, { 97, 5 }, 4 },
|
|
||||||
{ { 0|(7<<4) }, { 109, 5 }, 4 },
|
|
||||||
{ { 6|(0<<4) }, { 121, 5 }, 4 },
|
|
||||||
{ { 6|(1<<4) }, { 139, 5 }, 4 },
|
|
||||||
{ { 6|(2<<4) }, { 151, 5 }, 4 },
|
|
||||||
{ { 6|(3<<4) }, { 163, 5 }, 4 },
|
|
||||||
{ { 6|(4<<4) }, { 175, 5 }, 4 },
|
|
||||||
{ { 6|(5<<4) }, { 193, 5 }, 4 },
|
|
||||||
{ { 6|(6<<4) }, { 205, 5 }, 1 },
|
|
||||||
{ { 6|(7<<4) }, { 217, 5 }, 4 },
|
|
||||||
// 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_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
|
||||||
{ { 1|(0<<4) }, { 7, 20 }, 4 },
|
{ 7, 20 }, { 19, 20 }, { 31, 20 }, { 43, 20 }, { 55, 20 }, { 67, 20 }, { 79, 20 }, { 91, 20 },
|
||||||
{ { 1|(1<<4) }, { 19, 20 }, 4 },
|
{ 103, 20 }, { 115, 20 }, { 127, 20 }, { 139, 20 }, { 151, 20 }, { 169, 20 }, { 193, 20 }, { 205, 20 },
|
||||||
{ { 1|(2<<4) }, { 31, 20 }, 4 },
|
{ 217, 20 },
|
||||||
{ { 1|(3<<4) }, { 43, 20 }, 4 },
|
|
||||||
{ { 1|(4<<4) }, { 55, 20 }, 4 },
|
|
||||||
{ { 1|(5<<4) }, { 67, 20 }, 4 },
|
|
||||||
{ { 1|(6<<4) }, { 79, 20 }, 4 },
|
|
||||||
{ { 1|(7<<4) }, { 91, 20 }, 4 },
|
|
||||||
{ { 7|(0<<4) }, { 103, 20 }, 4 },
|
|
||||||
{ { 7|(1<<4) }, { 115, 20 }, 4 },
|
|
||||||
{ { 7|(2<<4) }, { 127, 20 }, 4 },
|
|
||||||
{ { 7|(3<<4) }, { 139, 20 }, 4 },
|
|
||||||
{ { 7|(4<<4) }, { 151, 20 }, 4 },
|
|
||||||
{ { 7|(5<<4) }, { 169, 20 }, 4 },
|
|
||||||
{ { 7|(6<<4) }, { 193, 20 }, 4 },
|
|
||||||
{ { 7|(7<<4) }, { 205, 20 }, 4 },
|
|
||||||
{ { 9|(7<<4) }, { 217, 20 }, 4 },
|
|
||||||
// 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_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
|
||||||
{ { 2|(0<<4) }, { 10, 30 }, 4 },
|
{ 10, 30 }, { 25, 30 }, { 37, 30 }, { 49, 30 }, { 61, 30 }, { 73, 30 }, { 85, 30 }, { 97, 30 },
|
||||||
{ { 2|(1<<4) }, { 25, 30 }, 4 },
|
{ 109, 30 }, { 121, 30 }, { 133, 30 }, { 145, 30 }, { 157, 30 }, { 172, 30 }, { 193, 30 }, { 205, 30 },
|
||||||
{ { 2|(2<<4) }, { 37, 30 }, 4 },
|
{ 217, 30 },
|
||||||
{ { 2|(3<<4) }, { 49, 30 }, 4 },
|
|
||||||
{ { 2|(4<<4) }, { 61, 30 }, 4 },
|
|
||||||
{ { 2|(5<<4) }, { 73, 30 }, 4 },
|
|
||||||
{ { 2|(6<<4) }, { 85, 30 }, 4 },
|
|
||||||
{ { 2|(7<<4) }, { 97, 30 }, 4 },
|
|
||||||
{ { 8|(0<<4) }, { 109, 30 }, 4 },
|
|
||||||
{ { 8|(1<<4) }, { 121, 30 }, 4 },
|
|
||||||
{ { 8|(2<<4) }, { 133, 30 }, 4 },
|
|
||||||
{ { 8|(3<<4) }, { 145, 30 }, 4 },
|
|
||||||
{ { 8|(4<<4) }, { 157, 30 }, 4 },
|
|
||||||
{ { 8|(5<<4) }, { 172, 30 }, 4 },
|
|
||||||
{ { 8|(6<<4) }, { 193, 30 }, 4 },
|
|
||||||
{ { 8|(7<<4) }, { 205, 30 }, 4 },
|
|
||||||
{ { 9|(6<<4) }, { 217, 30 }, 4 },
|
|
||||||
// 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_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
|
||||||
{ { 3|(0<<4) }, { 11, 39 }, 1 },
|
{ 11, 39 }, { 28, 39 }, { 40, 39 }, { 52, 39 }, { 64, 39 }, { 76, 39 }, { 88, 39 }, { 100, 39 },
|
||||||
{ { 3|(1<<4) }, { 28, 39 }, 4 },
|
{ 112, 39 }, { 124, 39 }, { 136, 39 }, { 148, 39 }, { 168, 39 },
|
||||||
{ { 3|(2<<4) }, { 40, 39 }, 4 },
|
|
||||||
{ { 3|(3<<4) }, { 52, 39 }, 4 },
|
|
||||||
{ { 3|(4<<4) }, { 64, 39 }, 4 },
|
|
||||||
{ { 3|(5<<4) }, { 76, 39 }, 4 },
|
|
||||||
{ { 3|(6<<4) }, { 88, 39 }, 4 },
|
|
||||||
{ { 3|(7<<4) }, { 100, 39 }, 4 },
|
|
||||||
{ { 9|(0<<4) }, { 112, 39 }, 4 },
|
|
||||||
{ { 9|(1<<4) }, { 124, 39 }, 4 },
|
|
||||||
{ { 9|(2<<4) }, { 136, 39 }, 4 },
|
|
||||||
{ { 9|(3<<4) }, { 148, 39 }, 4 },
|
|
||||||
{ { 9|(4<<4) }, { 168, 39 }, 4 },
|
|
||||||
// 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_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
|
||||||
{ { 4|(0<<4) }, { 14, 49 }, 4 },
|
{ 14, 49 }, { 34, 49 }, { 46, 49 }, { 58, 49 }, { 70, 49 }, { 82, 49 }, { 94, 49 }, { 106, 49 },
|
||||||
{ { 4|(1<<4) }, { 34, 49 }, 4 },
|
{ 118, 49 }, { 130, 49 }, { 142, 49 }, { 165, 49 }, { 205, 49 },
|
||||||
{ { 4|(2<<4) }, { 46, 49 }, 4 },
|
|
||||||
{ { 4|(3<<4) }, { 58, 49 }, 4 },
|
|
||||||
{ { 4|(4<<4) }, { 70, 49 }, 4 },
|
|
||||||
{ { 4|(5<<4) }, { 82, 49 }, 4 },
|
|
||||||
{ { 4|(6<<4) }, { 94, 49 }, 4 },
|
|
||||||
{ { 4|(7<<4) }, { 106, 49 }, 4 },
|
|
||||||
{ { 10|(0<<4) }, { 118, 49 }, 4 },
|
|
||||||
{ { 10|(1<<4) }, { 130, 49 }, 4 },
|
|
||||||
{ { 10|(2<<4) }, { 142, 49 }, 4 },
|
|
||||||
{ { 10|(3<<4) }, { 165, 49 }, 4 },
|
|
||||||
{ { 9|(5<<4) }, { 205, 49 }, 4 },
|
|
||||||
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
{ { 5|(0<<4) }, { 8, 59 }, 4 },
|
{ 8, 59 }, { 23, 59 }, { 38, 59 }, { 83, 59 }, { 129, 59 }, { 144, 59 }, { 159, 59 }, { 174, 59 },
|
||||||
{ { 5|(1<<4) }, { 23, 59 }, 4 },
|
{ 193, 59 }, { 205, 59 }, { 217, 59 },
|
||||||
{ { 5|(2<<4) }, { 38, 59 }, 4 },
|
|
||||||
{ { 5|(3<<4) }, { 83, 59 }, 4 },
|
|
||||||
{ { 5|(4<<4) }, { 129, 59 }, 4 },
|
|
||||||
{ { 5|(5<<4) }, { 144, 59 }, 4 },
|
|
||||||
{ { 5|(6<<4) }, { 159, 59 }, 4 },
|
|
||||||
{ { 5|(7<<4) }, { 174, 59 }, 4 },
|
|
||||||
{ { 10|(4<<4) }, { 193, 59 }, 4 },
|
|
||||||
{ { 10|(5<<4) }, { 205, 59 }, 4 },
|
|
||||||
{ { 10|(6<<4) }, { 217, 59 }, 4 },
|
|
||||||
// Underglow / Border
|
// Underglow / Border
|
||||||
{ { 0xFF }, { 222, 64 }, 2 },
|
{ 222, 64 }, { 204, 64 }, { 186, 64 }, { 167, 64 }, { 149, 64 }, { 130, 64 }, { 112, 64 }, { 94, 64 },
|
||||||
{ { 0xFF }, { 204, 64 }, 2 },
|
{ 75, 64 }, { 57, 64 }, { 38, 64 }, { 20, 64 }, { 0, 64 }, { 0, 47 }, { 0, 32 }, { 0, 17 },
|
||||||
{ { 0xFF }, { 186, 64 }, 2 },
|
{ 0, 0 }, { 20, 0 }, { 38, 0 }, { 57, 0 }, { 75, 0 }, { 94, 0 }, { 112, 0 }, { 130, 0 },
|
||||||
{ { 0xFF }, { 167, 64 }, 2 },
|
{ 149, 0 }, { 167, 0 }, { 186, 0 }, { 204, 0 }, { 222, 1 }, { 224, 17 }, { 224, 32 }, { 224, 47 }
|
||||||
{ { 0xFF }, { 149, 64 }, 2 },
|
}, {
|
||||||
{ { 0xFF }, { 130, 64 }, 2 },
|
// 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_PSCR, KC_SLCK, KC_PAUS
|
||||||
{ { 0xFF }, { 112, 64 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 94, 64 }, 2 },
|
4, 4, 4, 4, 4, 4, 1, 4,
|
||||||
{ { 0xFF }, { 75, 64 }, 2 },
|
// 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
|
||||||
{ { 0xFF }, { 57, 64 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 38, 64 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 20, 64 }, 2 },
|
4,
|
||||||
{ { 0xFF }, { 0, 64 }, 2 },
|
// 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
|
||||||
{ { 0xFF }, { 0, 47 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 0, 32 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 0, 17 }, 2 },
|
4,
|
||||||
{ { 0xFF }, { 0, 0 }, 2 },
|
// 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
|
||||||
{ { 0xFF }, { 20, 0 }, 2 },
|
1, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 38, 0 }, 2 },
|
4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 57, 0 }, 2 },
|
// 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
|
||||||
{ { 0xFF }, { 75, 0 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 94, 0 }, 2 },
|
4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 112, 0 }, 2 },
|
// KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||||
{ { 0xFF }, { 130, 0 }, 2 },
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{ { 0xFF }, { 149, 0 }, 2 },
|
4, 4, 4,
|
||||||
{ { 0xFF }, { 167, 0 }, 2 },
|
// Underglow / Border
|
||||||
{ { 0xFF }, { 186, 0 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
{ { 0xFF }, { 204, 0 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
{ { 0xFF }, { 222, 1 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2,
|
||||||
{ { 0xFF }, { 224, 17 }, 2 },
|
2, 2, 2, 2, 2, 2, 2, 2
|
||||||
{ { 0xFF }, { 224, 32 }, 2 },
|
} };
|
||||||
{ { 0xFF }, { 224, 47 }, 2 },
|
|
||||||
};
|
|
||||||
|
|
||||||
#ifdef USB_LED_INDICATOR_ENABLE
|
#ifdef USB_LED_INDICATOR_ENABLE
|
||||||
void rgb_matrix_indicators_kb(void)
|
void rgb_matrix_indicators_kb(void)
|
||||||
|
|||||||
+29
-66
@@ -46,72 +46,35 @@ void set_led_to(int led, uint8_t r, uint8_t g, uint8_t b) {
|
|||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
{{0x73}, { 3, 35}, 4},
|
{ 27, 26, 20, 19, 12, 11, 4, 3 },
|
||||||
{{0x72}, { 0, 26}, 4},
|
{ 28, 25, 21, 18, 13, 10, 5, 2 },
|
||||||
{{0x71}, { 0, 17}, 4},
|
{ 29, 24, 22, 17, 14, 9, 6, 1 },
|
||||||
{{0x70}, { 0, 6}, 4},
|
{ 30, 31, 23, 16, 15, 8, 7, 0 },
|
||||||
{{0x60}, { 14, 5}, 4},
|
{ 60, 59, 52, 51, 44, 43, 37, 36 },
|
||||||
{{0x61}, { 15, 16}, 4},
|
{ 61, 58, 53, 50, 45, 42, 38, 35 },
|
||||||
{{0x62}, { 16, 25}, 4},
|
{ 62, 57, 54, 49, 46, 41, 39, 34 },
|
||||||
{{0x63}, { 17, 34}, 4},
|
{ 63, 56, 55, 48, 47, 40, 32, 33 }
|
||||||
{{0x53}, { 31, 29}, 4},
|
}, {
|
||||||
{{0x52}, { 31, 19}, 4},
|
{ 3, 35 }, { 0, 26 }, { 0, 17 }, { 0, 6 }, { 14, 5 }, { 15, 16 }, { 16, 25 }, { 17, 34 },
|
||||||
{{0x51}, { 30, 11}, 4},
|
{ 31, 29 }, { 31, 19 }, { 30, 11 }, { 30, 1 }, { 45, 0 }, { 45, 8 }, { 46, 17 }, { 46, 27 },
|
||||||
{{0x50}, { 30, 1}, 4},
|
{ 60, 27 }, { 60, 18 }, { 60, 9 }, { 60, 0 }, { 74, 2 }, { 74, 11 }, { 75, 20 }, { 74, 28 },
|
||||||
{{0x40}, { 45, 0}, 4},
|
{ 89, 30 }, { 89, 19 }, { 89, 7 }, { 70, 38 }, { 82, 41 }, { 93, 45 }, { 104, 50 }, { 74, 64 },
|
||||||
{{0x41}, { 45, 8}, 4},
|
{ 149, 64 }, { 119, 50 }, { 130, 45 }, { 141, 41 }, { 153, 38 }, { 134, 7 }, { 134, 19 }, { 134, 30 },
|
||||||
{{0x42}, { 46, 17}, 4},
|
{ 149, 28 }, { 148, 20 }, { 149, 11 }, { 149, 2 }, { 163, 0 }, { 163, 9 }, { 163, 18 }, { 163, 27 },
|
||||||
{{0x43}, { 46, 27}, 4},
|
{ 177, 27 }, { 177, 17 }, { 178, 8 }, { 178, 0 }, { 193, 1 }, { 193, 11 }, { 192, 19 }, { 192, 29 },
|
||||||
{{0x33}, { 60, 27}, 4},
|
{ 206, 34 }, { 207, 25 }, { 208, 16 }, { 209, 5 }, { 224, 6 }, { 223, 17 }, { 223, 26 }, { 220, 35 }
|
||||||
{{0x32}, { 60, 18}, 4},
|
}, {
|
||||||
{{0x31}, { 60, 9}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0x30}, { 60, 0}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0x20}, { 74, 2}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0x21}, { 74, 11}, 4},
|
4, 4, 4, 1, 1, 1, 1, 1,
|
||||||
{{0x22}, { 75, 20}, 4},
|
1, 1, 1, 1, 1, 4, 4, 4,
|
||||||
{{0x23}, { 74, 28}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0x12}, { 89, 30}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4,
|
||||||
{{0x11}, { 89, 19}, 4},
|
4, 4, 4, 4, 4, 4, 4, 4
|
||||||
{{0x10}, { 89, 7}, 4},
|
} };
|
||||||
{{0x00}, { 70, 38}, 1},
|
|
||||||
{{0x01}, { 82, 41}, 1},
|
|
||||||
{{0x02}, { 93, 45}, 1},
|
|
||||||
{{0x03}, {104, 50}, 1},
|
|
||||||
{{0x13}, { 74, 64}, 1},
|
|
||||||
{{0x67}, {149, 64}, 1},
|
|
||||||
{{0x77}, {119, 50}, 1},
|
|
||||||
{{0x76}, {130, 45}, 1},
|
|
||||||
{{0x75}, {141, 41}, 1},
|
|
||||||
{{0x74}, {153, 38}, 1},
|
|
||||||
{{0x64}, {134, 7}, 4},
|
|
||||||
{{0x65}, {134, 19}, 4},
|
|
||||||
{{0x66}, {134, 30}, 4},
|
|
||||||
{{0x57}, {149, 28}, 4},
|
|
||||||
{{0x56}, {148, 20}, 4},
|
|
||||||
{{0x55}, {149, 11}, 4},
|
|
||||||
{{0x54}, {149, 2}, 4},
|
|
||||||
{{0x44}, {163, 0}, 4},
|
|
||||||
{{0x45}, {163, 9}, 4},
|
|
||||||
{{0x46}, {163, 18}, 4},
|
|
||||||
{{0x47}, {163, 27}, 4},
|
|
||||||
{{0x37}, {177, 27}, 4},
|
|
||||||
{{0x36}, {177, 17}, 4},
|
|
||||||
{{0x35}, {178, 8}, 4},
|
|
||||||
{{0x34}, {178, 0}, 4},
|
|
||||||
{{0x24}, {193, 1}, 4},
|
|
||||||
{{0x25}, {193, 11}, 4},
|
|
||||||
{{0x26}, {192, 19}, 4},
|
|
||||||
{{0x27}, {192, 29}, 4},
|
|
||||||
{{0x17}, {206, 34}, 4},
|
|
||||||
{{0x16}, {207, 25}, 4},
|
|
||||||
{{0x15}, {208, 16}, 4},
|
|
||||||
{{0x14}, {209, 5}, 4},
|
|
||||||
{{0x04}, {224, 6}, 4},
|
|
||||||
{{0x05}, {223, 17}, 4},
|
|
||||||
{{0x06}, {223, 26}, 4},
|
|
||||||
{{0x07}, {220, 35}, 4},
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
uint8_t b;
|
uint8_t b;
|
||||||
|
|||||||
@@ -39,37 +39,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
)
|
)
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#define RGB_DI_PIN D3
|
# define RGB_DI_PIN D3
|
||||||
#define RGBLED_NUM 16 // Number of LEDs
|
# define RGBLED_NUM 16 // Number of LEDs
|
||||||
#define RGBLED_SPLIT { 8, 8 }
|
# define RGBLED_SPLIT { 8, 8 }
|
||||||
|
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
# define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
# define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
# define RGBLIGHT_VAL_STEP 12
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
#ifdef AUDIO_ENABLE
|
||||||
#define C6_AUDIO
|
# define C6_AUDIO
|
||||||
#ifdef RGBLIGHT_ENABLE
|
# ifdef RGBLIGHT_ENABLE
|
||||||
#define NO_MUSIC_MODE
|
# define NO_MUSIC_MODE
|
||||||
#endif
|
# endif
|
||||||
#endif //AUDIO_ENABLE
|
#endif //AUDIO_ENABLE
|
||||||
|
|
||||||
#undef PRODUCT
|
#undef PRODUCT
|
||||||
#ifdef KEYBOARD_orthodox_rev1
|
#ifdef KEYBOARD_orthodox_rev1
|
||||||
#define PRODUCT Drashna Hacked Orthodox Rev.1
|
# define PRODUCT Drashna Hacked Orthodox Rev.1
|
||||||
#elif KEYBOARD_orthodox_rev3
|
#elif KEYBOARD_orthodox_rev3
|
||||||
#define PRODUCT Drashna Hacked Orthodox Rev.3
|
# define PRODUCT Drashna Hacked Orthodox Rev.3
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define QMK_ESC_OUTPUT D7 // usually COL
|
#define QMK_ESC_OUTPUT D7 // usually COL
|
||||||
#ifdef KEYBOARD_orthodox_rev1
|
#ifdef KEYBOARD_orthodox_rev1
|
||||||
#define QMK_ESC_INPUT D4 // usually ROW
|
# define QMK_ESC_INPUT D4 // usually ROW
|
||||||
#else
|
#else
|
||||||
#define QMK_ESC_INPUT D2 // usually ROW
|
# define QMK_ESC_INPUT D2 // usually ROW
|
||||||
#endif
|
#endif
|
||||||
#define QMK_LED B0
|
#define QMK_LED B0
|
||||||
#define QMK_SPEAKER C6
|
#define QMK_SPEAKER C6
|
||||||
|
|||||||
@@ -38,8 +38,8 @@ uint8_t last_osm;
|
|||||||
) \
|
) \
|
||||||
LAYOUT_wrapper( \
|
LAYOUT_wrapper( \
|
||||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_TAB, K11, K12, K13, K14, K15, OS_LALT, OS_LGUI, OS_RALT, RAISE, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, CTL_T(K2A), KC_MRSF \
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF \
|
||||||
)
|
)
|
||||||
#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
|
#define LAYOUT_orthodox_base_wrapper(...) LAYOUT_orthodox_base(__VA_ARGS__)
|
||||||
|
|
||||||
@@ -123,11 +123,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
void matrix_init_keymap(void) {
|
||||||
#ifndef CONVERT_TO_PROTON_C
|
#ifndef CONVERT_TO_PROTON_C
|
||||||
setPinOutput(D5);
|
setPinOutput(D5);
|
||||||
writePinHigh(D5);
|
writePinHigh(D5);
|
||||||
|
|
||||||
setPinOutput(B0);
|
setPinOutput(B0);
|
||||||
writePinHigh(B0);
|
writePinHigh(B0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -7,6 +7,7 @@ TAP_DANCE_ENABLE = no
|
|||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
AUDIO_ENABLE = no
|
AUDIO_ENABLE = no
|
||||||
NKRO_ENABLE = yes
|
NKRO_ENABLE = yes
|
||||||
|
SPACE_CADET_ENABLE = no
|
||||||
|
|
||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
|
|||||||
+20
-56
@@ -79,63 +79,27 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ 0, 1, 2, 3, 4, 5 },
|
||||||
|
{ 12, 13, 14, 15, 16, 17 },
|
||||||
|
{ 24, 25, 26, 27, 28, 29 },
|
||||||
|
{ 36, 37, 38, 45, 46, NO_LED },
|
||||||
|
{ 6, 7, 8, 9, 10, 11 },
|
||||||
|
{ 18, 19, 20, 21, 22, 23 },
|
||||||
|
{ 30, 31, 32, 33, 34, 35 },
|
||||||
|
{ 42, 43, 44, 39, 40, 41 }
|
||||||
|
}, {
|
||||||
|
{ 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 },
|
||||||
|
{ 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 },
|
||||||
|
{ 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 },
|
||||||
|
{ 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 111, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 }, { 223, 63 }
|
||||||
|
}, {
|
||||||
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
|
1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1
|
||||||
|
} };
|
||||||
|
|
||||||
/*{row | col << 4}
|
|
||||||
| {x=0..224, y=0..64}
|
|
||||||
| | flags
|
|
||||||
| | | */
|
|
||||||
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
|
|
||||||
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
|
|
||||||
{{0|(2<<4)}, {20.36*2, 21.33*0}, 4},
|
|
||||||
{{0|(3<<4)}, {20.36*3, 21.33*0}, 4},
|
|
||||||
{{0|(4<<4)}, {20.36*4, 21.33*0}, 4},
|
|
||||||
{{0|(5<<4)}, {20.36*5, 21.33*0}, 4},
|
|
||||||
{{4|(0<<4)}, {20.36*6, 21.33*0}, 4},
|
|
||||||
{{4|(1<<4)}, {20.36*7, 21.33*0}, 4},
|
|
||||||
{{4|(2<<4)}, {20.36*8, 21.33*0}, 4},
|
|
||||||
{{4|(3<<4)}, {20.36*9, 21.33*0}, 4},
|
|
||||||
{{4|(4<<4)}, {20.36*10,21.33*0}, 4},
|
|
||||||
{{4|(5<<4)}, {20.36*11,21.33*0}, 1},
|
|
||||||
|
|
||||||
{{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
|
|
||||||
{{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
|
|
||||||
{{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
|
|
||||||
{{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
|
|
||||||
{{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
|
|
||||||
{{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
|
|
||||||
{{5|(0<<4)}, {20.36*6, 21.33*1}, 4},
|
|
||||||
{{5|(1<<4)}, {20.36*7, 21.33*1}, 4},
|
|
||||||
{{5|(2<<4)}, {20.36*8, 21.33*1}, 4},
|
|
||||||
{{5|(3<<4)}, {20.36*9, 21.33*1}, 4},
|
|
||||||
{{5|(4<<4)}, {20.36*10,21.33*1}, 4},
|
|
||||||
{{5|(5<<4)}, {20.36*11,21.33*1}, 1},
|
|
||||||
|
|
||||||
{{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
|
|
||||||
{{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
|
|
||||||
{{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
|
|
||||||
{{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
|
|
||||||
{{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
|
|
||||||
{{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
|
|
||||||
{{6|(0<<4)}, {20.36*6, 21.33*2}, 4},
|
|
||||||
{{6|(1<<4)}, {20.36*7, 21.33*2}, 4},
|
|
||||||
{{6|(2<<4)}, {20.36*8, 21.33*2}, 4},
|
|
||||||
{{6|(3<<4)}, {20.36*9, 21.33*2}, 4},
|
|
||||||
{{6|(4<<4)}, {20.36*10,21.33*2}, 4},
|
|
||||||
{{6|(5<<4)}, {20.36*11,21.33*2}, 1},
|
|
||||||
|
|
||||||
{{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
|
|
||||||
{{3|(1<<4)}, {20.36*1, 21.33*3}, 1},
|
|
||||||
{{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
|
|
||||||
{{7|(3<<4)}, {20.36*3, 21.33*3}, 1},
|
|
||||||
{{7|(4<<4)}, {20.36*4, 21.33*3}, 1},
|
|
||||||
{{7|(5<<4)}, {20.36*5.5,21.33*3}, 4},
|
|
||||||
{{7|(0<<4)}, {20.36*7, 21.33*3}, 1},
|
|
||||||
{{7|(1<<4)}, {20.36*8, 21.33*3}, 1},
|
|
||||||
{{7|(2<<4)}, {20.36*9, 21.33*3}, 1},
|
|
||||||
{{3|(3<<4)}, {20.36*10,21.33*3}, 1},
|
|
||||||
{{3|(4<<4)}, {20.36*11,21.33*3}, 1}
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
matrix_init_user();
|
matrix_init_user();
|
||||||
|
|||||||
@@ -224,14 +224,16 @@ bool music_mask_user(uint16_t keycode) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
extern led_config_t g_led_config;
|
||||||
|
#endif
|
||||||
|
|
||||||
void rgb_matrix_indicators_user(void) {
|
void rgb_matrix_indicators_user(void) {
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_led led;
|
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color(i, 0x6B, 0x00, 0x80);
|
rgb_matrix_set_color(i, 0x6B, 0x00, 0x80);
|
||||||
} else {
|
} else {
|
||||||
rgb_matrix_set_color(i, 0x00, 0xFF, 0x00);
|
rgb_matrix_set_color(i, 0x00, 0xFF, 0x00);
|
||||||
@@ -241,8 +243,7 @@ void rgb_matrix_indicators_user(void) {
|
|||||||
|
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
|
||||||
rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00);
|
rgb_matrix_set_color(i, 0xFF, 0xA5, 0x00);
|
||||||
} else {
|
} else {
|
||||||
rgb_matrix_set_color(i, 0x00, 0x67, 0xC7);
|
rgb_matrix_set_color(i, 0x00, 0x67, 0xC7);
|
||||||
|
|||||||
@@ -77,65 +77,24 @@ const is31_led g_is31_leds[DRIVER_LED_TOTAL] = {
|
|||||||
{1, C9_14, C8_14, C7_14}
|
{1, C9_14, C8_14, C7_14}
|
||||||
};
|
};
|
||||||
|
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 },
|
||||||
/*{row | col << 4}
|
{ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23 },
|
||||||
| {x=0..224, y=0..64}
|
{ 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 },
|
||||||
| | flags
|
{ 36, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 48 }
|
||||||
| | | */
|
}, {
|
||||||
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1},
|
{ 0, 0 }, { 20, 0 }, { 40, 0 }, { 61, 0 }, { 81, 0 }, { 101, 0 }, { 122, 0 }, { 142, 0 }, { 162, 0 }, { 183, 0 }, { 203, 0 }, { 223, 0 },
|
||||||
{{0|(1<<4)}, {20.36*1, 21.33*0}, 4},
|
{ 0, 21 }, { 20, 21 }, { 40, 21 }, { 61, 21 }, { 81, 21 }, { 101, 21 }, { 122, 21 }, { 142, 21 }, { 162, 21 }, { 183, 21 }, { 203, 21 }, { 223, 21 },
|
||||||
{{0|(2<<4)}, {20.36*2, 21.33*0}, 4},
|
{ 0, 42 }, { 20, 42 }, { 40, 42 }, { 61, 42 }, { 81, 42 }, { 101, 42 }, { 122, 42 }, { 142, 42 }, { 162, 42 }, { 183, 42 }, { 203, 42 }, { 223, 42 },
|
||||||
{{0|(3<<4)}, {20.36*3, 21.33*0}, 4},
|
{ 0, 63 }, { 20, 63 }, { 40, 63 }, { 61, 63 }, { 81, 63 }, { 101, 63 }, { 111, 63 }, { 122, 63 }, { 142, 63 }, { 162, 63 }, { 183, 63 }, { 203, 63 },
|
||||||
{{0|(4<<4)}, {20.36*4, 21.33*0}, 4},
|
{ 223, 63 }
|
||||||
{{0|(5<<4)}, {20.36*5, 21.33*0}, 4},
|
}, {
|
||||||
{{0|(6<<4)}, {20.36*6, 21.33*0}, 4},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{0|(7<<4)}, {20.36*7, 21.33*0}, 4},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{0|(8<<4)}, {20.36*8, 21.33*0}, 4},
|
1, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
|
||||||
{{0|(9<<4)}, {20.36*9, 21.33*0}, 4},
|
1, 1, 1, 1, 1, 4, 4, 4, 1, 1, 1, 1,
|
||||||
{{0|(10<<4)}, {20.36*10,21.33*0}, 4},
|
1
|
||||||
{{0|(11<<4)}, {20.36*11,21.33*0}, 1},
|
} };
|
||||||
|
|
||||||
{{1|(0<<4)}, {20.36*0, 21.33*1}, 1},
|
|
||||||
{{1|(1<<4)}, {20.36*1, 21.33*1}, 4},
|
|
||||||
{{1|(2<<4)}, {20.36*2, 21.33*1}, 4},
|
|
||||||
{{1|(3<<4)}, {20.36*3, 21.33*1}, 4},
|
|
||||||
{{1|(4<<4)}, {20.36*4, 21.33*1}, 4},
|
|
||||||
{{1|(5<<4)}, {20.36*5, 21.33*1}, 4},
|
|
||||||
{{1|(6<<4)}, {20.36*6, 21.33*1}, 4},
|
|
||||||
{{1|(7<<4)}, {20.36*7, 21.33*1}, 4},
|
|
||||||
{{1|(8<<4)}, {20.36*8, 21.33*1}, 4},
|
|
||||||
{{1|(9<<4)}, {20.36*9, 21.33*1}, 4},
|
|
||||||
{{1|(10<<4)}, {20.36*10,21.33*1}, 4},
|
|
||||||
{{1|(11<<4)}, {20.36*11,21.33*1}, 1},
|
|
||||||
|
|
||||||
{{2|(0<<4)}, {20.36*0, 21.33*2}, 1},
|
|
||||||
{{2|(1<<4)}, {20.36*1, 21.33*2}, 4},
|
|
||||||
{{2|(2<<4)}, {20.36*2, 21.33*2}, 4},
|
|
||||||
{{2|(3<<4)}, {20.36*3, 21.33*2}, 4},
|
|
||||||
{{2|(4<<4)}, {20.36*4, 21.33*2}, 4},
|
|
||||||
{{2|(5<<4)}, {20.36*5, 21.33*2}, 4},
|
|
||||||
{{2|(6<<4)}, {20.36*6, 21.33*2}, 4},
|
|
||||||
{{2|(7<<4)}, {20.36*7, 21.33*2}, 4},
|
|
||||||
{{2|(8<<4)}, {20.36*8, 21.33*2}, 4},
|
|
||||||
{{2|(9<<4)}, {20.36*9, 21.33*2}, 4},
|
|
||||||
{{2|(10<<4)}, {20.36*10,21.33*2}, 4},
|
|
||||||
{{2|(11<<4)}, {20.36*11,21.33*2}, 1},
|
|
||||||
|
|
||||||
{{3|(0<<4)}, {20.36*0, 21.33*3}, 1},
|
|
||||||
{{3|(1<<4)}, {20.36*1, 21.33*3}, 1},
|
|
||||||
{{3|(2<<4)}, {20.36*2, 21.33*3}, 1},
|
|
||||||
{{3|(3<<4)}, {20.36*3, 21.33*3}, 1},
|
|
||||||
{{3|(4<<4)}, {20.36*4, 21.33*3}, 1},
|
|
||||||
{{3|(5<<4)}, {20.36*5, 21.33*3}, 4},
|
|
||||||
{{3|(5<<4)}, {20.36*5.5,21.33*3}, 4},
|
|
||||||
{{3|(6<<4)}, {20.36*6, 21.33*3}, 4},
|
|
||||||
{{3|(7<<4)}, {20.36*7, 21.33*3}, 1},
|
|
||||||
{{3|(8<<4)}, {20.36*8, 21.33*3}, 1},
|
|
||||||
{{3|(9<<4)}, {20.36*9, 21.33*3}, 1},
|
|
||||||
{{3|(10<<4)}, {20.36*10,21.33*3}, 1},
|
|
||||||
{{3|(11<<4)}, {20.36*11,21.33*3}, 1}
|
|
||||||
};
|
|
||||||
|
|
||||||
void matrix_init_kb(void) {
|
void matrix_init_kb(void) {
|
||||||
|
|
||||||
@@ -151,6 +110,16 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record)
|
|||||||
return process_record_user(keycode, record);
|
return process_record_user(keycode, record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
|
||||||
|
// Spacebar has 2 leds 41 & 42, so add 42 to the array here, and 41 will be added
|
||||||
|
// by the default lookup code that runs after this
|
||||||
|
if (row == 3 && column == 5) {
|
||||||
|
led_i[0] = 42;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
void matrix_scan_kb(void)
|
void matrix_scan_kb(void)
|
||||||
{
|
{
|
||||||
matrix_scan_user();
|
matrix_scan_user();
|
||||||
|
|||||||
+22
-3
@@ -34,6 +34,25 @@ void rgblight_set(void) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void matrix_init_kb(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
if (rgblight_config.enable) {
|
||||||
|
i2c_init();
|
||||||
|
i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
// call user level keymaps, if any
|
||||||
|
matrix_init_user();
|
||||||
|
}
|
||||||
|
|
||||||
|
void matrix_scan_kb(void) {
|
||||||
|
#ifdef RGBLIGHT_ENABLE
|
||||||
|
rgblight_task();
|
||||||
|
#endif
|
||||||
|
matrix_scan_user();
|
||||||
|
/* Nothing else for now. */
|
||||||
|
}
|
||||||
|
|
||||||
__attribute__ ((weak))
|
__attribute__ ((weak))
|
||||||
void matrix_scan_user(void) {
|
void matrix_scan_user(void) {
|
||||||
}
|
}
|
||||||
@@ -45,7 +64,7 @@ void backlight_init_ports(void) {
|
|||||||
setPinOutput(D4);
|
setPinOutput(D4);
|
||||||
setPinOutput(D6);
|
setPinOutput(D6);
|
||||||
|
|
||||||
// turn RGB LEDs on
|
// turn backlight LEDs on
|
||||||
writePinHigh(D0);
|
writePinHigh(D0);
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
writePinHigh(D4);
|
||||||
@@ -54,13 +73,13 @@ void backlight_init_ports(void) {
|
|||||||
|
|
||||||
void backlight_set(uint8_t level) {
|
void backlight_set(uint8_t level) {
|
||||||
if (level == 0) {
|
if (level == 0) {
|
||||||
// turn RGB LEDs off
|
// turn backlight LEDs off
|
||||||
writePinLow(D0);
|
writePinLow(D0);
|
||||||
writePinLow(D1);
|
writePinLow(D1);
|
||||||
writePinLow(D4);
|
writePinLow(D4);
|
||||||
writePinLow(D6);
|
writePinLow(D6);
|
||||||
} else {
|
} else {
|
||||||
// turn RGB LEDs on
|
// turn backlight LEDs on
|
||||||
writePinHigh(D0);
|
writePinHigh(D0);
|
||||||
writePinHigh(D1);
|
writePinHigh(D1);
|
||||||
writePinHigh(D4);
|
writePinHigh(D4);
|
||||||
|
|||||||
+39
-76
@@ -1,83 +1,46 @@
|
|||||||
#include "quantum.h"
|
#include "quantum.h"
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = {
|
led_config_t g_led_config = { {
|
||||||
|
{ 0, 1, 2, 3, 4, 5, 6 },
|
||||||
|
{ 7, 8, 9, 10, 11, 12, 13 },
|
||||||
|
{ 14, 15, 16, 17, 18, 19, 20 },
|
||||||
|
{ 21, 22, 23, 24, 25, 26, 27 },
|
||||||
|
{ 28, 29, 30, 31, 32, 33, 34 },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 33, 34 },
|
||||||
|
{ 35, 36, 37, 38, 39, 40, 41 },
|
||||||
|
{ 42, 43, 44, 45, 46, 47, 48 },
|
||||||
|
{ 49, 50, 51, 52, 53, 54, 55 },
|
||||||
|
{ 56, 57, 58, 59, 60, 61, 62 },
|
||||||
|
{ 63, 64, 65, 66, 67, 68, 68 },
|
||||||
|
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED, 68, 68 }
|
||||||
|
}, {
|
||||||
// Left Hand Mapped Left to Right
|
// Left Hand Mapped Left to Right
|
||||||
{ { 0 | (0 << 4) }, { 0, 0 }, 1},
|
{ 0, 0 }, { 22, 0 }, { 37, 0 }, { 37, 0 }, { 67, 0 }, { 82, 0 }, { 104, 0 },
|
||||||
{ { 0 | (1 << 4) }, { 22, 0 }, 4},
|
{ 0, 16 }, { 22, 16 }, { 37, 16 }, { 37, 16 }, { 67, 16 }, { 82, 16 }, { 104, 16 },
|
||||||
{ { 0 | (2 << 4) }, { 37, 0 }, 4},
|
{ 0, 32 }, { 22, 32 }, { 37, 32 }, { 37, 32 }, { 67, 32 }, { 82, 32 }, { 104, 32 },
|
||||||
{ { 0 | (3 << 4) }, { 37, 0 }, 4},
|
{ 0, 48 }, { 22, 48 }, { 37, 48 }, { 37, 48 }, { 67, 48 }, { 82, 48 }, { 104, 48 },
|
||||||
{ { 0 | (4 << 4) }, { 67, 0 }, 4},
|
{ 0, 64 }, { 22, 64 }, { 37, 64 }, { 37, 64 }, { 67, 64 }, { 89, 45 }, { 97, 55 },
|
||||||
{ { 0 | (5 << 4) }, { 82, 0 }, 4},
|
|
||||||
{ { 0 | (6 << 4) }, { 104, 0 }, 1},
|
|
||||||
{ { 1 | (0 << 4) }, { 0, 16 }, 1},
|
|
||||||
{ { 1 | (1 << 4) }, { 22, 16 }, 4},
|
|
||||||
{ { 1 | (2 << 4) }, { 37, 16 }, 4},
|
|
||||||
{ { 1 | (3 << 4) }, { 37, 16 }, 4},
|
|
||||||
{ { 1 | (4 << 4) }, { 67, 16 }, 4},
|
|
||||||
{ { 1 | (5 << 4) }, { 82, 16 }, 4},
|
|
||||||
{ { 1 | (6 << 4) }, { 104, 16 }, 1},
|
|
||||||
{ { 2 | (0 << 4) }, { 0, 32 }, 1},
|
|
||||||
{ { 2 | (1 << 4) }, { 22, 32 }, 4},
|
|
||||||
{ { 2 | (2 << 4) }, { 37, 32 }, 4},
|
|
||||||
{ { 2 | (3 << 4) }, { 37, 32 }, 4},
|
|
||||||
{ { 2 | (4 << 4) }, { 67, 32 }, 4},
|
|
||||||
{ { 2 | (5 << 4) }, { 82, 32 }, 4},
|
|
||||||
{ { 2 | (6 << 4) }, { 104, 32 }, 1},
|
|
||||||
{ { 3 | (0 << 4) }, { 0, 48 }, 1},
|
|
||||||
{ { 3 | (1 << 4) }, { 22, 48 }, 4},
|
|
||||||
{ { 3 | (2 << 4) }, { 37, 48 }, 4},
|
|
||||||
{ { 3 | (3 << 4) }, { 37, 48 }, 4},
|
|
||||||
{ { 3 | (4 << 4) }, { 67, 48 }, 4},
|
|
||||||
{ { 3 | (5 << 4) }, { 82, 48 }, 4},
|
|
||||||
{ { 3 | (6 << 4) }, { 104, 48 }, 1},
|
|
||||||
{ { 4 | (0 << 4) }, { 0, 64 }, 1},
|
|
||||||
{ { 4 | (1 << 4) }, { 22, 64 }, 1},
|
|
||||||
{ { 4 | (2 << 4) }, { 37, 64 }, 1},
|
|
||||||
{ { 4 | (3 << 4) }, { 37, 64 }, 1},
|
|
||||||
{ { 4 | (4 << 4) }, { 67, 64 }, 1},
|
|
||||||
// These two control the 4 LEDs in the thumb cluster
|
|
||||||
// Top keys are { 4 | (5 << 4) & { 4 | (6 << 4)
|
|
||||||
{ { 5 | (5 << 4) }, { 89, 45 }, 1},
|
|
||||||
{ { 5 | (6 << 4) }, { 97, 55 }, 1},
|
|
||||||
// Left Hand Mapped Right to Left
|
// Left Hand Mapped Right to Left
|
||||||
{ { 6 | (0 << 4) }, { 224, 0 }, 1},
|
{ 224, 0 }, { 202, 0 }, { 187, 0 }, { 172, 0 }, { 157, 0 }, { 142, 0 }, { 120, 0 },
|
||||||
{ { 6 | (1 << 4) }, { 202, 0 }, 4},
|
{ 224, 16 }, { 202, 16 }, { 187, 16 }, { 172, 16 }, { 157, 16 }, { 142, 16 }, { 120, 16 },
|
||||||
{ { 6 | (2 << 4) }, { 187, 0 }, 4},
|
{ 224, 32 }, { 202, 32 }, { 187, 32 }, { 172, 32 }, { 157, 32 }, { 142, 32 }, { 120, 32 },
|
||||||
{ { 6 | (3 << 4) }, { 172, 0 }, 4},
|
{ 224, 48 }, { 202, 48 }, { 187, 48 }, { 172, 48 }, { 157, 48 }, { 142, 48 }, { 120, 48 },
|
||||||
{ { 6 | (4 << 4) }, { 157, 0 }, 4},
|
{ 224, 64 }, { 202, 64 }, { 187, 64 }, { 172, 64 }, { 157, 64 }, { 135, 45 }, { 127, 55 }
|
||||||
{ { 6 | (5 << 4) }, { 142, 0 }, 4},
|
}, {
|
||||||
{ { 6 | (6 << 4) }, { 120, 0 }, 1},
|
// Left Hand Mapped Left to Right
|
||||||
{ { 7 | (0 << 4) }, { 224, 16 }, 1},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 7 | (1 << 4) }, { 202, 16 }, 4},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 7 | (2 << 4) }, { 187, 16 }, 4},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 7 | (3 << 4) }, { 172, 16 }, 4},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 7 | (4 << 4) }, { 157, 16 }, 4},
|
1, 1, 1, 1, 1, 1, 1,
|
||||||
{ { 7 | (5 << 4) }, { 142, 16 }, 4},
|
// Left Hand Mapped Right to Left
|
||||||
{ { 7 | (6 << 4) }, { 120, 16 }, 1},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 8 | (0 << 4) }, { 224, 32 }, 1},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 8 | (1 << 4) }, { 202, 32 }, 4},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 8 | (2 << 4) }, { 187, 32 }, 4},
|
1, 4, 4, 4, 4, 4, 1,
|
||||||
{ { 8 | (3 << 4) }, { 172, 32 }, 4},
|
1, 1, 1, 1, 1, 1, 1
|
||||||
{ { 8 | (4 << 4) }, { 157, 32 }, 4},
|
} };
|
||||||
{ { 8 | (5 << 4) }, { 142, 32 }, 4},
|
|
||||||
{ { 8 | (6 << 4) }, { 120, 32 }, 1},
|
|
||||||
{ { 9 | (0 << 4) }, { 224, 48 }, 1},
|
|
||||||
{ { 9 | (1 << 4) }, { 202, 48 }, 4},
|
|
||||||
{ { 9 | (2 << 4) }, { 187, 48 }, 4},
|
|
||||||
{ { 9 | (3 << 4) }, { 172, 48 }, 4},
|
|
||||||
{ { 9 | (4 << 4) }, { 157, 48 }, 4},
|
|
||||||
{ { 9 | (5 << 4) }, { 142, 48 }, 4},
|
|
||||||
{ { 9 | (6 << 4) }, { 120, 48 }, 1},
|
|
||||||
{ { 10 | (0 << 4) }, { 224, 64 }, 1},
|
|
||||||
{ { 10 | (1 << 4) }, { 202, 64 }, 1},
|
|
||||||
{ { 10 | (2 << 4) }, { 187, 64 }, 1},
|
|
||||||
{ { 10 | (3 << 4) }, { 172, 64 }, 1},
|
|
||||||
{ { 10 | (4 << 4) }, { 157, 64 }, 1},
|
|
||||||
// These two control the 4 LEDs in the thumb cluster
|
|
||||||
// Top keys are { 10 | (5 << 4) & { 10 | (6 << 4)
|
|
||||||
{ { 11 | (5 << 4) }, { 135, 45 }, 1},
|
|
||||||
{ { 11 | (6 << 4) }, { 127, 55 }, 1}
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1,20 +1 @@
|
|||||||
#include "sol.h"
|
#include "sol.h"
|
||||||
|
|
||||||
#if defined(RGB_MATRIX_ENABLE)
|
|
||||||
uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t *led_i) {
|
|
||||||
if (row == 4 && column == 5) {
|
|
||||||
led_i[0] = 33;
|
|
||||||
return 1;
|
|
||||||
} else if (row == 4 && column == 6) {
|
|
||||||
led_i[0] = 34;
|
|
||||||
return 1;
|
|
||||||
} else if (row == 10 && column == 5) {
|
|
||||||
led_i[0] = 68;
|
|
||||||
return 1;
|
|
||||||
} else if (row == 10 && column == 6) {
|
|
||||||
led_i[0] = 69;
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
@@ -65,6 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#define RGBLED_NUM 34 // Number of LEDs
|
#define RGBLED_NUM 34 // Number of LEDs
|
||||||
|
#define RGBLIGHT_ANIMATIONS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Feature disable options
|
* Feature disable options
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const char* layer_name_user(uint32_t layer) {
|
|||||||
|
|
||||||
__attribute__((weak))
|
__attribute__((weak))
|
||||||
void render_status(void) {
|
void render_status(void) {
|
||||||
// Setup for 90 degree rendering because it's awesome!
|
// Setup for 270 degree rendering because it's awesome!
|
||||||
// It can house 16 lines of text, with 5 letters each line
|
// It can house 16 lines of text, with 5 letters each line
|
||||||
// Render to mode icon
|
// Render to mode icon
|
||||||
static const char PROGMEM mode_logo[2][4] = {
|
static const char PROGMEM mode_logo[2][4] = {
|
||||||
@@ -49,7 +49,7 @@ void render_status(void) {
|
|||||||
|
|
||||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||||
if (is_keyboard_master())
|
if (is_keyboard_master())
|
||||||
return OLED_ROTATION_90; // flips the display 90 degrees if mainhand
|
return OLED_ROTATION_270; // flips the display 270 degrees if mainhand
|
||||||
return rotation;
|
return rotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef RGBLIGHT_ENABLE
|
#ifdef RGBLIGHT_ENABLE
|
||||||
#undef RGBLIGHT_SAT_STEP
|
# undef RGBLIGHT_SAT_STEP
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
# define RGBLIGHT_SAT_STEP 12
|
||||||
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#ifdef UNICODEMAP_ENABLE
|
#ifdef UNICODEMAP_ENABLE
|
||||||
#include "drashna_unicode.h"
|
#include "drashna_unicode.h"
|
||||||
#endif // UNICODEMAP_ENABLE
|
#endif // UNICODEMAP_ENABLE
|
||||||
|
#ifndef UNICODE_ENABLE
|
||||||
|
# define UC(x) KC_NO
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
extern bool g_suspend_state;
|
extern bool g_suspend_state;
|
||||||
@@ -28,7 +31,7 @@ extern rgb_config_t rgb_matrix_config;
|
|||||||
extern userspace_config_t userspace_config;
|
extern userspace_config_t userspace_config;
|
||||||
|
|
||||||
enum more_custom_keycodes {
|
enum more_custom_keycodes {
|
||||||
KC_SWAP_NUM = NEW_SAFE_RANGE
|
KC_SWAP_NUM = NEW_SAFE_RANGE
|
||||||
};
|
};
|
||||||
|
|
||||||
//define layer change stuff for underglow indicator
|
//define layer change stuff for underglow indicator
|
||||||
@@ -43,7 +46,7 @@ bool skip_leds = false;
|
|||||||
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
KC_ESC, ________________NUMBER_LEFT________________, UC_FLIP, UC_TABL, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||||
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
KC_TAB, K01, K02, K03, K04, K05, TG(_DIABLO), TG(_DIABLO), K06, K07, K08, K09, K0A, KC_BSLS, \
|
||||||
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_C1R3, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, CTL_T(K2A), KC_MRSF, \
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, TG(_GAMEPAD), TG(_GAMEPAD), K26, K27, K28, K29, RCTL_T(K2A), KC_MRSF, \
|
||||||
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
|
KC_GRV, OS_MEH, OS_HYPR, KC_LBRC, KC_RBRC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, UC(0x2E2E), \
|
||||||
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
||||||
KC_APP, KC_MENU, \
|
KC_APP, KC_MENU, \
|
||||||
@@ -305,87 +308,88 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
|
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case KC_1:
|
case KC_1:
|
||||||
if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) {
|
if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(KC_2);
|
register_code(KC_2);
|
||||||
} else {
|
} else {
|
||||||
unregister_code(KC_2);
|
unregister_code(KC_2);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KC_2:
|
case KC_2:
|
||||||
if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) {
|
if (IS_LAYER_ON(_GAMEPAD) && userspace_config.swapped_numbers) {
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
register_code(KC_1);
|
register_code(KC_1);
|
||||||
} else {
|
} else {
|
||||||
unregister_code(KC_1);
|
unregister_code(KC_1);
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KC_SWAP_NUM:
|
case KC_SWAP_NUM:
|
||||||
if (record->event.pressed) {
|
if (record->event.pressed) {
|
||||||
userspace_config.swapped_numbers ^= 1;
|
userspace_config.swapped_numbers ^= 1;
|
||||||
eeconfig_update_user(userspace_config.raw);
|
eeconfig_update_user(userspace_config.raw);
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
//switch (keycode) {
|
}
|
||||||
// case KC_P00:
|
//switch (keycode) {
|
||||||
// if (!record->event.pressed) {
|
// case KC_P00:
|
||||||
// register_code(KC_KP_0);
|
// if (!record->event.pressed) {
|
||||||
// unregister_code(KC_KP_0);
|
// register_code(KC_KP_0);
|
||||||
// register_code(KC_KP_0);
|
// unregister_code(KC_KP_0);
|
||||||
// unregister_code(KC_KP_0);
|
// register_code(KC_KP_0);
|
||||||
// }
|
// unregister_code(KC_KP_0);
|
||||||
// return false;
|
// }
|
||||||
// break;
|
// return false;
|
||||||
//}
|
// break;
|
||||||
return true;
|
//}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_scan_keymap(void) { // runs frequently to update info
|
void matrix_scan_keymap(void) { // runs frequently to update info
|
||||||
uint8_t modifiers = get_mods();
|
uint8_t modifiers = get_mods();
|
||||||
uint8_t led_usb_state = host_keyboard_leds();
|
uint8_t led_usb_state = host_keyboard_leds();
|
||||||
uint8_t one_shot = get_oneshot_mods();
|
uint8_t one_shot = get_oneshot_mods();
|
||||||
|
|
||||||
if (!skip_leds) {
|
if (!skip_leds) {
|
||||||
ergodox_board_led_off();
|
ergodox_board_led_off();
|
||||||
ergodox_right_led_1_off();
|
ergodox_right_led_1_off();
|
||||||
ergodox_right_led_2_off();
|
ergodox_right_led_2_off();
|
||||||
ergodox_right_led_3_off();
|
ergodox_right_led_3_off();
|
||||||
|
|
||||||
|
// Since we're not using the LEDs here for layer indication anymore,
|
||||||
|
// then lets use them for modifier indicators. Shame we don't have 4...
|
||||||
|
// Also, no "else", since we want to know each, independently.
|
||||||
|
if ( ( modifiers | one_shot ) & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) ) {
|
||||||
|
ergodox_right_led_2_on();
|
||||||
|
ergodox_right_led_2_set( 50 );
|
||||||
|
}
|
||||||
|
if ( ( modifiers | one_shot ) & MOD_MASK_CTRL) {
|
||||||
|
ergodox_right_led_1_on();
|
||||||
|
ergodox_right_led_1_set( 10 );
|
||||||
|
}
|
||||||
|
if ( ( modifiers | one_shot ) & MOD_MASK_ALT) {
|
||||||
|
ergodox_right_led_3_on();
|
||||||
|
ergodox_right_led_3_set( 10 );
|
||||||
|
}
|
||||||
|
|
||||||
// Since we're not using the LEDs here for layer indication anymore,
|
|
||||||
// then lets use them for modifier indicators. Shame we don't have 4...
|
|
||||||
// Also, no "else", since we want to know each, independently.
|
|
||||||
if ( ( modifiers | one_shot ) & MOD_MASK_SHIFT || led_usb_state & (1<<USB_LED_CAPS_LOCK) ) {
|
|
||||||
ergodox_right_led_2_on();
|
|
||||||
ergodox_right_led_2_set( 50 );
|
|
||||||
}
|
|
||||||
if ( ( modifiers | one_shot ) & MOD_MASK_CTRL) {
|
|
||||||
ergodox_right_led_1_on();
|
|
||||||
ergodox_right_led_1_set( 10 );
|
|
||||||
}
|
|
||||||
if ( ( modifiers | one_shot ) & MOD_MASK_ALT) {
|
|
||||||
ergodox_right_led_3_on();
|
|
||||||
ergodox_right_led_3_set( 10 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
bool indicator_is_this_led_used_keyboard(uint8_t index) {
|
bool indicator_is_this_led_used_keyboard(uint8_t index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 13 ... 14:
|
case 13 ... 14:
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -393,101 +397,80 @@ bool indicator_is_this_led_used_keyboard(uint8_t index) {
|
|||||||
|
|
||||||
void suspend_power_down_keymap(void) {
|
void suspend_power_down_keymap(void) {
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
rgb_matrix_config.enable = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspend_wakeup_init_keymap(void) {
|
void suspend_wakeup_init_keymap(void) {
|
||||||
rgb_matrix_config.enable = true;
|
|
||||||
rgb_matrix_set_suspend_state(false);
|
rgb_matrix_set_suspend_state(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
extern led_config_t g_led_config;
|
||||||
rgb_led led;
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rgb_matrix_indicators_user(void) {
|
void rgb_matrix_indicators_user(void) {
|
||||||
if (g_suspend_state || !rgb_matrix_config.enable || !userspace_config.rgb_layer_change) { return; }
|
if ( userspace_config.rgb_layer_change &&
|
||||||
|
#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||||
switch (biton32(layer_state)) {
|
!g_suspend_state &&
|
||||||
case _MODS:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
|
||||||
case _GAMEPAD:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0x80, 0x00);
|
|
||||||
rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
|
|
||||||
rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W
|
|
||||||
rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E
|
|
||||||
rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R
|
|
||||||
rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A
|
|
||||||
rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S
|
|
||||||
rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D
|
|
||||||
rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F
|
|
||||||
|
|
||||||
rgb_matrix_set_color(27, 0xFF, 0xFF, 0xFF); // 1
|
|
||||||
rgb_matrix_set_color(26, 0x00, 0xFF, 0x00); // 2
|
|
||||||
rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3
|
|
||||||
|
|
||||||
break;
|
|
||||||
case _DIABLO:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
|
||||||
case _RAISE:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
|
||||||
case _LOWER:
|
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
|
||||||
case _ADJUST:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
|
||||||
default:
|
|
||||||
switch (biton32(default_layer_state)) {
|
|
||||||
case _QWERTY:
|
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
|
|
||||||
case _COLEMAK:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
|
|
||||||
case _DVORAK:
|
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
|
||||||
case _WORKMAN:
|
|
||||||
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
|
|
||||||
case _NORMAN:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break;
|
|
||||||
case _MALTRON:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
|
||||||
case _EUCALYN:
|
|
||||||
rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break;
|
|
||||||
case _CARPLAX:
|
|
||||||
rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
if (this_mod & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK) || this_osm & MOD_MASK_SHIFT) {
|
|
||||||
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
|
|
||||||
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
|
|
||||||
}
|
|
||||||
if (this_mod & MOD_MASK_CTRL || this_osm & MOD_MASK_CTRL) {
|
|
||||||
rgb_matrix_set_color(25, 0xFF, 0x00, 0x00);
|
|
||||||
rgb_matrix_set_color(34, 0xFF, 0x00, 0x00);
|
|
||||||
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
|
|
||||||
|
|
||||||
}
|
|
||||||
if (this_mod & MOD_MASK_GUI || this_osm & MOD_MASK_GUI) {
|
|
||||||
rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00);
|
|
||||||
}
|
|
||||||
if (this_mod & MOD_MASK_ALT || this_osm & MOD_MASK_ALT) {
|
|
||||||
rgb_matrix_set_color(38, 0x00, 0x00, 0xFF);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
|
(!rgblight_config.enable && rgb_matrix_config.enable)
|
||||||
|
#else
|
||||||
|
rgb_matrix_config.enable
|
||||||
|
#endif
|
||||||
|
) {
|
||||||
|
switch (biton32(layer_state)) {
|
||||||
|
case _MODS:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
|
case _GAMEPAD:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x80, 0x00);
|
||||||
|
rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); // Q
|
||||||
|
rgb_matrix_set_color(31, 0x00, 0xFF, 0xFF); // W
|
||||||
|
rgb_matrix_set_color(30, 0xFF, 0x00, 0x00); // E
|
||||||
|
rgb_matrix_set_color(29, 0xFF, 0x80, 0x00); // R
|
||||||
|
rgb_matrix_set_color(37, 0x00, 0xFF, 0xFF); // A
|
||||||
|
rgb_matrix_set_color(36, 0x00, 0xFF, 0xFF); // S
|
||||||
|
rgb_matrix_set_color(35, 0x00, 0xFF, 0xFF); // D
|
||||||
|
rgb_matrix_set_color(34, 0x7A, 0x00, 0xFF); // F
|
||||||
|
|
||||||
|
rgb_matrix_set_color(27, 0xFF, 0xFF, 0xFF); // 1
|
||||||
|
rgb_matrix_set_color(26, 0x00, 0xFF, 0x00); // 2
|
||||||
|
rgb_matrix_set_color(25, 0x7A, 0x00, 0xFF); // 3
|
||||||
|
|
||||||
|
break;
|
||||||
|
case _DIABLO:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
||||||
|
case _RAISE:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
|
case _LOWER:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||||
|
case _ADJUST:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
||||||
|
default:
|
||||||
|
switch (biton32(default_layer_state)) {
|
||||||
|
case _QWERTY:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
|
||||||
|
case _COLEMAK:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
|
||||||
|
case _DVORAK:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||||
|
case _WORKMAN:
|
||||||
|
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
|
||||||
|
case _NORMAN:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break;
|
||||||
|
case _MALTRON:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
|
case _EUCALYN:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break;
|
||||||
|
case _CARPLAX:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
|
||||||
#if 0
|
|
||||||
#ifdef RGB_MATRIX_KEYPRESSES
|
|
||||||
rgblight_mode(RGB_MATRIX_MULTISPLASH);
|
|
||||||
#else
|
|
||||||
rgblight_mode(RGB_MATRIX_RAINBOW_MOVING_CHEVRON);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
#endif //RGB_MATRIX_INIT
|
#endif //RGB_MATRIX_INIT
|
||||||
@@ -1,19 +1,20 @@
|
|||||||
TAP_DANCE_ENABLE = yes
|
TAP_DANCE_ENABLE = yes
|
||||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
|
SPACE_CADET_ENABLE = no
|
||||||
ifneq (,$(findstring ergodox_ez,$(KEYBOARD)))
|
ifneq (,$(findstring ergodox_ez,$(KEYBOARD)))
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
RGB_MATRIX_ENABLE = no
|
RGB_MATRIX_ENABLE = no
|
||||||
endif
|
endif
|
||||||
CONSOLE_ENABLE = no
|
CONSOLE_ENABLE = no
|
||||||
BOOTMAGIC_ENABLE = yes
|
BOOTMAGIC_ENABLE = yes
|
||||||
|
|
||||||
UNICODE_ENABLE = yes
|
UNICODE_ENABLE = yes
|
||||||
UNICDOEMAP_ENABLE = no
|
UNICDOEMAP_ENABLE = no
|
||||||
|
|
||||||
MACROS_ENABLED = no
|
MACROS_ENABLED = no
|
||||||
RGBLIGHT_TWINKLE = no
|
RGBLIGHT_TWINKLE = no
|
||||||
INDICATOR_LIGHTS = no
|
INDICATOR_LIGHTS = no
|
||||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||||
|
|
||||||
DEBOUNCE_TYPE = eager_pk
|
DEBOUNCE_TYPE = eager_pk
|
||||||
@@ -6,10 +6,21 @@
|
|||||||
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow
|
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||||
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
||||||
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended
|
# define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended
|
||||||
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
// #define EECONFIG_RGB_MATRIX (uint32_t *)16
|
// #define EECONFIG_RGB_MATRIX (uint32_t *)16
|
||||||
|
|
||||||
|
# define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||||
|
# define DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||||
|
# define DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||||
|
# define DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||||
|
# define DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
|
||||||
|
# define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -3,18 +3,17 @@
|
|||||||
// #define B6_AUDIO
|
// #define B6_AUDIO
|
||||||
|
|
||||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
||||||
#define RGB_DI_PIN B1
|
# define RGB_DI_PIN B1
|
||||||
#define RGBLED_NUM 16 // Number of LEDs
|
# define RGBLED_NUM 16 // Number of LEDs
|
||||||
|
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
# define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
# define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
# define RGBLIGHT_VAL_STEP 12
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
#if defined(KEYBOARD_primekb_prime_m)
|
#if defined(KEYBOARD_primekb_prime_m)
|
||||||
#undef PRODUCT
|
# undef PRODUCT
|
||||||
#define PRODUCT Drashna Hacked Prime_M Macro Pad
|
# define PRODUCT Drashna Hacked Prime_M Macro Pad
|
||||||
#endif
|
#endif
|
||||||
@@ -2,49 +2,52 @@
|
|||||||
|
|
||||||
|
|
||||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
||||||
#define RGB_DI_PIN B3
|
# define RGB_DI_PIN B3
|
||||||
#define RGBLED_NUM 13 // Number of LEDs
|
# define RGBLED_NUM 13 // Number of LEDs
|
||||||
#define RGBLIGHT_ANIMATIONS
|
# define RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLIGHT_HUE_STEP 12
|
# define RGBLIGHT_HUE_STEP 12
|
||||||
#define RGBLIGHT_SAT_STEP 12
|
# define RGBLIGHT_SAT_STEP 12
|
||||||
#define RGBLIGHT_VAL_STEP 12
|
# define RGBLIGHT_VAL_STEP 12
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
# ifdef RGB_MATRIX_ENABLE
|
||||||
|
# define RGBLIGHT_DISABLE_KEYCODES
|
||||||
|
# endif
|
||||||
#endif // RGBLIGHT_ENABLE
|
#endif // RGBLIGHT_ENABLE
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
# define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot)
|
||||||
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened)
|
||||||
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
|
||||||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended
|
|
||||||
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
// #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 200 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255
|
||||||
#define EECONFIG_RGB_MATRIX (uint32_t *)15
|
# define RGB_DISABLE_WHEN_USB_SUSPENDED true// turn off effects when suspended
|
||||||
|
# ifndef KEYBOARD_planck_ez
|
||||||
|
# define EECONFIG_RGB_MATRIX (uint32_t *)15
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(KEYBOARD_lets_split_rev2)
|
#if defined(KEYBOARD_lets_split_rev2)
|
||||||
#define USE_SERIAL
|
# define USE_SERIAL
|
||||||
#undef USE_I2C
|
# undef USE_I2C
|
||||||
|
# define EE_HANDS
|
||||||
#define EE_HANDS
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(KEYBOARD_planck_light)
|
#if !defined(KEYBOARD_planck_light)
|
||||||
#ifdef RGBLIGHT_ENABLE
|
# ifdef RGBLIGHT_ENABLE
|
||||||
#define NO_MUSIC_MODE
|
# define NO_MUSIC_MODE
|
||||||
#endif // RGBLIGHT_ENABLE
|
# endif // RGBLIGHT_ENABLE
|
||||||
#endif // KEYBOARD_planck_light
|
#endif // KEYBOARD_planck_light
|
||||||
|
|
||||||
|
|
||||||
#if defined(KEYBOARD_planck)
|
#if defined(KEYBOARD_planck)
|
||||||
#undef PRODUCT
|
# undef PRODUCT
|
||||||
#if defined(KEYBOARD_planck_light)
|
# if defined(KEYBOARD_planck_light)
|
||||||
#define PRODUCT Drashna Hacked RGB Beacon (Planck Light)
|
# define PRODUCT Drashna Hacked RGB Beacon (Planck Light)
|
||||||
#elif defined(KEYBOARD_planck_rev6)
|
# elif defined(KEYBOARD_planck_rev6)
|
||||||
#define PRODUCT Drashna Hacked Planck Rev6
|
# define PRODUCT Drashna Hacked Planck Rev6
|
||||||
#elif defined(KEYBOARD_planck_EZ)
|
# elif defined(KEYBOARD_planck_EZ)
|
||||||
#define PRODUCT Drashna Hacked Planck EZ
|
# define PRODUCT Drashna Hacked Planck EZ
|
||||||
#endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -58,7 +61,7 @@
|
|||||||
- MIDI notes can be sent when in Music mode is on
|
- MIDI notes can be sent when in Music mode is on
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MIDI_BASIC
|
// #define MIDI_BASIC
|
||||||
|
|
||||||
/* enable advanced MIDI features:
|
/* enable advanced MIDI features:
|
||||||
- MIDI notes can be added to the keymap
|
- MIDI notes can be added to the keymap
|
||||||
|
|||||||
@@ -34,6 +34,18 @@ enum planck_keycodes {
|
|||||||
#define BACKLIT OSM(MOD_LSFT)
|
#define BACKLIT OSM(MOD_LSFT)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_planck_ez
|
||||||
|
# define PLNK_1 BK_LWER
|
||||||
|
# define PLNK_2 SP_LWER
|
||||||
|
# define PLNK_3 KC_NO
|
||||||
|
# define PLNK_4 ET_RAIS
|
||||||
|
#else
|
||||||
|
# define PLNK_1 SP_LWER
|
||||||
|
# define PLNK_2 BK_LWER
|
||||||
|
# define PLNK_3 DL_RAIS
|
||||||
|
# define PLNK_4 ET_RAIS
|
||||||
|
#endif
|
||||||
|
|
||||||
#define LAYOUT_ortho_4x12_base( \
|
#define LAYOUT_ortho_4x12_base( \
|
||||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||||
@@ -42,8 +54,8 @@ enum planck_keycodes {
|
|||||||
LAYOUT_ortho_4x12_wrapper( \
|
LAYOUT_ortho_4x12_wrapper( \
|
||||||
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
KC_ESC, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, KC_BSPC, \
|
||||||
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
KC_TAB, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, KC_QUOT, \
|
||||||
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_T(K2A), KC_ENT, \
|
KC_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, RCTL_T(K2A), KC_ENT, \
|
||||||
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, SP_LWER, BK_LWER, DL_RAIS, ET_RAIS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
BACKLIT, OS_LCTL, OS_LALT, OS_LGUI, PLNK_1, PLNK_2, PLNK_3, PLNK_4, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \
|
||||||
)
|
)
|
||||||
#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
|
#define LAYOUT_ortho_4x12_base_wrapper(...) LAYOUT_ortho_4x12_base(__VA_ARGS__)
|
||||||
|
|
||||||
@@ -130,128 +142,131 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
|
|
||||||
|
|
||||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
|
#ifdef BACKLIGHT_ENABLE
|
||||||
#ifdef BACKLIGHT_ENABLE
|
case BACKLIT:
|
||||||
case BACKLIT:
|
if (record->event.pressed) {
|
||||||
if (record->event.pressed) {
|
register_code(KC_RSFT);
|
||||||
register_code(KC_RSFT);
|
#ifdef BACKLIGHT_ENABLE
|
||||||
#ifdef BACKLIGHT_ENABLE
|
backlight_step();
|
||||||
backlight_step();
|
#endif
|
||||||
#endif
|
} else {
|
||||||
} else {
|
unregister_code(KC_RSFT);
|
||||||
unregister_code(KC_RSFT);
|
}
|
||||||
}
|
return false;
|
||||||
return false;
|
break;
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool music_mask_user(uint16_t keycode) {
|
bool music_mask_user(uint16_t keycode) {
|
||||||
switch (keycode) {
|
switch (keycode) {
|
||||||
case RAISE:
|
case RAISE:
|
||||||
case LOWER:
|
case LOWER:
|
||||||
case BK_LWER:
|
case BK_LWER:
|
||||||
case SP_LWER:
|
case SP_LWER:
|
||||||
case DL_RAIS:
|
case DL_RAIS:
|
||||||
case ET_RAIS:
|
case ET_RAIS:
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
|
|
||||||
void suspend_power_down_keymap(void) {
|
void suspend_power_down_keymap(void) {
|
||||||
rgb_matrix_set_suspend_state(true);
|
rgb_matrix_set_suspend_state(true);
|
||||||
rgb_matrix_config.enable = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void suspend_wakeup_init_keymap(void) {
|
void suspend_wakeup_init_keymap(void) {
|
||||||
rgb_matrix_config.enable = true;
|
|
||||||
rgb_matrix_set_suspend_state(false);
|
rgb_matrix_set_suspend_state(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) {
|
extern led_config_t g_led_config;
|
||||||
rgb_led led;
|
void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
||||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||||
led = g_rgb_leds[i];
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
if (HAS_FLAGS(led.flags, LED_FLAG_MODIFIER)) {
|
rgb_matrix_set_color( i, red, green, blue );
|
||||||
rgb_matrix_set_color( i, red, green, blue );
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void rgb_matrix_indicators_user(void) {
|
void rgb_matrix_indicators_user(void) {
|
||||||
uint8_t this_mod = get_mods();
|
uint8_t this_mod = get_mods();
|
||||||
uint8_t this_led = host_keyboard_leds();
|
uint8_t this_led = host_keyboard_leds();
|
||||||
uint8_t this_osm = get_oneshot_mods();
|
uint8_t this_osm = get_oneshot_mods();
|
||||||
|
bool is_ez;
|
||||||
|
#ifdef KEYBOARD_planck_ez
|
||||||
|
is_ez = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!g_suspend_state && userspace_config.rgb_layer_change &&
|
if ( userspace_config.rgb_layer_change &&
|
||||||
#if defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
|
#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||||
(!rgblight_config.enable && rgb_matrix_config.enable)
|
!g_suspend_state &&
|
||||||
#else
|
|
||||||
rgb_matrix_config.enable
|
|
||||||
#endif
|
#endif
|
||||||
) {
|
#if defined(RGBLIGHT_ENABLE)
|
||||||
switch (biton32(layer_state)) {
|
(!rgblight_config.enable && rgb_matrix_config.enable)
|
||||||
case _RAISE:
|
#else
|
||||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
|
rgb_matrix_config.enable
|
||||||
case _LOWER:
|
#endif
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
|
) {
|
||||||
case _ADJUST:
|
switch (biton32(layer_state)) {
|
||||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
|
case _RAISE:
|
||||||
default:
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
switch (biton32(default_layer_state)) {
|
case _LOWER:
|
||||||
case _QWERTY:
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, true); break;
|
case _ADJUST:
|
||||||
case _COLEMAK:
|
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
||||||
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, true); break;
|
default:
|
||||||
case _DVORAK:
|
switch (biton32(default_layer_state)) {
|
||||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break;
|
case _QWERTY:
|
||||||
case _WORKMAN:
|
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
|
||||||
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break;
|
case _COLEMAK:
|
||||||
case _NORMAN:
|
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
|
||||||
rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, true); break;
|
case _DVORAK:
|
||||||
case _MALTRON:
|
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, true); break;
|
case _WORKMAN:
|
||||||
case _EUCALYN:
|
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
|
||||||
rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, true); break;
|
case _NORMAN:
|
||||||
case _CARPLAX:
|
rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break;
|
||||||
rgb_matrix_layer_helper(0x00, 0x00, 0xFF, true); break;
|
case _MALTRON:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||||
|
case _EUCALYN:
|
||||||
|
rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break;
|
||||||
|
case _CARPLAX:
|
||||||
|
rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
switch (biton32(default_layer_state)) {
|
switch (biton32(default_layer_state)) {
|
||||||
case _QWERTY:
|
case _QWERTY:
|
||||||
rgb_matrix_set_color(42, 0x00, 0xFF, 0xFF); break;
|
rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0xFF); break;
|
||||||
case _COLEMAK:
|
case _COLEMAK:
|
||||||
rgb_matrix_set_color(42, 0xFF, 0x00, 0xFF); break;
|
rgb_matrix_set_color(is_ez ? 41 : 42, 0xFF, 0x00, 0xFF); break;
|
||||||
case _DVORAK:
|
case _DVORAK:
|
||||||
rgb_matrix_set_color(42, 0x00, 0xFF, 0x00); break;
|
rgb_matrix_set_color(is_ez ? 41 : 42, 0x00, 0xFF, 0x00); break;
|
||||||
case _WORKMAN:
|
case _WORKMAN:
|
||||||
rgb_matrix_set_color(42, 0xD9, 0xA5, 0x21); break;
|
rgb_matrix_set_color(is_ez ? 41 : 42, 0xD9, 0xA5, 0x21); break;
|
||||||
}
|
}
|
||||||
if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK)) {
|
if ( (this_mod | this_osm) & MOD_MASK_SHIFT || this_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||||
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
|
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
|
||||||
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
|
rgb_matrix_set_color(36, 0x00, 0xFF, 0x00);
|
||||||
}
|
}
|
||||||
if ( (this_mod | this_osm) & MOD_MASK_CTRL) {
|
if ( (this_mod | this_osm) & MOD_MASK_CTRL) {
|
||||||
rgb_matrix_set_color(25, 0xFF, 0x00, 0x00);
|
rgb_matrix_set_color(25, 0xFF, 0x00, 0x00);
|
||||||
rgb_matrix_set_color(34, 0xFF, 0x00, 0x00);
|
rgb_matrix_set_color(34, 0xFF, 0x00, 0x00);
|
||||||
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
|
rgb_matrix_set_color(37, 0xFF, 0x00, 0x00);
|
||||||
|
|
||||||
}
|
}
|
||||||
if ( (this_mod | this_osm) & MOD_MASK_GUI) {
|
if ( (this_mod | this_osm) & MOD_MASK_GUI) {
|
||||||
rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00);
|
rgb_matrix_set_color(39, 0xFF, 0xD9, 0x00);
|
||||||
}
|
}
|
||||||
if ( (this_mod | this_osm) & MOD_MASK_ALT) {
|
if ( (this_mod | this_osm) & MOD_MASK_ALT) {
|
||||||
rgb_matrix_set_color(38, 0x00, 0x00, 0xFF);
|
rgb_matrix_set_color(38, 0x00, 0x00, 0xFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
void matrix_init_keymap(void) {
|
||||||
@@ -260,57 +275,81 @@ void matrix_init_keymap(void) {
|
|||||||
#else //RGB_MATRIX_INIT
|
#else //RGB_MATRIX_INIT
|
||||||
|
|
||||||
void matrix_init_keymap(void) {
|
void matrix_init_keymap(void) {
|
||||||
#if !defined(CONVERT_TO_PROTON_C) && !defined(KEYBOARD_planck)
|
#if !defined(CONVERT_TO_PROTON_C) && !defined(KEYBOARD_planck)
|
||||||
setPinOutput(D5);
|
setPinOutput(D5);
|
||||||
writePinHigh(D5);
|
writePinHigh(D5);
|
||||||
|
|
||||||
setPinOutput(B0);
|
setPinOutput(B0);
|
||||||
writePinHigh(B0);
|
writePinHigh(B0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif //RGB_MATRIX_INIT
|
#endif //RGB_MATRIX_INIT
|
||||||
|
|
||||||
#ifdef ENCODER_ENABLE
|
#ifdef ENCODER_ENABLE
|
||||||
void encoder_update(bool clockwise) {
|
void encoder_update(bool clockwise) {
|
||||||
switch (biton32(layer_state)) {
|
switch (biton32(layer_state)) {
|
||||||
case _RAISE:
|
case _RAISE:
|
||||||
clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
|
clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
|
||||||
break;
|
break;
|
||||||
case _LOWER:
|
case _LOWER:
|
||||||
#ifdef RGB_MATRIX_ENABLE
|
#ifdef RGB_MATRIX_ENABLE
|
||||||
clockwise ? rgb_matrix_step() : rgblight_step_reverse();
|
clockwise ? rgb_matrix_step() : rgblight_step_reverse();
|
||||||
#else
|
#else
|
||||||
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
|
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
|
||||||
#endif
|
#endif
|
||||||
case _ADJUST:
|
break;
|
||||||
#ifdef AUDIO_CLICKY
|
case _ADJUST:
|
||||||
clockwise ? clicky_freq_up() : clicky_freq_down();
|
#ifdef AUDIO_CLICKY
|
||||||
#endif
|
clockwise ? clicky_freq_up() : clicky_freq_down();
|
||||||
break;
|
#endif
|
||||||
default:
|
break;
|
||||||
clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP);
|
default:
|
||||||
}
|
clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP);
|
||||||
#ifdef AUDIO_CLICKY
|
}
|
||||||
|
#ifdef AUDIO_CLICKY
|
||||||
clicky_play();
|
clicky_play();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif // ENCODER_ENABLE
|
#endif // ENCODER_ENABLE
|
||||||
|
|
||||||
#ifdef KEYBOARD_planck_rev6
|
#ifdef KEYBOARD_planck_rev6
|
||||||
void dip_update(uint8_t index, bool active) {
|
void dip_update(uint8_t index, bool active) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0:
|
case 0:
|
||||||
if(active) { audio_on(); } else { audio_off(); }
|
if(active) { audio_on(); } else { audio_off(); }
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if(active) { clicky_on(); } else { clicky_off(); }
|
if(active) { clicky_on(); } else { clicky_off(); }
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active;
|
keymap_config.swap_lalt_lgui = keymap_config.swap_ralt_rgui = active;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
userspace_config.nuke_switch = active;
|
userspace_config.nuke_switch = active;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif // KEYBOARD_planck_rev6
|
#endif // KEYBOARD_planck_rev6
|
||||||
|
|
||||||
|
#ifdef KEYBOARD_planck_ez
|
||||||
|
uint32_t layer_state_set_keymap(uint32_t state) {
|
||||||
|
|
||||||
|
palClearPad(GPIOB, 8);
|
||||||
|
palClearPad(GPIOB, 9);
|
||||||
|
switch (biton32(state)) {
|
||||||
|
case _LOWER:
|
||||||
|
palSetPad(GPIOB, 9);
|
||||||
|
break;
|
||||||
|
case _RAISE:
|
||||||
|
palSetPad(GPIOB, 8);
|
||||||
|
break;
|
||||||
|
case _ADJUST:
|
||||||
|
palSetPad(GPIOB, 9);
|
||||||
|
palSetPad(GPIOB, 8);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return state;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
@@ -5,16 +5,27 @@ CONSOLE_ENABLE = no # Console for debug(+400)
|
|||||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||||
TAP_DANCE_ENABLE = no
|
TAP_DANCE_ENABLE = no
|
||||||
AUDIO_ENABLE = yes
|
AUDIO_ENABLE = yes
|
||||||
|
SPACE_CADET_ENABLE = no
|
||||||
|
|
||||||
ifeq (,$(findstring planck/rev6,$(KEYBOARD))) # Make sure it's NOT the Planck Rev6
|
ifeq (,$(findstring planck/rev6,$(KEYBOARD))) # Make sure it's NOT the Planck Rev6
|
||||||
RGBLIGHT_ENABLE = yes
|
RGBLIGHT_ENABLE = yes
|
||||||
INDICATOR_LIGHTS = yes
|
INDICATOR_LIGHTS = yes
|
||||||
RGBLIGHT_TWINKLE = yes
|
RGBLIGHT_TWINKLE = yes
|
||||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||||
endif
|
endif
|
||||||
ifneq (,$(findstring planck/light,$(KEYBOARD))) # Make sure it IS the Planck Light
|
ifneq (,$(findstring planck/light,$(KEYBOARD))) # Make sure it IS the Planck Light
|
||||||
RGB_MATRIX_ENABLE = yes
|
RGB_MATRIX_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = no
|
||||||
RGBLIGHT_STARTUP_ANIMATION = no
|
RGBLIGHT_STARTUP_ANIMATION = no
|
||||||
|
endif
|
||||||
|
ifneq (,$(findstring planck/ez,$(KEYBOARD))) # Make sure it IS the Planck Light
|
||||||
|
RGBLIGHT_ENABLE = no
|
||||||
|
# SERIAL_LINK_ENABLE = yes
|
||||||
|
ENCODER_ENABLE = no
|
||||||
|
RGB_MATRIX_ENABLE = IS31FL3737
|
||||||
|
INDICATOR_LIGHTS = yes
|
||||||
|
RGBLIGHT_TWINKLE = yes
|
||||||
|
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(PROTOCOL)), VUSB)
|
ifeq ($(strip $(PROTOCOL)), VUSB)
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
#pragma once
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rs.h"
|
||||||
|
|
||||||
|
// Used to create a keymap using only KC_ prefixed keys
|
||||||
|
#define LAYOUT_kc( \
|
||||||
|
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||||
|
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||||
|
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||||
|
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||||
|
) \
|
||||||
|
LAYOUT_ortho_4x12( \
|
||||||
|
KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
|
||||||
|
KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
|
||||||
|
KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
|
||||||
|
KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
|
||||||
|
)
|
||||||
|
|
||||||
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
[_QWERTY] = LAYOUT_kc( \
|
||||||
|
// ,-----------------------------------------------------------------------------------.
|
||||||
|
TAB , Q , W , E , R , T , Y , U , I , O , P , EQL ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
ESCC , A , S , D , F , G , H , J , K , L , SCLN , QUOT ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT
|
||||||
|
// `-----------------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
[_CODE] = LAYOUT_kc(
|
||||||
|
// ,-----------------------------------------------------------------------------------.
|
||||||
|
GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, , , , , DOT , , , , , ,
|
||||||
|
// `-----------------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT_kc(
|
||||||
|
// ,-----------------------------------------------------------------------------------.
|
||||||
|
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, , , , , , MUTE , , , , ,
|
||||||
|
// `-----------------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
};
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
@@ -3,20 +3,19 @@
|
|||||||
|
|
||||||
/* ws2812 RGB LED */
|
/* ws2812 RGB LED */
|
||||||
#if defined(KEYBOARD_fractal)
|
#if defined(KEYBOARD_fractal)
|
||||||
#define RGB_DI_PIN D2
|
# define RGB_DI_PIN D2
|
||||||
#undef RGBLED_NUM
|
# undef RGBLED_NUM
|
||||||
#define RGBLIGHT_ANIMATIONS
|
# define RGBLIGHT_ANIMATIONS
|
||||||
#define RGBLED_NUM 29 // Number of LEDs
|
# define RGBLED_NUM 29 // Number of LEDs
|
||||||
#undef RGBLIGHT_HUE_STEP
|
# undef RGBLIGHT_HUE_STEP
|
||||||
#define RGBLIGHT_HUE_STEP 8
|
# define RGBLIGHT_HUE_STEP 8
|
||||||
#undef RGBLIGHT_SAT_STEP
|
# undef RGBLIGHT_SAT_STEP
|
||||||
#define RGBLIGHT_SAT_STEP 8
|
# define RGBLIGHT_SAT_STEP 8
|
||||||
#undef RGBLIGHT_VAL_STEP
|
# undef RGBLIGHT_VAL_STEP
|
||||||
#define RGBLIGHT_VAL_STEP 8
|
# define RGBLIGHT_VAL_STEP 8
|
||||||
#define RGBLIGHT_LIMIT_VAL 175
|
# define RGBLIGHT_LIMIT_VAL 175
|
||||||
#define RGBLIGHT_SLEEP
|
# define RGBLIGHT_SLEEP
|
||||||
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3
|
|
||||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14
|
|
||||||
|
|
||||||
|
# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3
|
||||||
|
# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14
|
||||||
#endif
|
#endif
|
||||||
@@ -1,35 +1 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#ifdef AUDIO_ENABLE
|
|
||||||
//#define STARTUP_SONG SONG(PREONIC_SOUND)
|
|
||||||
#define STARTUP_SONG SONG(NO_SOUND)
|
|
||||||
|
|
||||||
#define DEFAULT_LAYER_SONGS \
|
|
||||||
{ SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) }
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MUSIC_MASK (keycode != KC_NO)
|
|
||||||
|
|
||||||
/*
|
|
||||||
* MIDI options
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Prevent use of disabled MIDI features in the keymap */
|
|
||||||
//#define MIDI_ENABLE_STRICT 1
|
|
||||||
|
|
||||||
/* enable basic MIDI features:
|
|
||||||
- MIDI notes can be sent when in Music mode is on
|
|
||||||
*/
|
|
||||||
|
|
||||||
#define MIDI_BASIC
|
|
||||||
|
|
||||||
/* enable advanced MIDI features:
|
|
||||||
- MIDI notes can be added to the keymap
|
|
||||||
- Octave shift and transpose
|
|
||||||
- Virtual sustain, portamento, and modulation wheel
|
|
||||||
- etc.
|
|
||||||
*/
|
|
||||||
//#define MIDI_ADVANCED
|
|
||||||
|
|
||||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
|
||||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
|
||||||
@@ -1,154 +0,0 @@
|
|||||||
{
|
|
||||||
"title": "RS",
|
|
||||||
"rules": [{
|
|
||||||
"description": "CapsLock to Escape / Control Mod-Tap",
|
|
||||||
"manipulators": [{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "caps_lock",
|
|
||||||
"modifiers": {
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "left_control"}],
|
|
||||||
"to_if_alone": [{"key_code": "escape"}]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Right-Shift / Enter Mod-Tap",
|
|
||||||
"manipulators": [{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "right_shift",
|
|
||||||
"modifiers": {
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "right_shift"}],
|
|
||||||
"to_if_alone": [{"key_code": "return_or_enter"}]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Right-Command / Backspace Mod-Tap",
|
|
||||||
"manipulators": [{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "right_command",
|
|
||||||
"modifiers": {
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "right_command"}],
|
|
||||||
"to_if_alone": [{"key_code": "delete_or_backspace"}]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Right-Command Accents",
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "a",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["left_shift", "right_shift"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [
|
|
||||||
{"key_code": "grave_accent_and_tilde", "modifiers": ["left_option"]},
|
|
||||||
{"key_code": "a"}
|
|
||||||
]
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Right Command Navigation",
|
|
||||||
"manipulators": [{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "j",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "left_arrow"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "k",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "down_arrow"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "i",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "up_arrow"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "l",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "right_arrow"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "e",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "page_up"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "d",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "page_down"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "s",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "home"}]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "basic",
|
|
||||||
"from": {
|
|
||||||
"key_code": "f",
|
|
||||||
"modifiers": {
|
|
||||||
"mandatory": ["right_command"],
|
|
||||||
"optional": ["any"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to": [{"key_code": "end"}]
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
@@ -1,19 +1,5 @@
|
|||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
#include "rs.h"
|
||||||
enum layers {
|
|
||||||
_QWERTY,
|
|
||||||
_HYPER,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define KC_ KC_TRNS
|
|
||||||
|
|
||||||
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
|
|
||||||
#define KC_RST RESET
|
|
||||||
#define KC_BSPH LT(_HYPER, KC_BSPC)
|
|
||||||
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
|
|
||||||
// Brightness
|
|
||||||
#define KC_BRUP KC_PAUS
|
|
||||||
#define KC_BRDN KC_SLCK
|
|
||||||
|
|
||||||
// Used to create a keymap using only KC_ prefixed keys
|
// Used to create a keymap using only KC_ prefixed keys
|
||||||
#ifndef LAYOUT_kc
|
#ifndef LAYOUT_kc
|
||||||
@@ -34,7 +20,6 @@ enum layers {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_kc( \
|
[_QWERTY] = LAYOUT_kc( \
|
||||||
// ,-----------------------------------------------------------------------------------.
|
// ,-----------------------------------------------------------------------------------.
|
||||||
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS ,
|
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS ,
|
||||||
@@ -45,21 +30,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||||||
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS ,
|
LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS ,
|
||||||
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
, LCTL , LALT , LGUI , SPC , SPC , BSPC , BSPH , LEFT , DOWN , UP , RGHT
|
, , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT
|
||||||
// `---------------------------------------------------+-------------------------------'
|
// `---------------------------------------------------+-------------------------------'
|
||||||
), // |
|
),
|
||||||
// |
|
[_CODE] = LAYOUT_kc(
|
||||||
[_HYPER] = LAYOUT_kc( /* V */ \
|
|
||||||
// ,-----------------------------------------------------------------------------------.
|
// ,-----------------------------------------------------------------------------------.
|
||||||
RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , ,
|
, , , , , , , , , , , ,
|
||||||
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
, , , PGUP , , , , , UP , LCBR , RCBR , BSLS ,
|
GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , ,
|
||||||
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
, , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE ,
|
, 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS ,
|
||||||
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
, , , , , , , , , BRDN , BRUP , ,
|
, 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE ,
|
||||||
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
, , , , , , , , MUTE , VOLD , VOLU , MPLY
|
, , , , , DOT , , , , , ,
|
||||||
|
// `-----------------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
[_FN] = LAYOUT_kc(
|
||||||
|
// ,-----------------------------------------------------------------------------------.
|
||||||
|
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, , , , , , , , , , , ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , ,
|
||||||
|
// |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||||
|
, , , , , , MUTE , , , , ,
|
||||||
// `-----------------------------------------------------------------------------------'
|
// `-----------------------------------------------------------------------------------'
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1,17 +1 @@
|
|||||||
# Code friendly 60% keymap
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
|
|
||||||
I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys.
|
|
||||||
|
|
||||||
The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement.
|
|
||||||
|
|
||||||
The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout.
|
|
||||||
|
|
||||||
Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc.
|
|
||||||
|
|
||||||
This keymap has been tested with those keyboards:
|
|
||||||
- [Preonic](../../../../keyboards/preonic/)
|
|
||||||
- [My preonic clone](../../../rs60/)
|
|
||||||
|
|
||||||
Checkout an adaptation of this keymap for other keyboards:
|
|
||||||
- [Iris/rs](../../../../keyboards/iris/keymaps/rs/keymap.c)
|
|
||||||
- [ErgoTravel/rs](../../../../keyboards/ergotravel/keymaps/rs/keymap.c)
|
|
||||||
+28
-9
@@ -38,6 +38,7 @@
|
|||||||
#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
|
#include "rgb_matrix_animations/rainbow_pinwheels_anim.h"
|
||||||
#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
|
#include "rgb_matrix_animations/rainbow_moving_chevron_anim.h"
|
||||||
#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
|
#include "rgb_matrix_animations/jellybean_raindrops_anim.h"
|
||||||
|
#include "rgb_matrix_animations/typing_heatmap_anim.h"
|
||||||
#include "rgb_matrix_animations/digital_rain_anim.h"
|
#include "rgb_matrix_animations/digital_rain_anim.h"
|
||||||
#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
|
#include "rgb_matrix_animations/solid_reactive_simple_anim.h"
|
||||||
#include "rgb_matrix_animations/solid_reactive_anim.h"
|
#include "rgb_matrix_animations/solid_reactive_anim.h"
|
||||||
@@ -105,11 +106,16 @@
|
|||||||
|
|
||||||
bool g_suspend_state = false;
|
bool g_suspend_state = false;
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
rgb_config_t rgb_matrix_config;
|
rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
rgb_counters_t g_rgb_counters;
|
rgb_counters_t g_rgb_counters;
|
||||||
static uint32_t rgb_counters_buffer;
|
static uint32_t rgb_counters_buffer;
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS] = {{0}};
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
last_hit_t g_last_hit_tracker;
|
last_hit_t g_last_hit_tracker;
|
||||||
static last_hit_t last_hit_buffer;
|
static last_hit_t last_hit_buffer;
|
||||||
@@ -150,14 +156,11 @@ uint8_t rgb_matrix_map_row_column_to_led_kb(uint8_t row, uint8_t column, uint8_t
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
|
uint8_t rgb_matrix_map_row_column_to_led(uint8_t row, uint8_t column, uint8_t *led_i) {
|
||||||
// TODO: This is kinda expensive, fix this soonish
|
|
||||||
uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
|
uint8_t led_count = rgb_matrix_map_row_column_to_led_kb(row, column, led_i);
|
||||||
for (uint8_t i = 0; i < DRIVER_LED_TOTAL && led_count < LED_HITS_TO_REMEMBER; i++) {
|
uint8_t led_index = g_led_config.matrix_co[row][column];
|
||||||
matrix_co_t matrix_co = g_rgb_leds[i].matrix_co;
|
if (led_index != NO_LED) {
|
||||||
if (row == matrix_co.row && column == matrix_co.col) {
|
led_i[led_count] = led_index;
|
||||||
led_i[led_count] = i;
|
led_count++;
|
||||||
led_count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return led_count;
|
return led_count;
|
||||||
}
|
}
|
||||||
@@ -201,13 +204,20 @@ bool process_rgb_matrix(uint16_t keycode, keyrecord_t *record) {
|
|||||||
|
|
||||||
for(uint8_t i = 0; i < led_count; i++) {
|
for(uint8_t i = 0; i < led_count; i++) {
|
||||||
uint8_t index = last_hit_buffer.count;
|
uint8_t index = last_hit_buffer.count;
|
||||||
last_hit_buffer.x[index] = g_rgb_leds[led[i]].point.x;
|
last_hit_buffer.x[index] = g_led_config.point[led[i]].x;
|
||||||
last_hit_buffer.y[index] = g_rgb_leds[led[i]].point.y;
|
last_hit_buffer.y[index] = g_led_config.point[led[i]].y;
|
||||||
last_hit_buffer.index[index] = led[i];
|
last_hit_buffer.index[index] = led[i];
|
||||||
last_hit_buffer.tick[index] = 0;
|
last_hit_buffer.tick[index] = 0;
|
||||||
last_hit_buffer.count++;
|
last_hit_buffer.count++;
|
||||||
}
|
}
|
||||||
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
|
#endif // RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
|
|
||||||
|
#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
|
||||||
|
if (rgb_matrix_config.mode == RGB_MATRIX_TYPING_HEATMAP) {
|
||||||
|
process_rgb_matrix_typing_heatmap(record);
|
||||||
|
}
|
||||||
|
#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_TYPING_HEATMAP)
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,11 +382,20 @@ static void rgb_task_render(uint8_t effect) {
|
|||||||
rendering = rgb_matrix_jellybean_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms
|
rendering = rgb_matrix_jellybean_raindrops(&rgb_effect_params); // Max 1ms Avg 0ms
|
||||||
break;
|
break;
|
||||||
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
|
|
||||||
|
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
#ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
case RGB_MATRIX_TYPING_HEATMAP:
|
||||||
|
rendering = rgb_matrix_typing_heatmap(&rgb_effect_params); // Max 4ms Avg 3ms
|
||||||
|
break;
|
||||||
|
#endif // DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
case RGB_MATRIX_DIGITAL_RAIN:
|
case RGB_MATRIX_DIGITAL_RAIN:
|
||||||
rendering = rgb_matrix_digital_rain(&rgb_effect_params); // Max 9ms Avg 8ms | this is expensive, fix it
|
rendering = rgb_matrix_digital_rain(&rgb_effect_params); // Max 9ms Avg 8ms | this is expensive, fix it
|
||||||
break;
|
break;
|
||||||
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
|
#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
|
||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
case RGB_MATRIX_SOLID_REACTIVE_SIMPLE:
|
case RGB_MATRIX_SOLID_REACTIVE_SIMPLE:
|
||||||
|
|||||||
@@ -54,9 +54,7 @@
|
|||||||
uint8_t max = DRIVER_LED_TOTAL;
|
uint8_t max = DRIVER_LED_TOTAL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) continue
|
#define RGB_MATRIX_TEST_LED_FLAGS() if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) continue
|
||||||
|
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -103,9 +101,14 @@ enum rgb_matrix_effects {
|
|||||||
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
RGB_MATRIX_JELLYBEAN_RAINDROPS,
|
RGB_MATRIX_JELLYBEAN_RAINDROPS,
|
||||||
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
#endif // DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
|
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
|
#ifndef DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
|
RGB_MATRIX_TYPING_HEATMAP,
|
||||||
|
#endif // DISABLE_RGB_MATRIX_TYPING_HEATMAP
|
||||||
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
RGB_MATRIX_DIGITAL_RAIN,
|
RGB_MATRIX_DIGITAL_RAIN,
|
||||||
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
||||||
|
#endif // RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
RGB_MATRIX_SOLID_REACTIVE_SIMPLE,
|
RGB_MATRIX_SOLID_REACTIVE_SIMPLE,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
|
#ifndef DISABLE_RGB_MATRIX_ALPHAS_MODS
|
||||||
|
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
// alphas = color1, mods = color2
|
// alphas = color1, mods = color2
|
||||||
@@ -15,7 +15,7 @@ bool rgb_matrix_alphas_mods(effect_params_t* params) {
|
|||||||
|
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
if (HAS_FLAGS(g_rgb_leds[i].flags, LED_FLAG_MODIFIER)) {
|
if (HAS_FLAGS(g_led_config.flags[i], LED_FLAG_MODIFIER)) {
|
||||||
rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
|
rgb_matrix_set_color(i, rgb2.r, rgb2.g, rgb2.b);
|
||||||
} else {
|
} else {
|
||||||
rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);
|
rgb_matrix_set_color(i, rgb1.r, rgb1.g, rgb1.b);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
|
#ifndef DISABLE_RGB_MATRIX_CYCLE_ALL
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_cycle_all(effect_params_t* params) {
|
bool rgb_matrix_cycle_all(effect_params_t* params) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
#ifndef DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_cycle_left_right(effect_params_t* params) {
|
bool rgb_matrix_cycle_left_right(effect_params_t* params) {
|
||||||
@@ -12,8 +12,7 @@ bool rgb_matrix_cycle_left_right(effect_params_t* params) {
|
|||||||
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
|
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
hsv.h = g_led_config.point[i].x - time;
|
||||||
hsv.h = point.x - time;
|
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
#ifndef DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_cycle_up_down(effect_params_t* params) {
|
bool rgb_matrix_cycle_up_down(effect_params_t* params) {
|
||||||
@@ -12,8 +12,7 @@ bool rgb_matrix_cycle_up_down(effect_params_t* params) {
|
|||||||
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
|
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
hsv.h = g_led_config.point[i].y - time;
|
||||||
hsv.h = point.y - time;
|
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#if defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
|
||||||
|
|
||||||
#ifndef RGB_DIGITAL_RAIN_DROPS
|
#ifndef RGB_DIGITAL_RAIN_DROPS
|
||||||
// lower the number for denser effect/wider keyboard
|
// lower the number for denser effect/wider keyboard
|
||||||
#define RGB_DIGITAL_RAIN_DROPS 24
|
#define RGB_DIGITAL_RAIN_DROPS 24
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern uint8_t rgb_frame_buffer[MATRIX_ROWS][MATRIX_COLS];
|
||||||
|
|
||||||
bool rgb_matrix_digital_rain(effect_params_t* params) {
|
bool rgb_matrix_digital_rain(effect_params_t* params) {
|
||||||
// algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
|
// algorithm ported from https://github.com/tremby/Kaleidoscope-LEDEffect-DigitalRain
|
||||||
const uint8_t drop_ticks = 28;
|
const uint8_t drop_ticks = 28;
|
||||||
@@ -13,24 +15,24 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
|
|||||||
const uint8_t max_brightness_boost = 0xc0;
|
const uint8_t max_brightness_boost = 0xc0;
|
||||||
const uint8_t max_intensity = 0xff;
|
const uint8_t max_intensity = 0xff;
|
||||||
|
|
||||||
static uint8_t map[MATRIX_COLS][MATRIX_ROWS] = {{0}};
|
|
||||||
static uint8_t drop = 0;
|
static uint8_t drop = 0;
|
||||||
|
|
||||||
if (params->init) {
|
if (params->init) {
|
||||||
rgb_matrix_set_color_all(0, 0, 0);
|
rgb_matrix_set_color_all(0, 0, 0);
|
||||||
memset(map, 0, sizeof map);
|
memset(rgb_frame_buffer, 0, sizeof rgb_frame_buffer);
|
||||||
drop = 0;
|
drop = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||||
if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
|
if (row == 0 && drop == 0 && rand() < RAND_MAX / RGB_DIGITAL_RAIN_DROPS) {
|
||||||
// top row, pixels have just fallen and we're
|
// top row, pixels have just fallen and we're
|
||||||
// making a new rain drop in this column
|
// making a new rain drop in this column
|
||||||
map[col][row] = max_intensity;
|
rgb_frame_buffer[col][row] = max_intensity;
|
||||||
}
|
}
|
||||||
else if (map[col][row] > 0 && map[col][row] < max_intensity) {
|
else if (rgb_frame_buffer[col][row] > 0 && rgb_frame_buffer[col][row] < max_intensity) {
|
||||||
// neither fully bright nor dark, decay it
|
// neither fully bright nor dark, decay it
|
||||||
map[col][row]--;
|
rgb_frame_buffer[col][row]--;
|
||||||
}
|
}
|
||||||
// set the pixel colour
|
// set the pixel colour
|
||||||
uint8_t led[LED_HITS_TO_REMEMBER];
|
uint8_t led[LED_HITS_TO_REMEMBER];
|
||||||
@@ -38,32 +40,33 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
|
|||||||
|
|
||||||
// TODO: multiple leds are supported mapped to the same row/column
|
// TODO: multiple leds are supported mapped to the same row/column
|
||||||
if (led_count > 0) {
|
if (led_count > 0) {
|
||||||
if (map[col][row] > pure_green_intensity) {
|
if (rgb_frame_buffer[col][row] > pure_green_intensity) {
|
||||||
const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (map[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity));
|
const uint8_t boost = (uint8_t) ((uint16_t) max_brightness_boost * (rgb_frame_buffer[col][row] - pure_green_intensity) / (max_intensity - pure_green_intensity));
|
||||||
rgb_matrix_set_color(led[0], boost, max_intensity, boost);
|
rgb_matrix_set_color(led[0], boost, max_intensity, boost);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const uint8_t green = (uint8_t) ((uint16_t) max_intensity * map[col][row] / pure_green_intensity);
|
const uint8_t green = (uint8_t) ((uint16_t) max_intensity * rgb_frame_buffer[col][row] / pure_green_intensity);
|
||||||
rgb_matrix_set_color(led[0], 0, green, 0);
|
rgb_matrix_set_color(led[0], 0, green, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (++drop > drop_ticks) {
|
if (++drop > drop_ticks) {
|
||||||
// reset drop timer
|
// reset drop timer
|
||||||
drop = 0;
|
drop = 0;
|
||||||
for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
|
for (uint8_t row = MATRIX_ROWS - 1; row > 0; row--) {
|
||||||
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
for (uint8_t col = 0; col < MATRIX_COLS; col++) {
|
||||||
// if ths is on the bottom row and bright allow decay
|
// if ths is on the bottom row and bright allow decay
|
||||||
if (row == MATRIX_ROWS - 1 && map[col][row] == max_intensity) {
|
if (row == MATRIX_ROWS - 1 && rgb_frame_buffer[col][row] == max_intensity) {
|
||||||
map[col][row]--;
|
rgb_frame_buffer[col][row]--;
|
||||||
}
|
}
|
||||||
// check if the pixel above is bright
|
// check if the pixel above is bright
|
||||||
if (map[col][row - 1] == max_intensity) {
|
if (rgb_frame_buffer[col][row - 1] == max_intensity) {
|
||||||
// allow old bright pixel to decay
|
// allow old bright pixel to decay
|
||||||
map[col][row - 1]--;
|
rgb_frame_buffer[col][row - 1]--;
|
||||||
// make this pixel bright
|
// make this pixel bright
|
||||||
map[col][row] = max_intensity;
|
rgb_frame_buffer[col][row] = max_intensity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -71,4 +74,4 @@ bool rgb_matrix_digital_rain(effect_params_t* params) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // DISABLE_RGB_MATRIX_DIGITAL_RAIN
|
#endif // defined(RGB_MATRIX_FRAMEBUFFER_EFFECTS) && !defined(DISABLE_RGB_MATRIX_DIGITAL_RAIN)
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
|
#ifndef DISABLE_RGB_MATRIX_DUAL_BEACON
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_dual_beacon(effect_params_t* params) {
|
bool rgb_matrix_dual_beacon(effect_params_t* params) {
|
||||||
@@ -14,8 +14,7 @@ bool rgb_matrix_dual_beacon(effect_params_t* params) {
|
|||||||
int8_t sin_value = sin8(time) - 128;
|
int8_t sin_value = sin8(time) - 128;
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (g_led_config.point[i].x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
|
||||||
hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
|
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
#ifndef DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
|
||||||
|
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_gradient_up_down(effect_params_t* params) {
|
bool rgb_matrix_gradient_up_down(effect_params_t* params) {
|
||||||
@@ -11,10 +11,9 @@ bool rgb_matrix_gradient_up_down(effect_params_t* params) {
|
|||||||
uint8_t scale = scale8(64, rgb_matrix_config.speed);
|
uint8_t scale = scale8(64, rgb_matrix_config.speed);
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
|
||||||
// The y range will be 0..64, map this to 0..4
|
// The y range will be 0..64, map this to 0..4
|
||||||
// Relies on hue being 8-bit and wrapping
|
// Relies on hue being 8-bit and wrapping
|
||||||
hsv.h = rgb_matrix_config.hue + scale * (point.y >> 4);
|
hsv.h = rgb_matrix_config.hue + scale * (g_led_config.point[i].y >> 4);
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
#ifndef DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
|
static void jellybean_raindrops_set_color(int i, effect_params_t* params) {
|
||||||
if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return;
|
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
|
||||||
HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val };
|
HSV hsv = { rand() & 0xFF , rand() & 0xFF, rgb_matrix_config.val };
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
#ifndef DISABLE_RGB_MATRIX_RAINBOW_BEACON
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
|
bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
|
||||||
@@ -14,8 +14,7 @@ bool rgb_matrix_rainbow_beacon(effect_params_t* params) {
|
|||||||
int16_t sin_value = 2 * (sin8(time) - 128);
|
int16_t sin_value = 2 * (sin8(time) - 128);
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (g_led_config.point[i].x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
|
||||||
hsv.h = ((point.y - 32) * cos_value + (point.x - 112) * sin_value) / 128 + rgb_matrix_config.hue;
|
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
#ifndef DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
|
bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
|
||||||
@@ -12,8 +12,7 @@ bool rgb_matrix_rainbow_moving_chevron(effect_params_t* params) {
|
|||||||
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
|
uint8_t time = scale16by8(g_rgb_counters.tick, rgb_matrix_config.speed / 4);
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
hsv.h = abs8(g_led_config.point[i].y - 32) + (g_led_config.point[i].x - time) + rgb_matrix_config.hue;
|
||||||
hsv.h = abs8(point.y - 32) + (point.x - time) + rgb_matrix_config.hue;
|
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
#ifndef DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
|
bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
|
||||||
@@ -14,8 +14,7 @@ bool rgb_matrix_rainbow_pinwheels(effect_params_t* params) {
|
|||||||
int16_t sin_value = 3 * (sin8(time) - 128);
|
int16_t sin_value = 3 * (sin8(time) - 128);
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
point_t point = g_rgb_leds[i].point;
|
hsv.h = ((g_led_config.point[i].y - 32) * cos_value + (56 - abs8(g_led_config.point[i].x - 112)) * sin_value) / 128 + rgb_matrix_config.hue;
|
||||||
hsv.h = ((point.y - 32) * cos_value + (56 - abs8(point.x - 112)) * sin_value) / 128 + rgb_matrix_config.hue;
|
|
||||||
RGB rgb = hsv_to_rgb(hsv);
|
RGB rgb = hsv_to_rgb(hsv);
|
||||||
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
rgb_matrix_set_color(i, rgb.r, rgb.g, rgb.b);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,10 +3,11 @@
|
|||||||
#include "rgb_matrix_types.h"
|
#include "rgb_matrix_types.h"
|
||||||
|
|
||||||
extern rgb_counters_t g_rgb_counters;
|
extern rgb_counters_t g_rgb_counters;
|
||||||
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
static void raindrops_set_color(int i, effect_params_t* params) {
|
static void raindrops_set_color(int i, effect_params_t* params) {
|
||||||
if (!HAS_ANY_FLAGS(g_rgb_leds[i].flags, params->flags)) return;
|
if (!HAS_ANY_FLAGS(g_led_config.flags[i], params->flags)) return;
|
||||||
HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val };
|
HSV hsv = { 0 , rgb_matrix_config.sat, rgb_matrix_config.val };
|
||||||
|
|
||||||
// Take the shortest path between hues
|
// Take the shortest path between hues
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
|
|
||||||
bool rgb_matrix_solid_color(effect_params_t* params) {
|
bool rgb_matrix_solid_color(effect_params_t* params) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED)
|
#if defined(RGB_MATRIX_KEYREACTIVE_ENABLED)
|
||||||
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
extern last_hit_t g_last_hit_tracker;
|
extern last_hit_t g_last_hit_tracker;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
|
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS)
|
||||||
|
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
extern last_hit_t g_last_hit_tracker;
|
extern last_hit_t g_last_hit_tracker;
|
||||||
|
|
||||||
@@ -13,11 +13,10 @@ static bool rgb_matrix_solid_reactive_multicross_range(uint8_t start, effect_par
|
|||||||
uint8_t count = g_last_hit_tracker.count;
|
uint8_t count = g_last_hit_tracker.count;
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
hsv.v = 0;
|
hsv.v = 0;
|
||||||
point_t point = g_rgb_leds[i].point;
|
|
||||||
for (uint8_t j = start; j < count; j++) {
|
for (uint8_t j = start; j < count; j++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
int16_t dx = point.x - g_last_hit_tracker.x[j];
|
int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
|
||||||
int16_t dy = point.y - g_last_hit_tracker.y[j];
|
int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
|
||||||
uint8_t dist = sqrt16(dx * dx + dy * dy);
|
uint8_t dist = sqrt16(dx * dx + dy * dy);
|
||||||
int16_t dist2 = 16;
|
int16_t dist2 = 16;
|
||||||
uint8_t dist3;
|
uint8_t dist3;
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
|
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS)
|
||||||
|
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
extern last_hit_t g_last_hit_tracker;
|
extern last_hit_t g_last_hit_tracker;
|
||||||
|
|
||||||
@@ -13,11 +13,10 @@ static bool rgb_matrix_solid_reactive_multinexus_range(uint8_t start, effect_par
|
|||||||
uint8_t count = g_last_hit_tracker.count;
|
uint8_t count = g_last_hit_tracker.count;
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
hsv.v = 0;
|
hsv.v = 0;
|
||||||
point_t point = g_rgb_leds[i].point;
|
|
||||||
for (uint8_t j = start; j < count; j++) {
|
for (uint8_t j = start; j < count; j++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
int16_t dx = point.x - g_last_hit_tracker.x[j];
|
int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
|
||||||
int16_t dy = point.y - g_last_hit_tracker.y[j];
|
int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
|
||||||
uint8_t dist = sqrt16(dx * dx + dy * dy);
|
uint8_t dist = sqrt16(dx * dx + dy * dy);
|
||||||
int16_t dist2 = 8;
|
int16_t dist2 = 8;
|
||||||
uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist;
|
uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) - dist;
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
#ifndef DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
|
||||||
|
|
||||||
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
extern last_hit_t g_last_hit_tracker;
|
extern last_hit_t g_last_hit_tracker;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
#ifdef RGB_MATRIX_KEYREACTIVE_ENABLED
|
||||||
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
|
#if !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE) || !defined(DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE)
|
||||||
|
|
||||||
extern rgb_led g_rgb_leds[DRIVER_LED_TOTAL];
|
extern led_config_t g_led_config;
|
||||||
extern rgb_config_t rgb_matrix_config;
|
extern rgb_config_t rgb_matrix_config;
|
||||||
extern last_hit_t g_last_hit_tracker;
|
extern last_hit_t g_last_hit_tracker;
|
||||||
|
|
||||||
@@ -13,11 +13,10 @@ static bool rgb_matrix_solid_reactive_multiwide_range(uint8_t start, effect_para
|
|||||||
uint8_t count = g_last_hit_tracker.count;
|
uint8_t count = g_last_hit_tracker.count;
|
||||||
for (uint8_t i = led_min; i < led_max; i++) {
|
for (uint8_t i = led_min; i < led_max; i++) {
|
||||||
hsv.v = 0;
|
hsv.v = 0;
|
||||||
point_t point = g_rgb_leds[i].point;
|
|
||||||
for (uint8_t j = start; j < count; j++) {
|
for (uint8_t j = start; j < count; j++) {
|
||||||
RGB_MATRIX_TEST_LED_FLAGS();
|
RGB_MATRIX_TEST_LED_FLAGS();
|
||||||
int16_t dx = point.x - g_last_hit_tracker.x[j];
|
int16_t dx = g_led_config.point[i].x - g_last_hit_tracker.x[j];
|
||||||
int16_t dy = point.y - g_last_hit_tracker.y[j];
|
int16_t dy = g_led_config.point[i].y - g_last_hit_tracker.y[j];
|
||||||
uint8_t dist = sqrt16(dx * dx + dy * dy);
|
uint8_t dist = sqrt16(dx * dx + dy * dy);
|
||||||
uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) + dist * 5;
|
uint16_t effect = scale16by8(g_last_hit_tracker.tick[j], rgb_matrix_config.speed) + dist * 5;
|
||||||
if (effect > 255)
|
if (effect > 255)
|
||||||
|
|||||||
Loaded 100 of 124 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user