[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 filesmaster
parent
7a751f1141
commit
f3d5b1091d
|
@ -27,7 +27,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// #define MASTER_RIGHT
|
||||
#define EE_HANDS
|
||||
|
||||
// #define SSD1306OLED
|
||||
#undef USE_I2C
|
||||
#undef SSD1306OLED
|
||||
|
||||
#define USE_SERIAL_PD2
|
||||
|
||||
|
@ -35,17 +36,42 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
// #define TAPPING_TERM 100
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 27
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 27
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 100
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_LIMIT_VAL 100
|
||||
#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
|
||||
#define B6_AUDIO
|
||||
# define B6_AUDIO
|
||||
// #define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,15 +1,5 @@
|
|||
#include QMK_KEYBOARD_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 uint8_t is_master;
|
||||
|
@ -31,7 +21,7 @@ enum crkbd_keycodes {
|
|||
LAYOUT_wrapper( \
|
||||
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), \
|
||||
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 \
|
||||
)
|
||||
#define LAYOUT_crkbd_base_wrapper(...) LAYOUT_crkbd_base(__VA_ARGS__)
|
||||
|
@ -115,182 +105,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
|
||||
#ifdef SSD1306OLED
|
||||
iota_gfx_init(!has_usb()); // turns on the display
|
||||
#endif
|
||||
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#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.
|
||||
const char *read_logo(void);
|
||||
char layer_state_str[24];
|
||||
char modifier_state_str[24];
|
||||
char host_led_state_str[24];
|
||||
char keylog_str[24] = {};
|
||||
char keylogs_str[21] = {};
|
||||
int keylogs_str_idx = 0;
|
||||
|
||||
// const char *read_mode_icon(bool swap);
|
||||
// void set_timelog(void);
|
||||
// const char *read_timelog(void);
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void set_keylog(uint16_t keycode, keyrecord_t *record) {
|
||||
char name = ' ';
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (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
|
||||
if (keylogs_str_idx == sizeof(keylogs_str) - 1) {
|
||||
keylogs_str_idx = 0;
|
||||
for (int i = 0; i < sizeof(keylogs_str) - 1; i++) {
|
||||
keylogs_str[i] = ' ';
|
||||
}
|
||||
}
|
||||
|
||||
keylogs_str[keylogs_str_idx] = name;
|
||||
keylogs_str_idx++;
|
||||
}
|
||||
|
||||
const char *read_keylog(void) {
|
||||
return keylog_str;
|
||||
}
|
||||
|
||||
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) {
|
||||
switch (keycode) {
|
||||
case KC_A ... KC_SLASH:
|
||||
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
|
||||
|
@ -311,6 +133,43 @@ void render_crkbd_logo(void) {
|
|||
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] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
|
||||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) ||
|
||||
(keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; }
|
||||
|
||||
for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
if (keycode < 60) {
|
||||
keylog_str[0] = code_to_name[keycode];
|
||||
}
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
add_keylog(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) { add_keylog(keycode); }
|
||||
return true;
|
||||
}
|
||||
|
||||
void render_status(void) {
|
||||
|
||||
|
@ -364,25 +223,18 @@ void render_status(void) {
|
|||
uint8_t one_shot = get_oneshot_mods();
|
||||
|
||||
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_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : 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_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_GUI || one_shot & MOD_MASK_GUI ) ? PSTR(" GUI ") : PSTR(" "), 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) {
|
||||
oled_write_P(mode_logo[0], false);
|
||||
oled_write_P(mode_logo[1], false);
|
||||
if (keymap_config.swap_lalt_lgui) {
|
||||
oled_write_P(PSTR(" Mac "), false);
|
||||
} else {
|
||||
oled_write_P(mode_logo[2], false);
|
||||
oled_write_P(mode_logo[3], false);
|
||||
oled_write_P(PSTR(" Win "), false);
|
||||
}
|
||||
|
||||
uint8_t led_usb_state = host_keyboard_leds();
|
||||
|
@ -390,6 +242,8 @@ void render_status(void) {
|
|||
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_SCROLL_LOCK) ? PSTR(" SCRL") : PSTR(" "), false);
|
||||
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -401,6 +255,8 @@ void oled_task_user(void) {
|
|||
oled_scroll_left(); // Turns on scrolling
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_scan_keymap(void) { update_log(); }
|
||||
#endif
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode) {
|
||||
|
|
|
@ -14,9 +14,10 @@ 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.
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
SWAP_HANDS_ENABLE = no # Enable one-hand typing
|
||||
RGBLIGHT_STARTUP_ANIMATION = yes
|
||||
RGB_MATRIX_ENABLE = WS2812
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
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
|
||||
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
|
||||
ifneq ($(strip $(OLED_DRIVER_ENABLE)), yes)
|
||||
RGB_MATRIX_SPLIT_RIGHT=yes
|
||||
endif
|
||||
|
|
|
@ -9,13 +9,7 @@
|
|||
#include QMK_KEYBOARD_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( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
|
@ -23,9 +17,9 @@ enum customKeycodes {
|
|||
) \
|
||||
LAYOUT_gergo_wrapper( \
|
||||
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), \
|
||||
OS_LSFT, CTL_T(K21), K22, K23, K24, K25, _______, _______, _______, _______, K26, K27, K28, K29, CTL_T(K2A), OS_RSFT, \
|
||||
_______, _______, KC_SPC, LT(_LOWER, KC_BSPC), LT(_RAISE, KC_DEL), KC_ENT, _______, _______ \
|
||||
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, RCTL_T(K2A), OS_RSFT, \
|
||||
KC_GRV, KC_SPC, BK_LWER, OS_LALT, OS_RGUI, DL_RAIS, KC_ENT, _______ \
|
||||
)
|
||||
|
||||
#define LAYOUT_gergo_base_wrapper(...) LAYOUT_gergo_base(__VA_ARGS__)
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
CONSOLE_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
|
@ -29,24 +29,23 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define EE_HANDS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 18 // Number of LEDs
|
||||
#define RGBLED_SPLIT { 9, 9 }
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 18 // Number of LEDs
|
||||
# define RGBLED_SPLIT { 9, 9 }
|
||||
# define RGBLIGHT_HUE_STEP 12
|
||||
# define RGBLIGHT_SAT_STEP 12
|
||||
# define RGBLIGHT_VAL_STEP 12
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
|
||||
#define RGBLIGHT_LIMIT_VAL 225
|
||||
# define RGBLIGHT_LIMIT_VAL 225
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define C6_AUDIO
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define NO_MUSIC_MODE
|
||||
#endif //RGBLIGHT_ENABLE
|
||||
# define C6_AUDIO
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# define NO_MUSIC_MODE
|
||||
# endif //RGBLIGHT_ENABLE
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
#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
|
||||
#ifdef KEYBOARD_keebio_iris_rev2
|
||||
#define PRODUCT Drashna Hacked Iris Rev.2
|
||||
# define PRODUCT Drashna Hacked Iris Rev.2
|
||||
#endif
|
||||
|
||||
#define SHFT_LED1 6
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, \
|
||||
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, \
|
||||
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 \
|
||||
)
|
||||
#define LAYOUT_iris_base_wrapper(...) LAYOUT_iris_base(__VA_ARGS__)
|
||||
|
@ -113,13 +113,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ AUDIO_ENABLE = no
|
|||
NKRO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
SWAP_HANDS_ENABLE = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
INDICATOR_LIGHTS = no
|
||||
MACROS_ENABLED = no
|
||||
|
|
|
@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "../drashna/config.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#undef RGBLED_SPLIT
|
||||
#define RGBLED_SPLIT { 8, 8 }
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 16 // Number of LEDs
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT { 8, 8 }
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_keebio_iris_rev2
|
||||
#define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
|
||||
# define PRODUCT Drashna Hacked Iris LP Rev.2 (Backlit)
|
||||
#endif
|
||||
|
||||
#undef SHFT_LED1
|
||||
|
|
|
@ -21,15 +21,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "../drashna/config.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#undef RGBLED_SPLIT
|
||||
#define RGBLED_SPLIT { 8, 8 }
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 16 // Number of LEDs
|
||||
# undef RGBLED_SPLIT
|
||||
# define RGBLED_SPLIT { 8, 8 }
|
||||
#endif
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_keebio_iris_rev2
|
||||
#define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
|
||||
# define PRODUCT Drashna Hacked Iris Rev.2 (16 LED)
|
||||
#endif
|
||||
|
||||
#undef SHFT_LED1
|
||||
|
|
|
@ -21,35 +21,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define MATRIX_ROWS 5
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 16
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 16
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#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
|
||||
#define PRODUCT Drashnas Viterbi Macro Pad
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define C6_AUDIO
|
||||
#define NO_MUSIC_MODE
|
||||
# define C6_AUDIO
|
||||
# define NO_MUSIC_MODE
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ortho_5x7( \
|
||||
|
|
|
@ -8,6 +8,7 @@ RGBLIGHT_ENABLE = yes
|
|||
AUDIO_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
SPLIT_KEYBOARD = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
NO_SECRETS = yes
|
||||
MACROS_ENABLED = yes
|
||||
|
|
|
@ -20,6 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "../drashna/config.h"
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM 12
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 12
|
||||
#endif
|
||||
|
|
|
@ -39,37 +39,36 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
)
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
#define RGBLED_SPLIT { 8, 8 }
|
||||
# define RGB_DI_PIN D3
|
||||
# define RGBLED_NUM 16 // Number of LEDs
|
||||
# define RGBLED_SPLIT { 8, 8 }
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
# define RGBLIGHT_HUE_STEP 12
|
||||
# define RGBLIGHT_SAT_STEP 12
|
||||
# define RGBLIGHT_VAL_STEP 12
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define C6_AUDIO
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define NO_MUSIC_MODE
|
||||
#endif
|
||||
# define C6_AUDIO
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# define NO_MUSIC_MODE
|
||||
# endif
|
||||
#endif //AUDIO_ENABLE
|
||||
|
||||
#undef PRODUCT
|
||||
#ifdef KEYBOARD_orthodox_rev1
|
||||
#define PRODUCT Drashna Hacked Orthodox Rev.1
|
||||
# define PRODUCT Drashna Hacked Orthodox Rev.1
|
||||
#elif KEYBOARD_orthodox_rev3
|
||||
#define PRODUCT Drashna Hacked Orthodox Rev.3
|
||||
# define PRODUCT Drashna Hacked Orthodox Rev.3
|
||||
#endif
|
||||
|
||||
#define QMK_ESC_OUTPUT D7 // usually COL
|
||||
#ifdef KEYBOARD_orthodox_rev1
|
||||
#define QMK_ESC_INPUT D4 // usually ROW
|
||||
# define QMK_ESC_INPUT D4 // usually ROW
|
||||
#else
|
||||
#define QMK_ESC_INPUT D2 // usually ROW
|
||||
# define QMK_ESC_INPUT D2 // usually ROW
|
||||
#endif
|
||||
#define QMK_LED B0
|
||||
#define QMK_SPEAKER C6
|
||||
|
|
|
@ -39,7 +39,7 @@ uint8_t last_osm;
|
|||
LAYOUT_wrapper( \
|
||||
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_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__)
|
||||
|
||||
|
@ -123,11 +123,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
};
|
||||
|
||||
void matrix_init_keymap(void) {
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
#ifndef CONVERT_TO_PROTON_C
|
||||
setPinOutput(D5);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ TAP_DANCE_ENABLE = no
|
|||
RGBLIGHT_ENABLE = yes
|
||||
AUDIO_ENABLE = no
|
||||
NKRO_ENABLE = yes
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
INDICATOR_LIGHTS = yes
|
||||
MACROS_ENABLED = no
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
# undef RGBLIGHT_SAT_STEP
|
||||
# define RGBLIGHT_SAT_STEP 12
|
||||
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 3
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 3
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
|
||||
|
|
|
@ -20,6 +20,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#ifdef UNICODEMAP_ENABLE
|
||||
#include "drashna_unicode.h"
|
||||
#endif // UNICODEMAP_ENABLE
|
||||
#ifndef UNICODE_ENABLE
|
||||
# define UC(x) KC_NO
|
||||
#endif
|
||||
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
extern bool g_suspend_state;
|
||||
|
@ -43,7 +46,7 @@ bool skip_leds = false;
|
|||
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_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), \
|
||||
OS_LALT, OS_LGUI, OS_RGUI, CTL_T(KC_ESCAPE), \
|
||||
KC_APP, KC_MENU, \
|
||||
|
@ -331,6 +334,7 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
|||
userspace_config.swapped_numbers ^= 1;
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
}
|
||||
break;
|
||||
}
|
||||
//switch (keycode) {
|
||||
// case KC_P00:
|
||||
|
@ -375,7 +379,7 @@ void matrix_scan_keymap(void) { // runs frequently to update info
|
|||
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
bool indicator_is_this_led_used_keyboard(uint8_t index) {
|
||||
|
@ -393,11 +397,9 @@ bool indicator_is_this_led_used_keyboard(uint8_t index) {
|
|||
|
||||
void suspend_power_down_keymap(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
rgb_matrix_config.enable = false;
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_keymap(void) {
|
||||
rgb_matrix_config.enable = true;
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
||||
|
||||
|
@ -412,8 +414,16 @@ void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue) {
|
|||
}
|
||||
|
||||
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
|
||||
!g_suspend_state &&
|
||||
#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;
|
||||
|
@ -461,33 +471,7 @@ void rgb_matrix_indicators_user(void) {
|
|||
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
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
TAP_DANCE_ENABLE = yes
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SPACE_CADET_ENABLE = no
|
||||
ifneq (,$(findstring ergodox_ez,$(KEYBOARD)))
|
||||
RGBLIGHT_ENABLE = yes
|
||||
RGB_MATRIX_ENABLE = no
|
||||
|
|
|
@ -6,10 +6,21 @@
|
|||
#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Glow
|
||||
|
||||
#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_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 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
|
||||
|
|
|
@ -3,18 +3,17 @@
|
|||
// #define B6_AUDIO
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
||||
#define RGB_DI_PIN B1
|
||||
#define RGBLED_NUM 16 // Number of LEDs
|
||||
# define RGB_DI_PIN B1
|
||||
# define RGBLED_NUM 16 // Number of LEDs
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
# define RGBLIGHT_HUE_STEP 12
|
||||
# define RGBLIGHT_SAT_STEP 12
|
||||
# define RGBLIGHT_VAL_STEP 12
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#if defined(KEYBOARD_primekb_prime_m)
|
||||
#undef PRODUCT
|
||||
#define PRODUCT Drashna Hacked Prime_M Macro Pad
|
||||
# undef PRODUCT
|
||||
# define PRODUCT Drashna Hacked Prime_M Macro Pad
|
||||
#endif
|
||||
|
|
|
@ -2,49 +2,52 @@
|
|||
|
||||
|
||||
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLED_NUM)
|
||||
#define RGB_DI_PIN B3
|
||||
#define RGBLED_NUM 13 // Number of LEDs
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_HUE_STEP 12
|
||||
#define RGBLIGHT_SAT_STEP 12
|
||||
#define RGBLIGHT_VAL_STEP 12
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1
|
||||
# define RGB_DI_PIN B3
|
||||
# define RGBLED_NUM 13 // Number of LEDs
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
# define RGBLIGHT_HUE_STEP 12
|
||||
# define RGBLIGHT_SAT_STEP 12
|
||||
# define RGBLIGHT_VAL_STEP 12
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2
|
||||
# define RGBLIGHT_EFFECT_SNAKE_LENGTH 2
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
# define RGBLIGHT_DISABLE_KEYCODES
|
||||
# endif
|
||||
#endif // RGBLIGHT_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_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 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
|
||||
|
||||
#if defined(KEYBOARD_lets_split_rev2)
|
||||
#define USE_SERIAL
|
||||
#undef USE_I2C
|
||||
|
||||
#define EE_HANDS
|
||||
# define USE_SERIAL
|
||||
# undef USE_I2C
|
||||
# define EE_HANDS
|
||||
#endif
|
||||
|
||||
#if !defined(KEYBOARD_planck_light)
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define NO_MUSIC_MODE
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
# define NO_MUSIC_MODE
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
#endif // KEYBOARD_planck_light
|
||||
|
||||
|
||||
#if defined(KEYBOARD_planck)
|
||||
#undef PRODUCT
|
||||
#if defined(KEYBOARD_planck_light)
|
||||
#define PRODUCT Drashna Hacked RGB Beacon (Planck Light)
|
||||
#elif defined(KEYBOARD_planck_rev6)
|
||||
#define PRODUCT Drashna Hacked Planck Rev6
|
||||
#elif defined(KEYBOARD_planck_EZ)
|
||||
#define PRODUCT Drashna Hacked Planck EZ
|
||||
#endif
|
||||
# undef PRODUCT
|
||||
# if defined(KEYBOARD_planck_light)
|
||||
# define PRODUCT Drashna Hacked RGB Beacon (Planck Light)
|
||||
# elif defined(KEYBOARD_planck_rev6)
|
||||
# define PRODUCT Drashna Hacked Planck Rev6
|
||||
# elif defined(KEYBOARD_planck_EZ)
|
||||
# define PRODUCT Drashna Hacked Planck EZ
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -58,7 +61,7 @@
|
|||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
// #define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
|
|
|
@ -34,6 +34,18 @@ enum planck_keycodes {
|
|||
#define BACKLIT OSM(MOD_LSFT)
|
||||
#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( \
|
||||
K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, \
|
||||
K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \
|
||||
|
@ -42,8 +54,8 @@ enum planck_keycodes {
|
|||
LAYOUT_ortho_4x12_wrapper( \
|
||||
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_MLSF, CTL_T(K21), K22, K23, K24, K25, K26, K27, K28, K29, CTL_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 \
|
||||
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, 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__)
|
||||
|
||||
|
@ -131,8 +143,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|||
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
|
@ -167,15 +178,13 @@ bool music_mask_user(uint16_t keycode) {
|
|||
|
||||
void suspend_power_down_keymap(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
rgb_matrix_config.enable = false;
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_keymap(void) {
|
||||
rgb_matrix_config.enable = true;
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
}
|
||||
|
||||
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) {
|
||||
rgb_led led;
|
||||
for (int i = 0; i < DRIVER_LED_TOTAL; i++) {
|
||||
led = g_rgb_leds[i];
|
||||
|
@ -189,9 +198,16 @@ void rgb_matrix_indicators_user(void) {
|
|||
uint8_t this_mod = get_mods();
|
||||
uint8_t this_led = host_keyboard_leds();
|
||||
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 defined(RGBLIGHT_ENABLE) && defined(RGB_MATRIX_ENABLE)
|
||||
if ( userspace_config.rgb_layer_change &&
|
||||
#ifdef RGB_DISABLE_WHEN_USB_SUSPENDED
|
||||
!g_suspend_state &&
|
||||
#endif
|
||||
#if defined(RGBLIGHT_ENABLE)
|
||||
(!rgblight_config.enable && rgb_matrix_config.enable)
|
||||
#else
|
||||
rgb_matrix_config.enable
|
||||
|
@ -199,42 +215,42 @@ void rgb_matrix_indicators_user(void) {
|
|||
) {
|
||||
switch (biton32(layer_state)) {
|
||||
case _RAISE:
|
||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break;
|
||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||
case _LOWER:
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break;
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||
case _ADJUST:
|
||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break;
|
||||
rgb_matrix_layer_helper(0xFF, 0x00, 0x00); break;
|
||||
default:
|
||||
switch (biton32(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF, true); break;
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0xFF); break;
|
||||
case _COLEMAK:
|
||||
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF, true); break;
|
||||
rgb_matrix_layer_helper(0xFF, 0x00, 0xFF); break;
|
||||
case _DVORAK:
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00, true); break;
|
||||
rgb_matrix_layer_helper(0x00, 0xFF, 0x00); break;
|
||||
case _WORKMAN:
|
||||
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21, true); break;
|
||||
rgb_matrix_layer_helper(0xD9, 0xA5, 0x21); break;
|
||||
case _NORMAN:
|
||||
rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D, true); break;
|
||||
rgb_matrix_layer_helper(0xFF, 0x7C, 0x4D); break;
|
||||
case _MALTRON:
|
||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, true); break;
|
||||
rgb_matrix_layer_helper(0xFF, 0xFF, 0x00); break;
|
||||
case _EUCALYN:
|
||||
rgb_matrix_layer_helper(0xFF, 0x80, 0xBF, true); break;
|
||||
rgb_matrix_layer_helper(0xFF, 0x80, 0xBF); break;
|
||||
case _CARPLAX:
|
||||
rgb_matrix_layer_helper(0x00, 0x00, 0xFF, true); break;
|
||||
rgb_matrix_layer_helper(0x00, 0x00, 0xFF); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (biton32(default_layer_state)) {
|
||||
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:
|
||||
rgb_matrix_set_color(42, 0xFF, 0x00, 0xFF); break;
|
||||
rgb_matrix_set_color(is_ez ? 41 : 42, 0xFF, 0x00, 0xFF); break;
|
||||
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:
|
||||
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)) {
|
||||
rgb_matrix_set_color(24, 0x00, 0xFF, 0x00);
|
||||
|
@ -260,13 +276,13 @@ void matrix_init_keymap(void) {
|
|||
#else //RGB_MATRIX_INIT
|
||||
|
||||
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);
|
||||
writePinHigh(D5);
|
||||
|
||||
setPinOutput(B0);
|
||||
writePinHigh(B0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif //RGB_MATRIX_INIT
|
||||
|
||||
|
@ -277,22 +293,23 @@ void encoder_update(bool clockwise) {
|
|||
clockwise ? tap_code(KC_VOLD) : tap_code(KC_VOLU);
|
||||
break;
|
||||
case _LOWER:
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
clockwise ? rgb_matrix_step() : rgblight_step_reverse();
|
||||
#else
|
||||
#else
|
||||
clockwise ? tap_code(KC_PGDN) : tap_code(KC_PGUP);
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
case _ADJUST:
|
||||
#ifdef AUDIO_CLICKY
|
||||
#ifdef AUDIO_CLICKY
|
||||
clockwise ? clicky_freq_up() : clicky_freq_down();
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
clockwise ? tap_code(KC_DOWN) : tap_code(KC_UP);
|
||||
}
|
||||
#ifdef AUDIO_CLICKY
|
||||
#ifdef AUDIO_CLICKY
|
||||
clicky_play();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
#endif // ENCODER_ENABLE
|
||||
|
||||
|
@ -314,3 +331,26 @@ void dip_update(uint8_t index, bool active) {
|
|||
}
|
||||
}
|
||||
#endif // KEYBOARD_planck_rev6
|
||||
|
||||
#ifdef KEYBOARD_planck_ez
|
||||
uint32_t layer_state_set_keymap(uint32_t state) {
|
||||
|
||||
palClearPad(GPIOB, 8);
|
||||
palClearPad(GPIOB, 9);
|
||||
switch (biton32(state)) {
|
||||
case _LOWER:
|
||||
palSetPad(GPIOB, 9);
|
||||
break;
|
||||
case _RAISE:
|
||||
palSetPad(GPIOB, 8);
|
||||
break;
|
||||
case _ADJUST:
|
||||
palSetPad(GPIOB, 9);
|
||||
palSetPad(GPIOB, 8);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,8 @@ CONSOLE_ENABLE = no # Console for debug(+400)
|
|||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
TAP_DANCE_ENABLE = no
|
||||
AUDIO_ENABLE = yes
|
||||
SPACE_CADET_ENABLE = no
|
||||
|
||||
ifeq (,$(findstring planck/rev6,$(KEYBOARD))) # Make sure it's NOT the Planck Rev6
|
||||
RGBLIGHT_ENABLE = yes
|
||||
INDICATOR_LIGHTS = yes
|
||||
|
@ -16,6 +18,15 @@ ifneq (,$(findstring planck/light,$(KEYBOARD))) # Make sure it IS the Planck Lig
|
|||
RGBLIGHT_ENABLE = 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
|
||||
|
||||
ifeq ($(strip $(PROTOCOL)), VUSB)
|
||||
NKRO_ENABLE = no
|
||||
|
|
|
@ -3,20 +3,19 @@
|
|||
|
||||
/* ws2812 RGB LED */
|
||||
#if defined(KEYBOARD_fractal)
|
||||
#define RGB_DI_PIN D2
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 29 // Number of LEDs
|
||||
#undef RGBLIGHT_HUE_STEP
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#undef RGBLIGHT_SAT_STEP
|
||||
#define RGBLIGHT_SAT_STEP 8
|
||||
#undef RGBLIGHT_VAL_STEP
|
||||
#define RGBLIGHT_VAL_STEP 8
|
||||
#define RGBLIGHT_LIMIT_VAL 175
|
||||
#define RGBLIGHT_SLEEP
|
||||
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3
|
||||
#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14
|
||||
# define RGB_DI_PIN D2
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLIGHT_ANIMATIONS
|
||||
# define RGBLED_NUM 29 // Number of LEDs
|
||||
# undef RGBLIGHT_HUE_STEP
|
||||
# define RGBLIGHT_HUE_STEP 8
|
||||
# undef RGBLIGHT_SAT_STEP
|
||||
# define RGBLIGHT_SAT_STEP 8
|
||||
# undef RGBLIGHT_VAL_STEP
|
||||
# define RGBLIGHT_VAL_STEP 8
|
||||
# define RGBLIGHT_LIMIT_VAL 175
|
||||
# define RGBLIGHT_SLEEP
|
||||
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_OFFSET 3
|
||||
# define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 14
|
||||
#endif
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
stages:
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
||||
Preliminary Test:
|
||||
QMK Firmware:
|
||||
stage: test
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
@ -18,36 +16,7 @@ Preliminary Test:
|
|||
script:
|
||||
- make test:all
|
||||
- make planck/rev6:default planck/rev5:default
|
||||
|
||||
QMK Firmware Defaults:
|
||||
stage: deploy
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
tags:
|
||||
- linux
|
||||
image: ubuntu:18.10
|
||||
before_script:
|
||||
- apt-get update -qy
|
||||
- apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
|
||||
- avr-gcc --version
|
||||
- uname -a
|
||||
script:
|
||||
- make test:all
|
||||
- make all:default -j16
|
||||
|
||||
Drashna Firmware:
|
||||
stage: build
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
tags:
|
||||
- linux
|
||||
image: ubuntu:18.10
|
||||
before_script:
|
||||
- apt-get update -qy
|
||||
- apt-get install -y build-essential avr-libc binutils-arm-none-eabi binutils-avr dfu-programmer dfu-util gcc gcc-arm-none-eabi gcc-avr git libnewlib-arm-none-eabi unzip wget zip
|
||||
- avr-gcc --version
|
||||
script:
|
||||
- make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j16 --output-sync
|
||||
- make keebio/iris/rev2:drashna keebio/iris/rev2:drashna_old ergodox_ez:drashna ergodox_ez:drashna_glow keebio/viterbi/rev1:drashna orthodox/rev1:drashna orthodox/rev3:drashna crkbd:drashna planck/light:drashna planck/rev6:drashna fractal:drashna primekb/prime_m:drashna -j2 --output-sync
|
||||
artifacts:
|
||||
name: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
|
||||
paths:
|
||||
|
|
|
@ -2,50 +2,43 @@
|
|||
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define AUDIO_CLICKY
|
||||
#define STARTUP_SONG SONG(RICK_ROLL)
|
||||
#define GOODBYE_SONG SONG(SONIC_RING)
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
# define AUDIO_CLICKY
|
||||
# define STARTUP_SONG SONG(RICK_ROLL)
|
||||
# define GOODBYE_SONG SONG(SONIC_RING)
|
||||
# define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND), \
|
||||
SONG(OVERWATCH_THEME) \
|
||||
}
|
||||
|
||||
#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
|
||||
// #ifdef RGBLIGHT_ENABLE
|
||||
// #define NO_MUSIC_MODE
|
||||
// #endif //RGBLIGHT_ENABLE/
|
||||
// #ifndef __arm__
|
||||
// #undef NOTE_REST
|
||||
// #define NOTE_REST 1.00f
|
||||
// #endif // !__arm__
|
||||
# define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f
|
||||
|
||||
#define UNICODE_SONG_OSX SONG(RICK_ROLL)
|
||||
#define UNICODE_SONG_LNX SONG(RICK_ROLL)
|
||||
#define UNICODE_SONG_WIN SONG(RICK_ROLL)
|
||||
#define UNICODE_SONG_BSD SONG(RICK_ROLL)
|
||||
#define UNICODE_SONG_WINC SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_OSX SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_LNX SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_WIN SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_BSD SONG(RICK_ROLL)
|
||||
# define UNICODE_SONG_WINC SONG(RICK_ROLL)
|
||||
|
||||
#endif // !AUDIO_ENABLE
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT_SLEEP
|
||||
#undef RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
# define RGBLIGHT_SLEEP
|
||||
# undef RGBLIGHT_ANIMATIONS
|
||||
# define RGBLIGHT_EFFECT_BREATHING
|
||||
# define RGBLIGHT_EFFECT_SNAKE
|
||||
# define RGBLIGHT_EFFECT_KNIGHT
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
#ifndef ONESHOT_TAP_TOGGLE
|
||||
#define ONESHOT_TAP_TOGGLE 2
|
||||
# define ONESHOT_TAP_TOGGLE 2
|
||||
#endif // !ONESHOT_TAP_TOGGLE
|
||||
|
||||
#ifndef ONESHOT_TIMEOUT
|
||||
#define ONESHOT_TIMEOUT 3000
|
||||
# define ONESHOT_TIMEOUT 3000
|
||||
#endif// !ONESHOT_TIMEOUT
|
||||
|
||||
#ifndef QMK_KEYS_PER_SCAN
|
||||
#define QMK_KEYS_PER_SCAN 4
|
||||
# define QMK_KEYS_PER_SCAN 4
|
||||
#endif // !QMK_KEYS_PER_SCAN
|
||||
|
||||
|
||||
|
@ -62,24 +55,27 @@
|
|||
#define FORCE_NKRO
|
||||
|
||||
#ifndef TAPPING_TOGGLE
|
||||
#define TAPPING_TOGGLE 1
|
||||
# define TAPPING_TOGGLE 1
|
||||
#endif
|
||||
|
||||
#ifdef TAPPING_TERM
|
||||
#undef TAPPING_TERM
|
||||
# undef TAPPING_TERM
|
||||
#endif // TAPPING_TERM
|
||||
#if defined(KEYBOARD_ergodox_ez)
|
||||
#define TAPPING_TERM 185
|
||||
# define TAPPING_TERM 185
|
||||
#elif defined(KEYBOARD_crkbd)
|
||||
#define TAPPING_TERM 200
|
||||
# define TAPPING_TERM 200
|
||||
#else
|
||||
#define TAPPING_TERM 175
|
||||
# define TAPPING_TERM 175
|
||||
#endif
|
||||
|
||||
|
||||
// Disable action_get_macro and fn_actions, since we don't use these
|
||||
// and it saves on space in the firmware.
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
|
||||
#define TAP_CODE_DELAY 5
|
||||
|
||||
/* Disable unused and unneeded features to reduce on firmware size */
|
||||
#ifdef LOCKING_SUPPORT_ENABLE
|
||||
# undef LOCKING_SUPPORT_ENABLE
|
||||
#endif
|
||||
#ifdef LOCKING_RESYNC_ENABLE
|
||||
# undef LOCKING_RESYNC_ENABLE
|
||||
#endif
|
||||
|
|
|
@ -22,15 +22,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "wrappers.h"
|
||||
#include "process_records.h"
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
#include "tap_dances.h"
|
||||
# include "tap_dances.h"
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
#include "rgb_stuff.h"
|
||||
# include "rgb_stuff.h"
|
||||
#endif
|
||||
#if defined(AUDIO_ENABLE) && __GNUC__ > 7
|
||||
#if __has_include("drashna_song_list.h")
|
||||
#include "drashna_song_list.h"
|
||||
#endif
|
||||
# if __has_include("drashna_song_list.h")
|
||||
# include "drashna_song_list.h"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Define layer names */
|
||||
|
@ -92,13 +92,13 @@ But since TD() doesn't work when tap dance is disabled
|
|||
We use custom codes here, so we can substitute the right stuff
|
||||
*/
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
#define KC_D3_1 TD(TD_D3_1)
|
||||
#define KC_D3_2 TD(TD_D3_2)
|
||||
#define KC_D3_3 TD(TD_D3_3)
|
||||
#define KC_D3_4 TD(TD_D3_4)
|
||||
# define KC_D3_1 TD(TD_D3_1)
|
||||
# define KC_D3_2 TD(TD_D3_2)
|
||||
# define KC_D3_3 TD(TD_D3_3)
|
||||
# define KC_D3_4 TD(TD_D3_4)
|
||||
#else // TAP_DANCE_ENABLE
|
||||
#define KC_D3_1 KC_1
|
||||
#define KC_D3_2 KC_2
|
||||
#define KC_D3_3 KC_3
|
||||
#define KC_D3_4 KC_4
|
||||
# define KC_D3_1 KC_1
|
||||
# define KC_D3_2 KC_2
|
||||
# define KC_D3_3 KC_3
|
||||
# define KC_D3_4 KC_4
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
|
|
@ -18,11 +18,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
|
||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||
#ifdef KEYLOGGER_ENABLE
|
||||
#if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2)
|
||||
# if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2)
|
||||
xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed);
|
||||
#else
|
||||
# else
|
||||
xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed);
|
||||
#endif
|
||||
# endif
|
||||
#endif //KEYLOGGER_ENABLE
|
||||
|
||||
switch (keycode) {
|
||||
|
@ -63,9 +63,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
}
|
||||
break;
|
||||
|
||||
// These are a serious of gaming macros.
|
||||
// Only enables for the viterbi, basically,
|
||||
// to save on firmware space, since it's limited.
|
||||
// These are a serious of gaming macros.
|
||||
// Only enables for the viterbi, basically,
|
||||
// to save on firmware space, since it's limited.
|
||||
#ifdef MACROS_ENABLED
|
||||
case KC_OVERWATCH: // Toggle's if we hit "ENTER" or "BACKSPACE" to input macros
|
||||
if (record->event.pressed) { userspace_config.is_overwatch ^= 1; eeconfig_update_user(userspace_config.raw); }
|
||||
|
@ -104,7 +104,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|||
if (record->event.pressed) {
|
||||
uint8_t dtime;
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
diablo_key_time[dtime] = diablo_times[0];
|
||||
diablo_timer[dtime].key_time = diablo_times[0];
|
||||
}
|
||||
}
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
#include "drashna.h"
|
||||
|
||||
#if defined(KEYMAP_SAFE_RANGE)
|
||||
#define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
|
||||
# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
|
||||
#else
|
||||
#define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
|
||||
# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
|
||||
#endif
|
||||
|
||||
enum userspace_custom_keycodes {
|
||||
|
|
|
@ -150,7 +150,9 @@ void scan_rgblight_fadeout(void) { // Don't effing change this function .... rgb
|
|||
light->timer = timer_read();
|
||||
}
|
||||
else {
|
||||
if (light->enabled && biton32(layer_state) == 0) { rgblight_sethsv_default_helper(light_index); }
|
||||
if (light->enabled && biton32(layer_state) == 0) {
|
||||
rgblight_sethsv_default_helper(light_index);
|
||||
}
|
||||
litup = light->enabled = false;
|
||||
}
|
||||
}
|
||||
|
@ -253,8 +255,8 @@ void keyboard_post_init_rgb(void) {
|
|||
layer_state_set_user(layer_state);
|
||||
uint16_t old_hue = rgblight_config.hue;
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
for (uint16_t i = 360; i > 0; i--) {
|
||||
rgblight_sethsv_noeeprom( ( i + old_hue) % 360, 255, 255);
|
||||
for (uint16_t i = 255; i > 0; i--) {
|
||||
rgblight_sethsv_noeeprom( ( i + old_hue) % 255, 255, 255);
|
||||
matrix_scan();
|
||||
wait_ms(10);
|
||||
}
|
||||
|
@ -329,47 +331,8 @@ uint32_t layer_state_set_rgb(uint32_t state) {
|
|||
biton32(state) == _MODS ? rgblight_mode_noeeprom(RGBLIGHT_MODE_BREATHING) : rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT); // if _MODS layer is on, then breath to denote it
|
||||
break;
|
||||
}
|
||||
// layer_state_set_indicator(); // Runs every scan, so need to call this here .... since I can't get it working "right" anyhow
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
#if 0
|
||||
uint32_t default_layer_state_set_rgb(uint32_t state) {
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (userspace_config.rgb_layer_change) {
|
||||
rgblight_config_t temp_rgblight_config = rgblight_config;
|
||||
switch (biton32(state)) {
|
||||
case _COLEMAK:
|
||||
temp_rgblight_config.hue = 300;
|
||||
temp_rgblight_config.val = 255;
|
||||
temp_rgblight_config.sat = 255;
|
||||
temp_rgblight_config.mode = 1;
|
||||
break;
|
||||
case _DVORAK:
|
||||
temp_rgblight_config.hue = 150;
|
||||
temp_rgblight_config.val = 255;
|
||||
temp_rgblight_config.sat = 255;
|
||||
temp_rgblight_config.mode = 1;
|
||||
case _WORKMAN:
|
||||
temp_rgblight_config.hue = 43;
|
||||
temp_rgblight_config.val = 218;
|
||||
temp_rgblight_config.sat = 218;
|
||||
temp_rgblight_config.mode = 1;
|
||||
default:
|
||||
temp_rgblight_config.hue = 180;
|
||||
temp_rgblight_config.val = 255;
|
||||
temp_rgblight_config.sat = 255;
|
||||
temp_rgblight_config.mode = 1;
|
||||
}
|
||||
if (temp_rgblight_config.raw != eeconfig_read_rgblight()) {
|
||||
xprintf("rgblight set default layer hsv [EEPROM]: %u,%u,%u,%u\n", temp_rgblight_config.hue, temp_rgblight_config.sat, temp_rgblight_config.val, temp_rgblight_config.mode);
|
||||
eeconfig_update_rgblight(temp_rgblight_config.raw);
|
||||
}
|
||||
}
|
||||
#endif // RGBLIGHT_ENABLE
|
||||
return state;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,116 @@
|
|||
#ifndef RGBLIGHT_EFFECT_BREATHE_TABLE
|
||||
#define RGBLIGHT_EFFECT_BREATHE_TABLE
|
||||
|
||||
const uint8_t rgblight_effect_breathe_table[] PROGMEM = {
|
||||
/* #define RGBLIGHT_EFFECT_BREATHE_CENTER 0.00 */
|
||||
/* #define RGBLIGHT_EFFECT_BREATHE_MAX 255 */
|
||||
|
||||
#if RGBLIGHT_BREATHE_TABLE_SIZE == 256
|
||||
0x44, 0x45, 0x47, 0x48, 0x4a, 0x4b, 0x4c, 0x4e,
|
||||
0x4f, 0x51, 0x52, 0x54, 0x55, 0x57, 0x58, 0x5a,
|
||||
0x5c, 0x5d, 0x5f, 0x60, 0x62, 0x64, 0x65, 0x67,
|
||||
0x69, 0x6a, 0x6c, 0x6e, 0x70, 0x72, 0x73, 0x75,
|
||||
0x77, 0x79, 0x7b, 0x7c, 0x7e, 0x80, 0x82, 0x84,
|
||||
0x86, 0x88, 0x8a, 0x8b, 0x8d, 0x8f, 0x91, 0x93,
|
||||
0x95, 0x97, 0x99, 0x9b, 0x9d, 0x9f, 0xa1, 0xa3,
|
||||
0xa5, 0xa7, 0xa9, 0xaa, 0xac, 0xae, 0xb0, 0xb2,
|
||||
0xb4, 0xb6, 0xb8, 0xba, 0xbc, 0xbe, 0xbf, 0xc1,
|
||||
0xc3, 0xc5, 0xc7, 0xc9, 0xca, 0xcc, 0xce, 0xd0,
|
||||
0xd1, 0xd3, 0xd5, 0xd6, 0xd8, 0xda, 0xdb, 0xdd,
|
||||
0xde, 0xe0, 0xe1, 0xe3, 0xe4, 0xe5, 0xe7, 0xe8,
|
||||
0xe9, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, 0xf1,
|
||||
0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf8,
|
||||
0xf9, 0xfa, 0xfa, 0xfb, 0xfc, 0xfc, 0xfc, 0xfd,
|
||||
0xfd, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe,
|
||||
0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfd,
|
||||
0xfd, 0xfc, 0xfc, 0xfc, 0xfb, 0xfa, 0xfa, 0xf9,
|
||||
0xf8, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2,
|
||||
0xf1, 0xf0, 0xef, 0xee, 0xed, 0xec, 0xeb, 0xe9,
|
||||
0xe8, 0xe7, 0xe5, 0xe4, 0xe3, 0xe1, 0xe0, 0xde,
|
||||
0xdd, 0xdb, 0xda, 0xd8, 0xd6, 0xd5, 0xd3, 0xd1,
|
||||
0xd0, 0xce, 0xcc, 0xca, 0xc9, 0xc7, 0xc5, 0xc3,
|
||||
0xc1, 0xbf, 0xbe, 0xbc, 0xba, 0xb8, 0xb6, 0xb4,
|
||||
0xb2, 0xb0, 0xae, 0xac, 0xaa, 0xa9, 0xa7, 0xa5,
|
||||
0xa3, 0xa1, 0x9f, 0x9d, 0x9b, 0x99, 0x97, 0x95,
|
||||
0x93, 0x91, 0x8f, 0x8d, 0x8b, 0x8a, 0x88, 0x86,
|
||||
0x84, 0x82, 0x80, 0x7e, 0x7c, 0x7b, 0x79, 0x77,
|
||||
0x75, 0x73, 0x72, 0x70, 0x6e, 0x6c, 0x6a, 0x69,
|
||||
0x67, 0x65, 0x64, 0x62, 0x60, 0x5f, 0x5d, 0x5c,
|
||||
0x5a, 0x58, 0x57, 0x55, 0x54, 0x52, 0x51, 0x4f,
|
||||
0x4e, 0x4c, 0x4b, 0x4a, 0x48, 0x47, 0x45, 0x44
|
||||
#endif /* 256 bytes table */
|
||||
|
||||
#if RGBLIGHT_BREATHE_TABLE_SIZE == 128
|
||||
0x44, 0x47, 0x4a, 0x4c,
|
||||
0x4f, 0x52, 0x55, 0x58,
|
||||
0x5c, 0x5f, 0x62, 0x65,
|
||||
0x69, 0x6c, 0x70, 0x73,
|
||||
0x77, 0x7b, 0x7e, 0x82,
|
||||
0x86, 0x8a, 0x8d, 0x91,
|
||||
0x95, 0x99, 0x9d, 0xa1,
|
||||
0xa5, 0xa9, 0xac, 0xb0,
|
||||
0xb4, 0xb8, 0xbc, 0xbf,
|
||||
0xc3, 0xc7, 0xca, 0xce,
|
||||
0xd1, 0xd5, 0xd8, 0xdb,
|
||||
0xde, 0xe1, 0xe4, 0xe7,
|
||||
0xe9, 0xec, 0xee, 0xf0,
|
||||
0xf2, 0xf4, 0xf6, 0xf8,
|
||||
0xf9, 0xfa, 0xfc, 0xfc,
|
||||
0xfd, 0xfe, 0xfe, 0xfe,
|
||||
0xfe, 0xfe, 0xfe, 0xfe,
|
||||
0xfd, 0xfc, 0xfb, 0xfa,
|
||||
0xf8, 0xf7, 0xf5, 0xf3,
|
||||
0xf1, 0xef, 0xed, 0xeb,
|
||||
0xe8, 0xe5, 0xe3, 0xe0,
|
||||
0xdd, 0xda, 0xd6, 0xd3,
|
||||
0xd0, 0xcc, 0xc9, 0xc5,
|
||||
0xc1, 0xbe, 0xba, 0xb6,
|
||||
0xb2, 0xae, 0xaa, 0xa7,
|
||||
0xa3, 0x9f, 0x9b, 0x97,
|
||||
0x93, 0x8f, 0x8b, 0x88,
|
||||
0x84, 0x80, 0x7c, 0x79,
|
||||
0x75, 0x72, 0x6e, 0x6a,
|
||||
0x67, 0x64, 0x60, 0x5d,
|
||||
0x5a, 0x57, 0x54, 0x51,
|
||||
0x4e, 0x4b, 0x48, 0x45
|
||||
#endif /* 128 bytes table */
|
||||
|
||||
#if RGBLIGHT_BREATHE_TABLE_SIZE == 64
|
||||
0x44, 0x4a,
|
||||
0x4f, 0x55,
|
||||
0x5c, 0x62,
|
||||
0x69, 0x70,
|
||||
0x77, 0x7e,
|
||||
0x86, 0x8d,
|
||||
0x95, 0x9d,
|
||||
0xa5, 0xac,
|
||||
0xb4, 0xbc,
|
||||
0xc3, 0xca,
|
||||
0xd1, 0xd8,
|
||||
0xde, 0xe4,
|
||||
0xe9, 0xee,
|
||||
0xf2, 0xf6,
|
||||
0xf9, 0xfc,
|
||||
0xfd, 0xfe,
|
||||
0xfe, 0xfe,
|
||||
0xfd, 0xfb,
|
||||
0xf8, 0xf5,
|
||||
0xf1, 0xed,
|
||||
0xe8, 0xe3,
|
||||
0xdd, 0xd6,
|
||||
0xd0, 0xc9,
|
||||
0xc1, 0xba,
|
||||
0xb2, 0xaa,
|
||||
0xa3, 0x9b,
|
||||
0x93, 0x8b,
|
||||
0x84, 0x7c,
|
||||
0x75, 0x6e,
|
||||
0x67, 0x60,
|
||||
0x5a, 0x54,
|
||||
0x4e, 0x48
|
||||
#endif /* 64 bytes table */
|
||||
};
|
||||
|
||||
static const int table_scale = 256/sizeof(rgblight_effect_breathe_table);
|
||||
|
||||
#endif /* RGBLIGHT_EFFECT_BREATHE_TABLE */
|
|
@ -1,6 +1,8 @@
|
|||
SRC += drashna.c \
|
||||
process_records.c
|
||||
|
||||
LINK_TIME_OPTIMIZATION_ENABLE = yes
|
||||
|
||||
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
|
||||
SRC += secrets.c
|
||||
endif
|
||||
|
@ -9,9 +11,7 @@ ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
|
|||
SRC += tap_dances.c
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),AVR)
|
||||
EXTRAFLAGS += -flto
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(NO_SECRETS)), yes)
|
||||
OPT_DEFS += -DNO_SECRETS
|
||||
|
@ -33,7 +33,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
|
||||
SRC += rgb_stuff.c
|
||||
endif
|
||||
|
||||
|
|
|
@ -2,37 +2,38 @@
|
|||
|
||||
|
||||
//define diablo macro timer variables
|
||||
uint16_t diablo_timer[4];
|
||||
uint8_t diablo_times[] = { 0, 1, 3, 5, 10, 30 };
|
||||
uint8_t diablo_key_time[4];
|
||||
diablo_timer_t diablo_timer[4];
|
||||
|
||||
uint8_t diablo_times[] = { 0, 0, 1, 3, 5, 10, 30 };
|
||||
|
||||
// has the correct number of seconds elapsed (as defined by diablo_times)
|
||||
bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer]) < (diablo_key_time[dtimer] * 1000)) ? false : true; };
|
||||
bool check_dtimer(uint8_t dtimer) { return (timer_elapsed(diablo_timer[dtimer].key_time) < (diablo_timer[dtimer].timer * 1000)) ? false : true; };
|
||||
|
||||
// Cycle through the times for the macro, starting at 0, for disabled.
|
||||
// Max of six values, so don't exceed
|
||||
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data, uint8_t diablo_key) {
|
||||
void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) {
|
||||
int index = (int)user_data;
|
||||
if (state->count >= 7) {
|
||||
diablo_key_time[diablo_key] = diablo_times[0];
|
||||
diablo_timer[index].key_time = diablo_times[0];
|
||||
reset_tap_dance(state);
|
||||
} else {
|
||||
diablo_key_time[diablo_key] = diablo_times[state->count - 1];
|
||||
diablo_timer[index].key_time = diablo_times[state->count];
|
||||
}
|
||||
}
|
||||
|
||||
// Would rather have one function for all of this, but no idea how to do that...
|
||||
void diablo_tapdance1(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 0); }
|
||||
void diablo_tapdance2(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 1); }
|
||||
void diablo_tapdance3(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 2); }
|
||||
void diablo_tapdance4(qk_tap_dance_state_t *state, void *user_data) { diablo_tapdance_master(state, user_data, 3); }
|
||||
// One funtion to rule them all!!
|
||||
#define ACTION_TAP_DANCE_DIABLO(arg) { \
|
||||
.fn = { NULL, (void *)diablo_tapdance_master, NULL }, \
|
||||
.user_data = (void *)arg, \
|
||||
}
|
||||
|
||||
//Tap Dance Definitions
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// tap once to disable, and more to enable timed micros
|
||||
[TD_D3_1] = ACTION_TAP_DANCE_FN(diablo_tapdance1),
|
||||
[TD_D3_2] = ACTION_TAP_DANCE_FN(diablo_tapdance2),
|
||||
[TD_D3_3] = ACTION_TAP_DANCE_FN(diablo_tapdance3),
|
||||
[TD_D3_4] = ACTION_TAP_DANCE_FN(diablo_tapdance4),
|
||||
[TD_D3_1] = ACTION_TAP_DANCE_DIABLO(0),
|
||||
[TD_D3_2] = ACTION_TAP_DANCE_DIABLO(1),
|
||||
[TD_D3_3] = ACTION_TAP_DANCE_DIABLO(2),
|
||||
[TD_D3_4] = ACTION_TAP_DANCE_DIABLO(3),
|
||||
};
|
||||
|
||||
// Sends the key press to system, but only if on the Diablo layer
|
||||
|
@ -56,8 +57,8 @@ void send_diablo_keystroke(uint8_t diablo_key) {
|
|||
void run_diablo_macro_check(void) {
|
||||
uint8_t dtime;
|
||||
for (dtime = 0; dtime < 4; dtime++) {
|
||||
if (check_dtimer(dtime) && diablo_key_time[dtime]) {
|
||||
diablo_timer[dtime] = timer_read();
|
||||
if (check_dtimer(dtime) && diablo_timer[dtime].key_time) {
|
||||
diablo_timer[dtime].timer = timer_read();
|
||||
send_diablo_keystroke(dtime);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,10 +2,13 @@
|
|||
#include "drashna.h"
|
||||
|
||||
//define diablo macro timer variables
|
||||
extern uint16_t diablo_timer[4];
|
||||
extern uint8_t diablo_times[];
|
||||
extern uint8_t diablo_key_time[4];
|
||||
typedef struct {
|
||||
uint16_t timer;
|
||||
uint8_t key_time;
|
||||
} diablo_timer_t;
|
||||
|
||||
extern diablo_timer_t diablo_timer[4];
|
||||
|
||||
void run_diablo_macro_check(void);
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ arguments, we need a wrapper in order for these definitions to be
|
|||
expanded before being used as arguments to the LAYOUT_xxx macro.
|
||||
*/
|
||||
#if (!defined(LAYOUT) && defined(KEYMAP))
|
||||
#define LAYOUT KEYMAP
|
||||
# define LAYOUT KEYMAP
|
||||
#endif
|
||||
|
||||
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
|
@ -15,6 +15,7 @@ expanded before being used as arguments to the LAYOUT_xxx macro.
|
|||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||
#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
|
||||
#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
|
||||
|
||||
/*
|
||||
Blocks for each of the four major keyboard layouts
|
||||
|
|
Loading…
Reference in New Issue