Compare commits

...
11 Commits
Author SHA1 Message Date
XScorpion2 60eae7335b RGB Matrix Typing Heatmap (#5786)
* RGB Matrix Typing Heatmap Effect

* Fixing file name and effect init
2019-05-07 19:17:00 -07:00
XScorpion2 af89752bff rgb_led struct conversion (aka: Per led (key) type rgb matrix effects - part 2) (#5783)
* Initial conversion of the rgb_led struct

* Converting last keyboard & updating effects to take advantage of the new structure

* New struct should not be const

* Updated docs

* Changing define ___ for no led to NO_LED

* Missed converting some keymap usages of the old struct layout
2019-05-07 16:22:46 -07:00
Chuck Lauer Vose c7f8548d9a Add layout description to keymap.c (#5810) 2019-05-07 14:43:00 -07:00
Rainer Clasen 12e6d41202 [Split] fix split_common i2c backlight disabling (#3886)
slave backlight was always on - as get_backlight_level() doesn't
indicate if the backlight is enabled or not.

also updated the corosponding code for serial transport to stop peeking
directly at 'internal' backlight_config structure.
2019-05-07 10:45:10 -07:00
Olivier Poitrey 2d5c16dfd4 [Keymap] crkbd/keymaps/rs: add rs keymap to corne keyboard and adapt others (#5181)
Update all my keymaps to work with 40 keys. Refactor code using
Userspace.
2019-05-07 10:43:08 -07:00
kaylanm 3b13259942 Add remaining RGB light components. (#5785) 2019-05-07 06:36:40 -07:00
Chuck Lauer Vose 97b8567a1f Adding bdn9 keymap examples for company event (#5800)
* Adding bdn9 keymap examples for company event

* Simplify some code w/ tap_code16 [pr feedback]

- Also remove backslashes
- Remove xxx and ___ layer definitions
- Properly name enums
- Add newline after slack reaction
2019-05-06 22:36:21 -07:00
Drashna Jaelre f3d5b1091d [Keymap] RGB Changes for Drashna Keyboards (#5803)
* Disable a bunch of reactive modes

* Enable rgb matrix for Corne Keyboard

* Convert CRKBD to rgb matrix

* Add Gergo keyboard layout

* Make Diablo 3 tap dance better

* Add basic support for Planck EZ

* Fix RGB Matrix stuff

* Fix keycodes for Planck EZ

* Update CRKBD OLED stuff

* Fix typo for sleep on ergodox glow

* Improve my gergo layout

* Scrolling OLED key logger!

* Change gergo layout

* Hnadle unicode keycodes if unicode is disabled

* Disable COMMAND/CONSOLE for gergo

* Fix right side control

* Re-enable LTO for all platforms

Since I got updated arm gcc binaries that no longer error out on lto

* Update formatting to match newer community standards

Poor 2 space

* Re-alight startup animation to use new HUE range

* Streamline gitlab ci scripts

* Disabled Space Cadet

* Add support for breathing table

* Enable new LTO Option

And clean up defines that will now be repeatitive

* Remove vscode settings

* Additional formatting cleanup of config.h files
2019-05-06 22:34:09 -07:00
Brendan Wrafter 7a751f1141 Add Boardwalk keymap (#5806)
* Add Boardwalk keyboard layout

* Remove backslashes
2019-05-06 22:33:41 -07:00
XScorpion2 e83e316555 [Keyboard] Enable RGBLIGHT_ANIMATIONS by default on the Zen rev2 (#5805)
* Enable RGBLIGHT_ANIMATIONS by default on the Zen rev2

* Also fixing OLED as it is upside down
2019-05-06 15:29:13 -07:00
XScorpion2 e01b2d518a [Keyboard] Sol keyboard conversion to split common (#5773)
* Split common conversion

* Updated serial and encoder pins

* Fixing default folder until r2

* Fixing oled driver on slave split common

* Fixing keymap compile errors

* Fixing oled inactivity timer on slave split common

* Hoisted oled driver task, init, & activity to keyboard.c

* Update keyboards/sol/config.h

Co-Authored-By: XScorpion2 <[email protected]>

* Remove TAPPING_FORCE_HOLD
2019-05-06 15:06:43 -07:00
150 changed files with 3441 additions and 4523 deletions

No files matched your search

+22 -14
View File
@@ -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, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______
)
};
+18 -20
View File
@@ -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
+34 -8
View File
@@ -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
+119 -263
View File
@@ -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;
} }
} }
+6 -1
View File
@@ -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
+1 -5
View File
@@ -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
+44
View File
@@ -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
+39
View File
@@ -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, ,
// `----+----+----' `----+----+----'
),
};
+104
View File
@@ -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
+19
View File
@@ -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://poitr.us/moooMf+)](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://poitr.us/GvljvC+)](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://poitr.us/OXwmBK+)](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)
+32
View File
@@ -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
View File
@@ -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
View File
@@ -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
};
+11 -30
View File
@@ -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) {
+2 -2
View File
@@ -1,2 +1,2 @@
BACKLIGHT_ENABLE = no BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes
+37 -126
View File
@@ -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
View File
@@ -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);
+20 -70
View File
@@ -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)
{ {
+34 -63
View File
@@ -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
+12 -33
View File
@@ -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
View File
@@ -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)
+59 -71
View File
@@ -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
+4 -10
View File
@@ -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__)
+2
View File
@@ -0,0 +1,2 @@
CONSOLE_ENABLE = no
COMMAND_ENABLE = no
+19 -24
View File
@@ -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
View File
@@ -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);
} }
+17 -6
View File
@@ -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));
}
}
}
}
+14 -15
View File
@@ -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
+1 -1
View File
@@ -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
+24 -27
View File
@@ -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
View File
@@ -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
+27 -116
View File
@@ -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)
+59 -121
View File
@@ -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
View File
@@ -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;
+16 -17
View File
@@ -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
+4 -4
View File
@@ -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
View File
@@ -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();
+6 -5
View File
@@ -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);
+28 -59
View File
@@ -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
View File
@@ -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);
-71
View File
@@ -1,71 +0,0 @@
#include "knob_v2.h"
bool knob_prev_a = false;
static knob_report_t knob_report = {.dir = 0, .phase = 0};
void knob_init(void) {
// I use pins D1 (ISR1) & D4 for a knob.
// Set pin mode for D4 as input.
DDRD &= ~(0UL << ENCODER_PIN_2);
// Enable internal pull-up for D4.
// This is done by "writing" 1 to a pin that has its mode set to input.
PORTD |= (1 << ENCODER_PIN_2);
// Enable interrupt for D1
// For more info on the below flags see this awesome section 11.1 (pages 89-90) here:
// https://cdn-shop.adafruit.com/datasheets/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf
// Set pin mode & pull-up.
DDRD &= ~(0UL << ENCODER_PIN_1);
PORTD |= (1UL << ENCODER_PIN_1);
// INT: 33221100
EICRA |= 0b00010000; // 0b01 - any edge
// INT: 6 3210
EIMSK |= 0b00000100;
}
ISR(ENCODER_INT) {
bool a = PIND & (1 << ENCODER_PIN_1);
if (knob_prev_a != a) {
// "A" channel has REALLY changed.
knob_report.phase = a;
knob_prev_a = a;
bool b = PIND & (1 << ENCODER_PIN_2);
if (a == b) {
// Halfway through CCW rotation (A == B)
//
// +---YOU ARE HERE (A=1, B=1)
// | +---OR HERE (A=0, B=0)
// | |
// v v
// A: _____/^^^^^\__
// B: __/^^^^^\_____
knob_report.dir++;
} else {
// Halfway through CW rotation (A != B)
//
// +---YOU ARE HERE (A=1, B=0)
// | +---OR HERE (A=0, B=1)
// | |
// v v
// A: _____/^^^^^\_____
// B: ________/^^^^^\__
knob_report.dir--;
}
}
}
knob_report_t knob_report_read(void) {
// Return knob report.
return knob_report;
}
void knob_report_reset(void) {
// Call this ASAP once you've processed the previous knob report.
// TODO: This should probably be called within `knob_report_read`.
knob_report.dir = 0;
knob_report.phase = 0;
}
-28
View File
@@ -1,28 +0,0 @@
// Rotary knob implementation - Version 2.
// Uses 2 digital pins - D2 (via interrupt) & D6.
// #include "rev1.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#include <stdbool.h>
#ifndef ENCODER_PIN_1
#define ENCODER_PIN_1 PD2
#endif
#ifndef ENCODER_PIN_2
#define ENCODER_PIN_2 PD6
#endif
#ifndef ENCODER_INT
#define ENCODER_INT INT2_vect
#endif
typedef struct knob_report_t {
int8_t dir; // Contains number of rotations that happened
int8_t phase; // Contains 0 if last rotation happened on 90 degrees, 1 if on 270
} knob_report_t;
void knob_init(void);
knob_report_t knob_report_read(void);
void knob_report_reset(void);
bool knob_prev_a;
int8_t knob_dir;
+70
View File
@@ -20,3 +20,73 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h" #include "config_common.h"
#define TAPPING_TERM 150
/* Select hand configuration */
#define SOFT_SERIAL_PIN D3
#define EE_HANDS
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 12
#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, E6}
// wiring of each half
#define MATRIX_COLS 7
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 }
// Encoder support
#define NUMBER_OF_ENCODERS 1
#define ENCODERS_PAD_A { D2 }
#define ENCODERS_PAD_B { D6 }
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* ws2812 RGB LED */
#define RGB_DI_PIN B3
#ifdef IOS_DEVICE_ENABLE
#define RGBLIGHT_LIMIT_VAL 40
#elif RGBLIGHT_FULL_POWER
#define RGBLIGHT_LIMIT_VAL 255
#else
#define RGBLIGHT_LIMIT_VAL 120
#endif
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS RGBLIGHT_LIMIT_VAL
#define LED_HITS_TO_REMEMBER 5
#define RGBLIGHT_ANIMATIONS
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 500
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
+26 -10
View File
@@ -11,8 +11,6 @@ extern keymap_config_t keymap_config;
extern rgblight_config_t rgblight_config; extern rgblight_config_t rgblight_config;
#endif #endif
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.
// The underscores don't mean anything - you can have a layer called STUFF or any other name. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them // Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -59,8 +57,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
LCTL, LALT, FN, LGUI, RGB_MOD, SPC, DEL, BSPC, SPC, ADJ, LGUI, FN, LALT, LCTL, LCTL, LALT, FN, LGUI, RGB_MOD, SPC, DEL, BSPC, SPC, ADJ, LGUI, FN, LALT, LCTL,
//|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------|
VOLD, VOLU, SPC, ENT, ENT, SPC, DOWN, UP SPC, ENT, ENT, SPC
// Rotary Left |--------+--------| |--------+-----------+ Rotary Right // |--------+--------| |--------+-----------+
), ),
/* FN /* FN
@@ -90,8 +88,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--+--------+--------| |--------+--+--------+--------+--------+--------+--------+--------|
VOLD, VOLU, _______, _______, _______, _______, UP, DOWN _______, _______, _______, _______
// Rotary Left |--------+--------| |--------+-----------+ Rotary Right // |--------+--------| |--------+-----------+
), ),
/* ADJ /* ADJ
@@ -122,8 +120,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--------+--+--------| |--------+--+--------+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
//|--------+--------+--------+--------+--------+--+--------+--------| |--------+--------+--+--------+--------+--------+--------+--------| //|--------+--------+--------+--------+--------+--+--------+--------| |--------+--------+--+--------+--------+--------+--------+--------|
_______, _______, _______, _______, _______, _______, _______, _______ \ _______, _______, _______, _______ \
// Rotary Left |--------+--------| |--------+--------+ Rotary Right // |--------+--------| |--------+--------+
) )
}; };
@@ -132,6 +130,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool TOG_STATUS = false; bool TOG_STATUS = false;
int RGB_current_mode; int RGB_current_mode;
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* Second encoder*/
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
}
}
#endif
bool process_record_user(uint16_t keycode, keyrecord_t *record) { bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) { switch (keycode) {
@@ -182,7 +198,7 @@ void matrix_init_user(void) {
#ifdef OLED_DRIVER_ENABLE #ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) { oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!has_usb()) if (!is_keyboard_master())
return OLED_ROTATION_180; // flip 180 for offhand return OLED_ROTATION_180; // flip 180 for offhand
return rotation; return rotation;
} }
@@ -244,7 +260,7 @@ static void render_status(void) {
} }
void oled_task_user(void) { void oled_task_user(void) {
if (is_master) if (is_keyboard_master())
render_status(); render_status();
else else
render_logo(); render_logo();
@@ -17,18 +17,12 @@ RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing SWAP_HANDS_ENABLE = no # Enable one-hand typing
ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90)
OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000)
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
# Do not edit past here # Do not edit past here
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
SRC += common/knob_v2.c
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE OPT_DEFS += -DIOS_DEVICE_ENABLE
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
+22 -6
View File
@@ -11,8 +11,6 @@ extern keymap_config_t keymap_config;
extern rgblight_config_t rgblight_config; extern rgblight_config_t rgblight_config;
#endif #endif
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.
// The underscores don't mean anything - you can have a layer called STUFF or any other name. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them // Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -64,7 +62,7 @@ LAYOUT( \
KC_CAPS, _10, _11, _12, _13, _14, KC_LCBR, KC_RCBR, _15, _16, _17, _18, _19, KC_QUOT, \ KC_CAPS, _10, _11, _12, _13, _14, KC_LCBR, KC_RCBR, _15, _16, _17, _18, _19, KC_QUOT, \
KC_LSFT, _20, _21, _22, _23, _24, KC_GRV, KC_BSLS, _25, _26, _27, _28, _29, KC_RSFT, \ KC_LSFT, _20, _21, _22, _23, _24, KC_GRV, KC_BSLS, _25, _26, _27, _28, _29, KC_RSFT, \
KC_LEFT, KC_DOWN, KC_LCTRL, KC_LALT, KC_LGUI, KC_BSPC, FN, ADJ, KC_SPC, KC_RGUI, KC_RALT, KC_RCTRL, KC_UP, KC_RIGHT, \ KC_LEFT, KC_DOWN, KC_LCTRL, KC_LALT, KC_LGUI, KC_BSPC, FN, ADJ, KC_SPC, KC_RGUI, KC_RALT, KC_RCTRL, KC_UP, KC_RIGHT, \
KC_VOLU, KC_VOLD, KC_BSPC, FN, ADJ, KC_SPC, KC_VOLU, KC_VOLD \ KC_BSPC, FN, ADJ, KC_SPC \
) )
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -132,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, \ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ XXXXXXX, _______, XXXXXXX, XXXXXXX \
), ),
/* ADJ /* ADJ
@@ -157,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
XXXXXXX, RGB_SAD, RGB_VAI, RGB_SAI, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PENT, XXXXXXX, XXXXXXX, \ XXXXXXX, RGB_SAD, RGB_VAI, RGB_SAI, XXXXXXX, XXXXXXX, COLEMAK, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PENT, XXXXXXX, XXXXXXX, \
XXXXXXX, RGB_HUD, RGB_VAD, RGB_HUI, XXXXXXX, XXXXXXX, QWERTY, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_SPC, XXXXXXX, XXXXXXX, \ XXXXXXX, RGB_HUD, RGB_VAD, RGB_HUI, XXXXXXX, XXXXXXX, QWERTY, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_SPC, XXXXXXX, XXXXXXX, \
XXXXXXX, RGBRST, RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_P0, KC_PDOT, KC_BSPC, XXXXXXX, XXXXXXX, \ XXXXXXX, RGBRST, RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_P0, KC_PDOT, KC_BSPC, XXXXXXX, XXXXXXX, \
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX \ XXXXXXX, XXXXXXX, _______, XXXXXXX \
) )
}; };
@@ -165,6 +163,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool TOG_STATUS = false; bool TOG_STATUS = false;
int RGB_current_mode; int RGB_current_mode;
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* Second encoder*/
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
}
#endif
// Setting ADJ layer RGB back to default // Setting ADJ layer RGB back to default
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
@@ -308,7 +324,7 @@ static void render_status(void) {
} }
void oled_task_user(void) { void oled_task_user(void) {
if (is_master) if (is_keyboard_master())
render_status(); render_status();
else else
render_logo(); render_logo();
@@ -17,18 +17,12 @@ RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing SWAP_HANDS_ENABLE = no # Enable one-hand typing
ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90)
OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000)
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
# Do not edit past here # Do not edit past here
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
SRC += common/knob_v2.c
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE OPT_DEFS += -DIOS_DEVICE_ENABLE
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
+22 -6
View File
@@ -12,8 +12,6 @@ extern keymap_config_t keymap_config;
extern rgblight_config_t rgblight_config; extern rgblight_config_t rgblight_config;
#endif #endif
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.
// The underscores don't mean anything - you can have a layer called STUFF or any other name. // The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them // Layer names don't all need to be of the same length, obviously, and you can also skip them
@@ -70,7 +68,7 @@ LAYOUT( \
FN_CAPS, _10, _11, _12, _13, _14, KC_LPRN, KC_RPRN, _15, _16, _17, _18, _19, KC_QUOT, \ FN_CAPS, _10, _11, _12, _13, _14, KC_LPRN, KC_RPRN, _15, _16, _17, _18, _19, KC_QUOT, \
KC_LSFT, _20, _21, _22, _23, _24, KC_LCBR, KC_RCBR, _25, _26, _27, _28, _29, KC_ENT, \ KC_LSFT, _20, _21, _22, _23, _24, KC_LCBR, KC_RCBR, _25, _26, _27, _28, _29, KC_ENT, \
KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \ KC_LCTL, KC_LGUI, KC_LALT, RGB_TOG, ADJ, KC_SPC, KC_DEL, KC_ENT, KC_SPC, FN, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, \
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \
) )
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
@@ -138,7 +136,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \ _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, \
KC_VOLU, KC_VOLD, _______, _______, _______, _______, KC_VOLU, KC_VOLD \ _______, _______, _______, _______ \
), ),
/* ADJ /* ADJ
@@ -163,7 +161,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \ _______, RGB_HUD, RGB_VAD, RGB_HUI, RGBRST, _______, _______, _______, _______, QWERTY, COLEMAK, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \
_______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \ _______, _______, _______, RGB_MOD, _______, _______, _______, _______, _______, _______, RGB_RMOD,RGB_HUD, RGB_SAD, RGB_VAD, \
KC_VOLU, KC_VOLD, _______, _______, _______, _______, KC_VOLU, KC_VOLD \ _______, _______, _______, _______ \
) )
}; };
@@ -173,6 +171,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
bool TOG_STATUS = false; bool TOG_STATUS = false;
int RGB_current_mode; int RGB_current_mode;
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* Second encoder*/
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
}
#endif
// Setting ADJ layer RGB back to default // Setting ADJ layer RGB back to default
void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) {
if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) {
@@ -316,7 +332,7 @@ static void render_status(void) {
} }
void oled_task_user(void) { void oled_task_user(void) {
if (is_master) if (is_keyboard_master())
render_status(); render_status();
else else
render_logo(); render_logo();
-6
View File
@@ -17,18 +17,12 @@ RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing SWAP_HANDS_ENABLE = no # Enable one-hand typing
ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90)
OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000)
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
# Do not edit past here # Do not edit past here
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
SRC += common/knob_v2.c
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE OPT_DEFS += -DIOS_DEVICE_ENABLE
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
+22 -4
View File
@@ -35,7 +35,7 @@ EXPAND_LAYOUT( \
FN_ESC, _10, _11, _12, _13, _14, RGB_SAI, RGB_VAI, _15, _16, _17, _18, _19, KC_QUOT, \ FN_ESC, _10, _11, _12, _13, _14, RGB_SAI, RGB_VAI, _15, _16, _17, _18, _19, KC_QUOT, \
KC_LSPO, _20, _21, _22, _23, _24, RGB_SAD, RGB_VAD, _25, _26, _27, _28, _29, KC_RSPC, \ KC_LSPO, _20, _21, _22, _23, _24, RGB_SAD, RGB_VAD, _25, _26, _27, _28, _29, KC_RSPC, \
KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN, KC_SPC, FN, FN, KC_SPC, KC_MINS, KC_EQL, KC_DOWN, KC_PGUP, KC_PGDN, \ KC_LCTL, KC_LGUI, KC_LGUI, KC_LALT, FN, KC_SPC, FN, FN, KC_SPC, KC_MINS, KC_EQL, KC_DOWN, KC_PGUP, KC_PGDN, \
KC_VOLD, KC_VOLU, KC_SPC, KC_BSPC, KC_ENT, KC_SPC, KC_VOLD, KC_VOLU \ KC_SPC, KC_BSPC, KC_ENT, KC_SPC \
) )
#define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__) #define BASE_LAYOUT(...) _BASE_LAYOUT(__VA_ARGS__)
@@ -65,15 +65,33 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
________________FUNCTION_L3________________, _______, _______, ________________FUNCTION_R3________________, \ ________________FUNCTION_L3________________, _______, _______, ________________FUNCTION_R3________________, \
________________FUNCTION_L4________________, _______, _______, ________________FUNCTION_R4________________, \ ________________FUNCTION_L4________________, _______, _______, ________________FUNCTION_R4________________, \
________________FUNCTION_L5________________, ADJ, ADJ, ________________FUNCTION_R5________________, \ ________________FUNCTION_L5________________, ADJ, ADJ, ________________FUNCTION_R5________________, \
KC_VOLD, KC_VOLU, _______, KC_DEL, _______, _______, KC_VOLD, KC_VOLU \ _______, KC_DEL, _______, _______ \
), ),
[_ADJ] = EXPAND_LAYOUT( \ [_ADJ] = EXPAND_LAYOUT( \
_________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \ _________________ADJUST_L1_________________, _______, _______, _________________ADJUST_R1_________________, \
_________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \ _________________ADJUST_L2_________________, _______, _______, _________________ADJUST_R2_________________, \
_________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \ _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \
_________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \ _________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \
_________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \ _________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \
KC_VOLD, KC_VOLU, _______, _______, _______, _______, KC_VOLD, KC_VOLU \ _______, _______, _______, _______ \
) )
}; };
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) { /* First encoder */
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) { /* Second encoder*/
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
}
}
#endif
-6
View File
@@ -17,18 +17,12 @@ RGB_MATRIX_KEYPRESSES = no # Enable reactive per-key effects. Can be very laggy
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing SWAP_HANDS_ENABLE = no # Enable one-hand typing
ENCODER_ENABLE_CUSTOM = yes # Enable rotary encoder (+90)
OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000) OLED_DRIVER_ENABLE = no # Enable the OLED Driver (+5000)
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
# Do not edit past here # Do not edit past here
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
SRC += common/knob_v2.c
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE OPT_DEFS += -DIOS_DEVICE_ENABLE
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
+6 -6
View File
@@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \ _________________QWERTY_L3_________________, KC_GRV, KC_QUOT, _________________QWERTY_R3_________________, \
_________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \ _________________QWERTY_L4_________________, RGB_TOG, RGBRST, _________________QWERTY_R4_________________, \
_________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \ _________________QWERTY_L5_________________, RGB_RMOD, RGB_MOD, _________________QWERTY_R5_________________, \
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \
), ),
#ifndef GAMELAYER_DISABLE #ifndef GAMELAYER_DISABLE
@@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
___________________GAME_L3_________________, KC_GRV, KC_QUOT, ___________________GAME_R3_________________, \ ___________________GAME_L3_________________, KC_GRV, KC_QUOT, ___________________GAME_R3_________________, \
___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \ ___________________GAME_L4_________________, RGB_TOG, RGBRST, ___________________GAME_R4_________________, \
___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________, \ ___________________GAME_L5_________________, RGB_RMOD, RGB_MOD, ___________________GAME_R5_________________, \
KC_VOLU, KC_VOLD, KC_SPC, KC_DEL, KC_ENT, KC_SPC, KC_VOLU, KC_VOLD \ KC_SPC, KC_DEL, KC_ENT, KC_SPC \
), ),
#endif #endif
@@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
__________________LOWER_L3_________________, _______, _______, __________________LOWER_R3_________________, \ __________________LOWER_L3_________________, _______, _______, __________________LOWER_R3_________________, \
__________________LOWER_L4_________________, _______, _______, __________________LOWER_R4_________________, \ __________________LOWER_L4_________________, _______, _______, __________________LOWER_R4_________________, \
__________________LOWER_L5_________________, _______, _______, __________________LOWER_R5_________________, \ __________________LOWER_L5_________________, _______, _______, __________________LOWER_R5_________________, \
_______, _______, _______, _______, _______, _______, _______, _______ \ _______, _______, _______, _______ \
), ),
[_RAISE] = EXPAND_LAYOUT( \ [_RAISE] = EXPAND_LAYOUT( \
@@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
__________________RAISE_L3_________________, _______, _______, __________________RAISE_R3_________________, \ __________________RAISE_L3_________________, _______, _______, __________________RAISE_R3_________________, \
__________________RAISE_L4_________________, _______, _______, __________________RAISE_R4_________________, \ __________________RAISE_L4_________________, _______, _______, __________________RAISE_R4_________________, \
__________________RAISE_L5_________________, _______, _______, __________________RAISE_R5_________________, \ __________________RAISE_L5_________________, _______, _______, __________________RAISE_R5_________________, \
_______, _______, _______, _______, _______, _______, _______, _______ \ _______, _______, _______, _______ \
), ),
#ifdef TRILAYER_ENABLED #ifdef TRILAYER_ENABLED
@@ -75,7 +75,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \ _________________ADJUST_L3_________________, _______, _______, _________________ADJUST_R3_________________, \
_________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \ _________________ADJUST_L4_________________, _______, _______, _________________ADJUST_R4_________________, \
_________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \ _________________ADJUST_L5_________________, _______, _______, _________________ADJUST_R5_________________, \
_______, _______, _______, _______, _______, _______, _______, _______ \ _______, _______, _______, _______ \
), ),
#endif #endif
}; };
@@ -158,7 +158,7 @@ static void render_status(void) {
} }
void oled_task_user(void) { void oled_task_user(void) {
if (has_usb()) { if (is_keyboard_master()) {
render_status(); render_status();
} else { } else {
render_logo(); render_logo();
+1 -6
View File
@@ -16,17 +16,12 @@ RGB_MATRIX_KEYPRESSES = yes # Enable reactive per-key effects. Can be very l
RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port RGBLIGHT_FULL_POWER = no # Allow maximum RGB brightness. Otherwise, limited to a safe level for a normal USB-A port
UNICODE_ENABLE = no # Unicode UNICODE_ENABLE = no # Unicode
SWAP_HANDS_ENABLE = no # Enable one-hand typing SWAP_HANDS_ENABLE = no # Enable one-hand typing
ENCODER_ENABLE_CUSTOM = no # Enable rotary encoder (+90)
OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000) OLED_DRIVER_ENABLE = yes # Enable the OLED Driver (+5000)
ENCODER_ENABLE = no # Enable rotary encoder (+90)
IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone) IOS_DEVICE_ENABLE = no # Limit max brightness to connect to IOS device (iPad,iPhone)
# Do not edit past here # Do not edit past here
ifeq ($(strip $(ENCODER_ENABLE_CUSTOM)), yes)
OPT_DEFS += -DENCODER_ENABLE_CUSTOM
SRC += common/knob_v2.c
endif
ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes)
OPT_DEFS += -DIOS_DEVICE_ENABLE OPT_DEFS += -DIOS_DEVICE_ENABLE
else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes) else ifeq ($(strip $(RGBLIGHT_FULL_POWER)), yes)
+1 -110
View File
@@ -16,8 +16,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#ifndef REV1_CONFIG_H #pragma once
#define REV1_CONFIG_H
/* USB Device descriptor parameter */ /* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED #define VENDOR_ID 0xFEED
@@ -27,117 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT Sol #define PRODUCT Sol
#define DESCRIPTION "An RGB, split, ortho-esque keyboard" #define DESCRIPTION "An RGB, split, ortho-esque keyboard"
#define PREVENT_STUCK_MODIFIERS
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 150
#define USE_I2C
#define USE_SERIAL
#define USE_SERIAL_PD3
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
/* Select rows configuration */
// Rows are 4 or 5
// #define HELIX_ROWS 5 see ./rules.mk
/* key matrix size */
// Rows are doubled-up
#define MATRIX_ROWS 12
#define MATRIX_ROW_PINS { C6, B6, B5, B4, D7, E6}
// wiring of each half
#define MATRIX_COLS 7
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, C7 }
// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
// #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
//#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
//#define LOCKING_RESYNC_ENABLE
/* ws2812 RGB LED */
#define RGB_DI_PIN B3
#define RGBLIGHT_TIMER
//#define RGBLED_NUM 12 // Number of LEDs. see ./keymaps/default/config.h
#define ws2812_PORTREG PORTD
#define ws2812_DDRREG DDRD
#define DRIVER_COUNT 1
// #define RGB_MATRIX_KEYPRESSES
#define BACKLIGHT_PIN B7
#define BACKLIGHT_LEVELS 5
#ifdef LED_MIRRORED #ifdef LED_MIRRORED
#define RGBLED_NUM 35 #define RGBLED_NUM 35
#else #else
#define RGBLED_NUM 70 #define RGBLED_NUM 70
#endif #endif
#define DRIVER_LED_TOTAL RGBLED_NUM #define DRIVER_LED_TOTAL RGBLED_NUM
#define RGBLIGHT_RAINBOW_SWIRL_RANGE 1950
#ifdef IOS_DEVICE_ENABLE
#define RGBLIGHT_LIMIT_VAL 40
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 40
#elif RGBLIGHT_FULL_POWER
#define RGBLIGHT_LIMIT_VAL 255
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 255
#else
#define RGBLIGHT_LIMIT_VAL 120
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 120
#endif
#define RGBLIGHT_VAL_STEP (RGBLIGHT_LIMIT_VAL / 10)
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_ANIMATIONS
#define LED_HITS_TO_REMEMBER 5
#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
// USB_MAX_POWER_CONSUMPTION value for Helix keyboard
// 120 RGBoff, OLEDoff
// 120 OLED
// 330 RGB 6
// 300 RGB 32
// 310 OLED & RGB 32
#define USB_MAX_POWER_CONSUMPTION 500
#else
// fix iPhone and iPad power adapter issue
// iOS device need lessthan 100
#define USB_MAX_POWER_CONSUMPTION 100
#endif
/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
/* disable debug print */
// #define NO_DEBUG
/* disable print */
// #define NO_PRINT
/* disable action features */
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#endif
-304
View File
@@ -1,304 +0,0 @@
/*
Copyright 2012 Jun Wako <[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/>.
*/
/*
* scan matrix
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "split_util.h"
#include <drivers/avr/pro_micro.h>
#include "serial.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
#ifdef ENCODER_ENABLE_CUSTOM
#include "common/knob_v2.h"
#endif
#define ERROR_DISCONNECT_COUNT 5
static uint8_t debouncing = DEBOUNCE;
static const int ROWS_PER_HAND = MATRIX_ROWS/2;
static uint8_t error_count = 0;
uint8_t is_master = 0 ;
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
static uint8_t matrix_master_scan(void);
__attribute__ ((weak))
void matrix_init_kb(void) {
matrix_init_user();
}
__attribute__ ((weak))
void matrix_scan_kb(void) {
matrix_scan_user();
}
__attribute__ ((weak))
void matrix_init_user(void) {
}
__attribute__ ((weak))
void matrix_scan_user(void) {
}
inline
uint8_t matrix_rows(void)
{
return MATRIX_ROWS;
}
inline
uint8_t matrix_cols(void)
{
return MATRIX_COLS;
}
void matrix_init(void)
{
debug_enable = true;
debug_matrix = true;
debug_mouse = true;
// initialize row and col
unselect_rows();
init_cols();
TX_RX_LED_INIT;
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
is_master = has_usb();
#ifdef ENCODER_ENABLE_CUSTOM
knob_init(); //FOR ENCODER
#endif
matrix_init_quantum();
}
uint8_t _matrix_scan(void)
{
// Right hand is stored after the left in the matirx so, we need to offset it
int offset = isLeftHand ? 0 : (ROWS_PER_HAND);
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
select_row(i);
_delay_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols();
if (matrix_debouncing[i+offset] != cols) {
matrix_debouncing[i+offset] = cols;
debouncing = DEBOUNCE;
}
unselect_rows();
}
if (debouncing) {
if (--debouncing) {
_delay_ms(1);
} else {
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
matrix[i+offset] = matrix_debouncing[i+offset];
}
}
}
#ifdef ENCODER_ENABLE_CUSTOM
knob_report_t knob_report = knob_report_read();
knob_report_reset();
matrix[5 + offset] &= 0b11111100;
if (knob_report.phase) { // I check for phase to avoid handling the rotation twice (on 90 and 270 degrees).
if (knob_report.dir > 0) {
matrix[5 + offset] |= 0b00000001;
} else if (knob_report.dir < 0) {
matrix[5 + offset] |= 0b00000010;
}
}
#endif
return 1;
}
int serial_transaction(void) {
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
int ret=serial_update_buffers();
if (ret ) {
return 1;
}
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[slaveOffset+i] = serial_slave_buffer[i];
}
return 0;
}
uint8_t matrix_scan(void)
{
if (is_master) {
matrix_master_scan();
}else{
matrix_slave_scan();
int offset = (isLeftHand) ? ROWS_PER_HAND : 0;
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[offset+i] = serial_master_buffer[i];
}
matrix_scan_quantum();
}
return 1;
}
uint8_t matrix_master_scan(void) {
int ret = _matrix_scan();
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_master_buffer[i] = matrix[offset+i];
}
if( serial_transaction() ) {
// turn on the indicator led when halves are disconnected
TXLED1;
error_count++;
if (error_count > ERROR_DISCONNECT_COUNT) {
// reset other half if disconnected
int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0;
for (int i = 0; i < ROWS_PER_HAND; ++i) {
matrix[slaveOffset+i] = 0;
}
}
} else {
// turn off the indicator led on no error
TXLED0;
error_count = 0;
}
matrix_scan_quantum();
return ret;
}
void matrix_slave_scan(void) {
_matrix_scan();
int offset = (isLeftHand) ? 0 : ROWS_PER_HAND;
for (int i = 0; i < ROWS_PER_HAND; ++i) {
serial_slave_buffer[i] = matrix[offset+i];
}
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
return (matrix[row] & ((matrix_row_t)1<<col));
}
inline
matrix_row_t matrix_get_row(uint8_t row)
{
return matrix[row];
}
void matrix_print(void)
{
print("\nr/c 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
phex(row); print(": ");
pbin_reverse16(matrix_get_row(row));
print("\n");
}
}
uint8_t matrix_key_count(void)
{
uint8_t count = 0;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
count += bitpop16(matrix[i]);
}
return count;
}
static void init_cols(void)
{
for(int x = 0; x < MATRIX_COLS; x++) {
_SFR_IO8((col_pins[x] >> 4) + 1) &= ~_BV(col_pins[x] & 0xF);
_SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF);
}
}
static matrix_row_t read_cols(void)
{
matrix_row_t result = 0;
for(int x = 0; x < MATRIX_COLS; x++) {
result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x);
}
return result;
}
static void unselect_rows(void)
{
for(int x = 0; x < ROWS_PER_HAND; x++) {
_SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF);
_SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF);
}
}
static void select_row(uint8_t row)
{
_SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF);
_SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF);
}
+40 -81
View File
@@ -1,87 +1,46 @@
#include "sol.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
void matrix_init_kb(void) {
matrix_init_user();
};
+1 -70
View File
@@ -1,70 +1 @@
#ifndef REV1_H #pragma once
#define REV1_H
#include "sol.h"
//void promicro_bootloader_jmp(bool program);
#include "quantum.h"
#ifdef RGBLIGHT_ENABLE
//rgb led driver
#include "ws2812.h"
#endif
#ifdef USE_I2C
#include <stddef.h>
#ifdef __AVR__
#include <avr/io.h>
#include <avr/interrupt.h>
#endif
#endif
//void promicro_bootloader_jmp(bool program);
// LEL/LER/REL/RER are
// LeftEncoderLeft, LeftEncoderRight, RightEncoderLeft, and RightEncoderRight
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, L06, R06, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, R16, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \
LEL, LER, L55, L56, R56, R50, REL, RER \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06 }, \
{ L10, L11, L12, L13, L14, L15, L16 }, \
{ L20, L21, L22, L23, L24, L25, L26 }, \
{ L30, L31, L32, L33, L34, L35, L36 }, \
{ L40, L41, L42, L43, L44, L45, L46 }, \
{ LEL, LER, KC_NO, KC_NO, KC_NO, L55, L56 }, \
{ R05, R04, R03, R02, R01, R00, R06 }, \
{ R15, R14, R13, R12, R11, R10, R16 }, \
{ R25, R24, R23, R22, R21, R20, R26 }, \
{ R35, R34, R33, R32, R31, R30, R36 }, \
{ R45, R44, R43, R42, R41, R40, R46 }, \
{ REL, RER, KC_NO, KC_NO, KC_NO, R50, R56 } \
}
#define KC________ KC_TRNS
#define KC_RGB_MOD RGB_MOD
#define KC_FN FN
#define KC_ADJ ADJ
#define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, L06, R06, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, R16, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \
LEL, LER, L55, L56, R56, R50, REL, RER \
) \
LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, \
KC_##LEL, KC_##LER, KC_##L55, KC_##L56, KC_##R56, KC_##R50, KC_##REL, KC_##RER \
)
#endif
-2
View File
@@ -1,2 +0,0 @@
SRC += rev1/matrix.c \
rev1/split_util.c
-54
View File
@@ -1,54 +0,0 @@
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <avr/eeprom.h>
#include "split_util.h"
#include "matrix.h"
#include "keyboard.h"
#include "serial.h"
volatile bool isLeftHand = true;
static void setup_handedness(void) {
#ifdef EE_HANDS
isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS);
#else
#if defined(MASTER_RIGHT)
isLeftHand = !has_usb();
#else
isLeftHand = has_usb();
#endif
#endif
}
static void keyboard_master_setup(void) {
serial_master_init();
}
static void keyboard_slave_setup(void) {
serial_slave_init();
}
bool has_usb(void) {
USBCON |= (1 << OTGPADE); //enables VBUS pad
_delay_us(5);
return (USBSTA & (1<<VBUS)); //checks state of VBUS
}
void split_keyboard_setup(void) {
setup_handedness();
if (has_usb()) {
keyboard_master_setup();
} else {
keyboard_slave_setup();
}
sei();
}
// this code runs before the usb and keyboard is initialized
void matrix_setup(void) {
split_keyboard_setup();
}
-15
View File
@@ -1,15 +0,0 @@
#ifndef SPLIT_KEYBOARD_UTIL_H
#define SPLIT_KEYBOARD_UTIL_H
#include <stdbool.h>
#include "eeconfig.h"
extern volatile bool isLeftHand;
// slave version of matix scan, defined in matrix.c
void matrix_slave_scan(void);
void split_keyboard_setup(void);
bool has_usb(void);
#endif
+3 -4
View File
@@ -1,5 +1,3 @@
SRC += serial.c
# MCU name # MCU name
#MCU = at90usb1287 #MCU = at90usb1287
MCU = atmega32u4 MCU = atmega32u4
@@ -48,6 +46,9 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
# Custom local font file # Custom local font file
OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\" OPT_DEFS += -DOLED_FONT_H=\"common/glcdfont.c\"
SPLIT_KEYBOARD = yes
ENCODER_ENABLE = yes
# Build Options # Build Options
# change to "no" to disable the options, or define them in the Makefile in # change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically # the appropriate keymap folder that will get included automatically
@@ -62,6 +63,4 @@ 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. Do not enable this with audio at the same time. RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
CUSTOM_MATRIX = yes
DEFAULT_FOLDER = sol/rev1 DEFAULT_FOLDER = sol/rev1
-288
View File
@@ -1,288 +0,0 @@
/*
* WARNING: be careful changing this code, it is very timing dependent
*/
#ifndef F_CPU
#define F_CPU 16000000
#endif
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include <stdbool.h>
#include "serial.h"
#ifdef USE_SERIAL
#define _delay_sub_us(x) __builtin_avr_delay_cycles(x)
// Serial pulse period in microseconds.
#define SELECT_SERIAL_SPEED 1
#if SELECT_SERIAL_SPEED == 0
// Very High speed
#define SERIAL_DELAY 4 // micro sec
#define READ_WRITE_START_ADJUST 30 // cycles
#define READ_WRITE_WIDTH_ADJUST 10 // cycles
#elif SELECT_SERIAL_SPEED == 1
// High speed
#define SERIAL_DELAY 6 // micro sec
#define READ_WRITE_START_ADJUST 23 // cycles
#define READ_WRITE_WIDTH_ADJUST 10 // cycles
#elif SELECT_SERIAL_SPEED == 2
// Middle speed
#define SERIAL_DELAY 12 // micro sec
#define READ_WRITE_START_ADJUST 25 // cycles
#define READ_WRITE_WIDTH_ADJUST 10 // cycles
#elif SELECT_SERIAL_SPEED == 3
// Low speed
#define SERIAL_DELAY 24 // micro sec
#define READ_WRITE_START_ADJUST 25 // cycles
#define READ_WRITE_WIDTH_ADJUST 10 // cycles
#elif SELECT_SERIAL_SPEED == 4
// Very Low speed
#define SERIAL_DELAY 50 // micro sec
#define READ_WRITE_START_ADJUST 25 // cycles
#define READ_WRITE_WIDTH_ADJUST 10 // cycles
#else
#error Illegal Serial Speed
#endif
#define SERIAL_DELAY_HALF1 (SERIAL_DELAY/2)
#define SERIAL_DELAY_HALF2 (SERIAL_DELAY - SERIAL_DELAY/2)
#define SLAVE_INT_WIDTH 1
#define SLAVE_INT_RESPONSE_TIME SERIAL_DELAY
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0};
#define SLAVE_DATA_CORRUPT (1<<0)
volatile uint8_t status = 0;
inline static
void serial_delay(void) {
_delay_us(SERIAL_DELAY);
}
inline static
void serial_delay_half1(void) {
_delay_us(SERIAL_DELAY_HALF1);
}
inline static
void serial_delay_half2(void) {
_delay_us(SERIAL_DELAY_HALF2);
}
inline static
void serial_output(void) {
SERIAL_PIN_DDR |= SERIAL_PIN_MASK;
}
// make the serial pin an input with pull-up resistor
inline static
void serial_input_with_pullup(void) {
SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK;
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
}
inline static
uint8_t serial_read_pin(void) {
return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK);
}
inline static
void serial_low(void) {
SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK;
}
inline static
void serial_high(void) {
SERIAL_PIN_PORT |= SERIAL_PIN_MASK;
}
void serial_master_init(void) {
serial_output();
serial_high();
}
void serial_slave_init(void) {
serial_input_with_pullup();
// Enable INT3
EIMSK |= _BV(INT3);
// Trigger on falling edge of INT3
EICRA &= ~(_BV(ISC30) | _BV(ISC31));
}
// Used by the sender to synchronize timing with the reciver.
static
void sync_recv(void) {
for (int i = 0; i < SERIAL_DELAY*5 && serial_read_pin(); i++ ) {
}
// This shouldn't hang if the slave disconnects because the
// serial line will float to high if the slave does disconnect.
while (!serial_read_pin());
}
// Used by the reciver to send a synchronization signal to the sender.
static
void sync_send(void) {
serial_low();
serial_delay();
serial_high();
}
// Reads a byte from the serial line
static
uint8_t serial_read_byte(void) {
uint8_t byte = 0;
_delay_sub_us(READ_WRITE_START_ADJUST);
for ( uint8_t i = 0; i < 8; ++i) {
serial_delay_half1(); // read the middle of pulses
byte = (byte << 1) | serial_read_pin();
_delay_sub_us(READ_WRITE_WIDTH_ADJUST);
serial_delay_half2();
}
return byte;
}
// Sends a byte with MSB ordering
static
void serial_write_byte(uint8_t data) {
uint8_t b = 1<<7;
while( b ) {
if(data & b) {
serial_high();
} else {
serial_low();
}
b >>= 1;
serial_delay();
}
serial_low(); // sync_send() / senc_recv() need raise edge
}
// interrupt handle to be used by the slave device
ISR(SERIAL_PIN_INTERRUPT) {
serial_output();
// slave send phase
uint8_t checksum = 0;
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
sync_send();
serial_write_byte(serial_slave_buffer[i]);
checksum += serial_slave_buffer[i];
}
sync_send();
serial_write_byte(checksum);
// slave switch to input
sync_send(); //0
serial_delay_half1(); //1
serial_low(); //2
serial_input_with_pullup(); //2
serial_delay_half1(); //3
// slave recive phase
uint8_t checksum_computed = 0;
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
sync_recv();
serial_master_buffer[i] = serial_read_byte();
checksum_computed += serial_master_buffer[i];
}
sync_recv();
uint8_t checksum_received = serial_read_byte();
if ( checksum_computed != checksum_received ) {
status |= SLAVE_DATA_CORRUPT;
} else {
status &= ~SLAVE_DATA_CORRUPT;
}
sync_recv(); //weit master output to high
}
inline
bool serial_slave_DATA_CORRUPT(void) {
return status & SLAVE_DATA_CORRUPT;
}
// Copies the serial_slave_buffer to the master and sends the
// serial_master_buffer to the slave.
//
// Returns:
// 0 => no error
// 1 => slave did not respond
// 2 => checksum error
int serial_update_buffers(void) {
// this code is very time dependent, so we need to disable interrupts
cli();
// signal to the slave that we want to start a transaction
serial_output();
serial_low();
_delay_us(SLAVE_INT_WIDTH);
// wait for the slaves response
serial_input_with_pullup();
_delay_us(SLAVE_INT_RESPONSE_TIME);
// check if the slave is present
if (serial_read_pin()) {
// slave failed to pull the line low, assume not present
serial_output();
serial_high();
sei();
return 1;
}
// master recive phase
// if the slave is present syncronize with it
uint8_t checksum_computed = 0;
// receive data from the slave
for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) {
sync_recv();
serial_slave_buffer[i] = serial_read_byte();
checksum_computed += serial_slave_buffer[i];
}
sync_recv();
uint8_t checksum_received = serial_read_byte();
if (checksum_computed != checksum_received) {
serial_output();
serial_high();
sei();
return 2;
}
// master switch to output
sync_recv(); //0
serial_delay(); //1
serial_low(); //3
serial_output(); // 3
serial_delay_half1(); //4
// master send phase
uint8_t checksum = 0;
for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) {
sync_send();
serial_write_byte(serial_master_buffer[i]);
checksum += serial_master_buffer[i];
}
sync_send();
serial_write_byte(checksum);
// always, release the line when not in use
sync_send();
sei();
return 0;
}
#endif
-26
View File
@@ -1,26 +0,0 @@
#ifndef MY_SERIAL_H
#define MY_SERIAL_H
#include <stdbool.h>
/* TODO: some defines for interrupt setup */
#define SERIAL_PIN_DDR DDRD
#define SERIAL_PIN_PORT PORTD
#define SERIAL_PIN_INPUT PIND
#define SERIAL_PIN_MASK _BV(PD3) //SErial pin goes here, D0-D3
#define SERIAL_PIN_INTERRUPT INT3_vect //"INT#" of your serial pin
#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2
// Buffers for master - slave communication
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
void serial_master_init(void);
void serial_slave_init(void);
int serial_update_buffers(void);
bool serial_slave_data_corrupt(void);
#endif
-19
View File
@@ -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
+50 -4
View File
@@ -1,7 +1,53 @@
#ifndef SOL_H #pragma once
#define SOL_H
#include "rev1.h"
#include "quantum.h" #include "quantum.h"
#ifdef KEYBOARD_sol_rev1
#include "rev1.h"
#elif KEYBOARD_sol_rev2
#include "rev2.h"
#endif #endif
#define LAYOUT( \
L00, L01, L02, L03, L04, L05, L06, R06, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, R16, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \
L55, L56, R56, R50 \
) \
{ \
{ L00, L01, L02, L03, L04, L05, L06 }, \
{ L10, L11, L12, L13, L14, L15, L16 }, \
{ L20, L21, L22, L23, L24, L25, L26 }, \
{ L30, L31, L32, L33, L34, L35, L36 }, \
{ L40, L41, L42, L43, L44, L45, L46 }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, L55, L56 }, \
{ R05, R04, R03, R02, R01, R00, R06 }, \
{ R15, R14, R13, R12, R11, R10, R16 }, \
{ R25, R24, R23, R22, R21, R20, R26 }, \
{ R35, R34, R33, R32, R31, R30, R36 }, \
{ R45, R44, R43, R42, R41, R40, R46 }, \
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R50, R56 } \
}
#define KC________ KC_TRNS
#define KC_RGB_MOD RGB_MOD
#define KC_FN FN
#define KC_ADJ ADJ
#define LAYOUT_kc( \
L00, L01, L02, L03, L04, L05, L06, R06, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, L16, R16, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, L26, R26, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L36, R36, R30, R31, R32, R33, R34, R35, \
L40, L41, L42, L43, L44, L45, L46, R46, R40, R41, R42, R43, R44, R45, \
L55, L56, R56, R50 \
) \
LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##L45, KC_##L46, KC_##R46, KC_##R40, KC_##R41, KC_##R42, KC_##R43, KC_##R44, KC_##R45, \
KC_##L55, KC_##L56, KC_##R56, KC_##R50 \
)
+1
View File
@@ -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
+2 -2
View File
@@ -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;
} }
+4 -5
View File
@@ -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
+140 -157
View File
@@ -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
+12 -11
View File
@@ -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
+9 -10
View File
@@ -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
+31 -28
View File
@@ -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
+173 -134
View File
@@ -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
+18 -7
View File
@@ -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)
+1
View File
@@ -0,0 +1 @@
#pragma once
+52
View File
@@ -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).
+14 -15
View File
@@ -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
-34
View File
@@ -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
Loaded 100 of 150 files, more files were not shown because too many files have changed in this diff. Show more