drashna's userspace should now work correctly with Drop ALT

This commit is contained in:
Frederik Baerentsen 2020-07-13 17:44:28 +02:00
parent 516a561f47
commit c418087ed5
12 changed files with 468 additions and 519 deletions

View File

@ -6,28 +6,6 @@
/* Set Polling rate to 1000Hz */
#define USB_POLLING_INTERVAL_MS 1
#ifdef AUDIO_ENABLE
# if __GNUC__ > 5
# if __has_include("drashna_song_list.h")
# include "drashna_song_list.h"
# endif // if file exists
# endif // __GNUC__
# 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
# define UNICODE_SONG_MAC 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
# undef RGBLIGHT_ANIMATIONS
# if defined(__AVR__) && !defined(__AVR_AT90USB1286__)
@ -128,7 +106,7 @@
# define TAPPING_TERM 175
#endif
#define TAP_CODE_DELAY 5
#define TAP_CODE_DELAY 10
/* Disable unused and unneeded features to reduce on firmware size */
#ifdef LOCKING_SUPPORT_ENABLE

View File

@ -17,6 +17,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "drashna.h"
bool is_alt_tab_active = false;
uint16_t alt_tab_timer = 0;
bool is_ctrl_tab_active = false;
uint16_t ctrl_tab_timer = 0;
userspace_config_t userspace_config;
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed) {
@ -50,21 +56,6 @@ bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this
return false;
}
void bootmagic_lite(void) {
matrix_scan();
#if defined(DEBOUNCING_DELAY) && DEBOUNCING_DELAY > 0
wait_ms(DEBOUNCING_DELAY * 2);
#elif defined(DEBOUNCE) && DEBOUNCE > 0
wait_ms(DEBOUNCE * 2);
#else
wait_ms(30);
#endif
matrix_scan();
if (matrix_get_row(BOOTMAGIC_LITE_ROW) & (1 << BOOTMAGIC_LITE_COLUMN)) {
bootloader_jump();
}
}
__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
void keyboard_pre_init_user(void) {
@ -136,7 +127,38 @@ __attribute__((weak)) void matrix_scan_keymap(void) {}
// No global matrix scan code, so just run keymap's matrix
// scan function
LEADER_EXTERNS();
void matrix_scan_user(void) {
LEADER_DICTIONARY() {
leading = false;
leader_end();
SEQ_ONE_KEY(KC_C) { // Inline Code
SEND_STRING("`` " SS_TAP(X_LEFT) SS_TAP(X_LEFT));
}
SEQ_ONE_KEY(KC_M) {
SEND_STRING("Mvh\nFrederik");
}
SEQ_TWO_KEYS(KC_C, KC_B) { // Discord code block
SEND_STRING("```c" SS_LSFT("\n\n") "``` " SS_TAP(X_UP));
}
}
if (is_alt_tab_active) {
if (timer_elapsed(alt_tab_timer) > 750) {
unregister_code(KC_LALT);
is_alt_tab_active = false;
}
}
if (is_ctrl_tab_active) {
if (timer_elapsed(ctrl_tab_timer) > 750) {
unregister_code(KC_LCTRL);
is_ctrl_tab_active = false;
}
}
static bool has_ran_yet;
if (!has_ran_yet) {
has_ran_yet = true;
@ -174,11 +196,11 @@ __attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t
// Runs state check and changes underglow color and animation
layer_state_t default_layer_state_set_user(layer_state_t state) {
state = default_layer_state_set_keymap(state);
#if 0
//#if 0
# if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
state = default_layer_state_set_rgb(state);
state = layer_state_set_rgb_light(state);
# endif // RGBLIGHT_ENABLE
#endif
//#endif
return state;
}
@ -205,3 +227,76 @@ bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
return (value & mask) == mask;
}
#ifdef ENCODER_ENABLE
void encoder_update_user(uint8_t index, bool clockwise) {
if (index == 0) {
switch (biton32(layer_state)) {
case _WARCRAFT:
case _QWERTY:
// Move whole words. Hold shift to select while moving.
if (!clockwise) {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
}
alt_tab_timer = timer_read();
tap_code16(KC_TAB);
} else {
if (!is_alt_tab_active) {
is_alt_tab_active = true;
register_code(KC_LALT);
}
alt_tab_timer = timer_read();
tap_code16(S(KC_TAB));
}
break;
case _RAISE:
if (!clockwise) {
if (!is_ctrl_tab_active) {
is_ctrl_tab_active = true;
register_code(KC_LCTRL);
}
ctrl_tab_timer = timer_read();
tap_code16(KC_TAB);
} else {
if (!is_ctrl_tab_active) {
is_ctrl_tab_active = true;
register_code(KC_LCTRL);
}
ctrl_tab_timer = timer_read();
tap_code16(S(KC_TAB));
}
break;
default:
// History scrubbing. For Adobe products, hold shift while moving
// backward to go forward instead.
if (clockwise) {
tap_code16(C(KC_Z));
} else {
tap_code16(C(KC_Y));
}
break;
}
} else if (index == 1) {
switch (biton32(layer_state)) {
case _QWERTY:
// Scrolling with Mouse wheel.
if (clockwise) {
tap_code(KC_WH_D);
} else {
tap_code(KC_WH_U);
}
break;
default:
// Volume control.
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
break;
}
}
}
#endif

View File

@ -21,82 +21,81 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "version.h"
#include "eeprom.h"
#include "wrappers.h"
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
# include "tap_dances.h"
#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE)
# include "rgb_stuff.h"
#endif
#if defined(RGB_MATRIX_ENABLE)
# include "rgb_matrix_stuff.h"
#endif
#if defined(OLED_DRIVER_ENABLE)
# include "oled_stuff.h"
#endif
/* Define layer names */
enum userspace_layers {
_QWERTY = 0,
_NUMLOCK = 0,
_COLEMAK,
_DVORAK,
_WORKMAN,
_NORMAN,
_MALTRON,
_EUCALYN,
_CARPLAX,
_MODS, /* layer 8 */
_GAMEPAD,
_DIABLO,
_WARCRAFT,
_MACROS,
_MEDIA,
_LOWER,
_RAISE,
_NAV,
_ADJUST,
};
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
void matrix_init_keymap(void);
void shutdown_keymap(void);
void suspend_power_down_keymap(void);
void suspend_wakeup_init_keymap(void);
void matrix_scan_keymap(void);
layer_state_t layer_state_set_keymap(layer_state_t state);
layer_state_t default_layer_state_set_keymap(layer_state_t state);
void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
bool hasAllBitsInMask(uint8_t value, uint8_t mask);
#if !defined(DROP_ALT)
// clang-format off
typedef union {
uint32_t raw;
struct {
bool rgb_layer_change :1;
bool is_overwatch :1;
bool nuke_switch :1;
bool swapped_numbers :1;
bool rgb_matrix_idle_anim :1;
};
} userspace_config_t;
// clang-format on
#include "process_records.h"
#ifdef TAP_DANCE_ENABLE
# include "tap_dances.h"
#endif // TAP_DANCE_ENABLE
#if defined(RGBLIGHT_ENABLE)
# include "rgb_stuff.h"
#endif
#if defined(RGB_MATRIX_ENABLE)
# include "rgb_matrix_stuff.h"
#endif
#if defined(OLED_DRIVER_ENABLE)
# include "oled_stuff.h"
#endif
/* Define layer names */
extern userspace_config_t userspace_config;
bool mod_key_press_timer(uint16_t code, uint16_t mod_code, bool pressed);
bool mod_key_press(uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer);
void matrix_init_keymap(void);
void shutdown_keymap(void);
void suspend_power_down_keymap(void);
void suspend_wakeup_init_keymap(void);
void matrix_scan_keymap(void);
layer_state_t layer_state_set_keymap(layer_state_t state);
layer_state_t default_layer_state_set_keymap(layer_state_t state);
void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
bool hasAllBitsInMask(uint8_t value, uint8_t mask);
// clang-format off
typedef union {
uint32_t raw;
struct {
bool rgb_layer_change :1;
bool swapped_numbers :1;
bool rgb_matrix_idle_anim :1;
};
} userspace_config_t;
// clang-format on
extern userspace_config_t userspace_config;
/*
Custom Keycodes for Diablo 3 layer
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)
#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
#endif // TAP_DANCE_ENABLE
#endif
/*
Custom Keycodes for Diablo 3 layer
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)
#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
#endif // TAP_DANCE_ENABLE

View File

@ -77,151 +77,69 @@ void render_keylogger_status(void) {
void render_default_layer_state(void) {
oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false);
switch (get_highest_layer(default_layer_state)) {
case _QWERTY:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false);
switch (get_highest_layer(layer_state)) {
case _DIABLO:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_DIABLO), false);
break;
case _COLEMAK:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_COLEMAK), false);
break;
case _DVORAK:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_DVORAK), false);
break;
case _WORKMAN:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false);
break;
case _NORMAN:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_NORMAN), false);
break;
case _MALTRON:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_MALTRON), false);
break;
case _EUCALYN:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_EUCALYN), false);
break;
case _CARPLAX:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_CARPLAX), false);
case _WARCRAFT:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_WARCRAFT), false);
break;
default:
switch (get_highest_layer(default_layer_state)) {
case _WORKMAN:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_WORKMAN), false);
break;
case _QWERTY:
oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), false);
break;
}
}
#ifdef OLED_DISPLAY_128X64
oled_advance_page(true);
#endif
}
// void render_default_layer_state(void) {
// oled_write_P(PSTR(OLED_RENDER_LAYOUT_NAME), false);
// oled_write_P(PSTR(OLED_RENDER_LAYOUT_QWERTY), layer_state_is(_QWERTY));
// oled_write_P(PSTR(OLED_RENDER_LAYOUT_DIABLO), layer_state_is(_WARCRAFT));
// oled_write_P(PSTR(OLED_RENDER_LAYOUT_WARCRAFT), layer_state_is(_DIABLO));
// oled_advance_page(true);
// }
void render_layer_state(void) {
oled_write_P(PSTR(OLED_RENDER_LAYER_NAME), false);
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_LAYER_LOWER), layer_state_is(_LOWER));
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_LAYER_RAISE), layer_state_is(_RAISE));
#if _MODS
# ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
# endif
oled_write_P(PSTR(OLED_RENDER_LAYER_MODS), layer_state_is(_MODS));
#endif
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(OLED_RENDER_LAYER_NAV), layer_state_is(_NAV));
oled_advance_page(true);
#endif
}
void render_keylock_status(uint8_t led_usb_state) {
oled_write_P(PSTR(OLED_RENDER_LOCK_NAME), false);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(OLED_RENDER_LOCK_NUML), led_usb_state & (1 << USB_LED_NUM_LOCK));
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_LOCK_CAPS), led_usb_state & (1 << USB_LED_CAPS_LOCK));
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_LOCK_SCLK), led_usb_state & (1 << USB_LED_SCROLL_LOCK));
#ifndef OLED_DISPLAY_128X64
oled_advance_page(true);
#endif
}
void render_mod_status(uint8_t modifiers) {
oled_write_P(PSTR(OLED_RENDER_MODS_NAME), false);
oled_write_P(PSTR(OLED_RENDER_MODS_SFT), (modifiers & MOD_MASK_SHIFT));
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_MODS_CTL), (modifiers & MOD_MASK_CTRL));
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_MODS_ALT), (modifiers & MOD_MASK_ALT));
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(" "), false);
#endif
oled_write_P(PSTR(OLED_RENDER_MODS_GUI), (modifiers & MOD_MASK_GUI));
}
void render_bootmagic_status(void) {
/* Show Ctrl-Gui Swap options */
static const char PROGMEM logo[][2][3] = {
{{0x97, 0x98, 0}, {0xb7, 0xb8, 0}},
{{0x95, 0x96, 0}, {0xb5, 0xb6, 0}},
};
oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NAME), false);
#ifdef OLED_DISPLAY_128X64
if (keymap_config.swap_lctl_lgui)
#else
oled_write_P(PSTR(" "), false);
#endif
{
oled_write_P(logo[1][0], false);
#ifdef OLED_DISPLAY_128X64
} else {
#endif
oled_write_P(logo[0][0], false);
}
oled_write_P(PSTR(" "), false);
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NKRO), keymap_config.nkro);
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR(OLED_RENDER_BOOTMAGIC_NOGUI), !keymap_config.no_gui);
oled_write_P(PSTR("Magic "), false);
if (keymap_config.swap_lctl_lgui)
#endif
{
oled_write_P(logo[1][1], false);
#ifdef OLED_DISPLAY_128X64
} else {
#endif
oled_write_P(logo[0][1], false);
}
oled_write_P(PSTR(" "), false);
#ifdef OLED_DISPLAY_128X64
oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_GRV), keymap_config.swap_grave_esc);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_CAPS), keymap_config.swap_control_capslock);
oled_advance_page(true);
#else
oled_write_P(PSTR(OLED_RENDER_BOOTMAGIC_NKRO), keymap_config.nkro);
#endif
}
void render_user_status(void) {
oled_write_P(PSTR(OLED_RENDER_USER_NAME), false);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(OLED_RENDER_USER_ANIM), userspace_config.rgb_matrix_idle_anim);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(OLED_RENDER_USER_LAYR), userspace_config.rgb_layer_change);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR(OLED_RENDER_USER_NUKE), userspace_config.nuke_switch);
#ifdef OLED_DISPLAY_128X64
oled_advance_page(true);
#endif
}
__attribute__((weak)) void oled_driver_render_logo(void) {
// clang-format off
static const char PROGMEM qmk_logo[] = {
@ -250,24 +168,19 @@ void render_status_secondary(void) {
void render_status_main(void) {
/* Show Keyboard Layout */
render_default_layer_state();
render_layer_state();
render_keylock_status(host_keyboard_leds());
render_bootmagic_status();
render_user_status();
render_mod_status(get_mods() | get_oneshot_mods());
//render_bootmagic_status();
//render_user_status();
render_keylogger_status();
}
void oled_task_user(void) {
if (timer_elapsed32(oled_timer) > 30000) {
oled_off();
return;
}
#ifndef SPLIT_KEYBOARD
else {
oled_on();
}
#endif
update_log();
if (is_master) {

View File

@ -11,19 +11,16 @@ bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
# define OLED_RENDER_LAYOUT_NAME "Layout: "
# define OLED_RENDER_LAYOUT_QWERTY "Qwerty"
# define OLED_RENDER_LAYOUT_COLEMAK "Colemak"
# define OLED_RENDER_LAYOUT_DVORAK "Dvorak"
# define OLED_RENDER_LAYOUT_WORKMAN "Workman"
# define OLED_RENDER_LAYOUT_NORMAN "Norman"
# define OLED_RENDER_LAYOUT_MALTRON "Matron"
# define OLED_RENDER_LAYOUT_EUCALYN "Eucalyn"
# define OLED_RENDER_LAYOUT_CARPLAX "Carplax"
# define OLED_RENDER_LAYOUT_WARCRAFT "Warcraft"
# define OLED_RENDER_LAYOUT_DIABLO "Diablo"
# define OLED_RENDER_LAYOUT_WORKMAN "Workman"
# define OLED_RENDER_LAYER_NAME "Layer:\n"
# define OLED_RENDER_LAYER_LOWER "Lower"
# define OLED_RENDER_LAYER_RAISE "Raise"
# define OLED_RENDER_LAYER_ADJUST "Adjust"
# define OLED_RENDER_LAYER_ADJUST "Adj"
# define OLED_RENDER_LAYER_MODS "Mods"
# define OLED_RENDER_LAYER_NAV "Nav"
# define OLED_RENDER_LOCK_NAME "Lock: "
# define OLED_RENDER_LOCK_NUML "NUML"
@ -36,56 +33,4 @@ bool process_record_user_oled(uint16_t keycode, keyrecord_t *record);
# define OLED_RENDER_MODS_ALT "Alt"
# define OLED_RENDER_MODS_GUI "GUI"
# define OLED_RENDER_BOOTMAGIC_NAME "Boot "
# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
# define OLED_RENDER_USER_NAME "USER:"
# define OLED_RENDER_USER_ANIM "Anim"
# define OLED_RENDER_USER_LAYR "Layr"
# define OLED_RENDER_USER_NUKE "Nuke"
#else
# define OLED_RENDER_KEYLOGGER "KLogr"
# define OLED_RENDER_LAYOUT_NAME "Lyout"
# define OLED_RENDER_LAYOUT_QWERTY " QRTY"
# define OLED_RENDER_LAYOUT_COLEMAK " COLE"
# define OLED_RENDER_LAYOUT_DVORAK " DVRK"
# define OLED_RENDER_LAYOUT_WORKMAN " WKMN"
# define OLED_RENDER_LAYOUT_NORMAN " NORM"
# define OLED_RENDER_LAYOUT_MALTRON " MLTN"
# define OLED_RENDER_LAYOUT_EUCALYN " ECLN"
# define OLED_RENDER_LAYOUT_CARPLAX " CRPX"
# define OLED_RENDER_LAYER_NAME "LAYER"
# define OLED_RENDER_LAYER_LOWER "Lower"
# define OLED_RENDER_LAYER_RAISE "Raise"
# define OLED_RENDER_LAYER_ADJUST "Adjst"
# define OLED_RENDER_LAYER_MODS " Mods"
# define OLED_RENDER_LOCK_NAME "Lock:"
# define OLED_RENDER_LOCK_NUML "N"
# define OLED_RENDER_LOCK_CAPS "C"
# define OLED_RENDER_LOCK_SCLK "S"
# define OLED_RENDER_MODS_NAME "Mods: "
# define OLED_RENDER_MODS_SFT "S"
# define OLED_RENDER_MODS_CTL "C"
# define OLED_RENDER_MODS_ALT "A"
# define OLED_RENDER_MODS_GUI "G"
# define OLED_RENDER_BOOTMAGIC_NAME "BTMGK"
# define OLED_RENDER_BOOTMAGIC_NKRO "NKRO"
# define OLED_RENDER_BOOTMAGIC_NOGUI "nGUI"
# define OLED_RENDER_BOOTMAGIC_GRV "GRV"
# define OLED_RENDER_BOOTMAGIC_CAPS "CAPS"
# define OLED_RENDER_USER_NAME "USER:"
# define OLED_RENDER_USER_ANIM "Anim"
# define OLED_RENDER_USER_LAYR "Layr"
# define OLED_RENDER_USER_NUKE "Nuke"
#endif

View File

@ -30,7 +30,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#endif
) {
switch (keycode) {
case KC_QWERTY ... KC_WORKMAN:
case KC_QWERTY:
if (record->event.pressed) {
uint8_t mods = mod_config(get_mods() | get_oneshot_mods());
if (!mods) {
@ -101,28 +101,96 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
}
break;
#ifdef UNICODE_ENABLE
case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
if (record->event.pressed) {
send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
}
break;
case UC_TABL: // ┬─┬ノ( º _ ºノ)
if (record->event.pressed) {
send_unicode_string("┬─┬ノ( º _ ºノ)");
}
break;
case UC_SHRG: // ¯\_(ツ)_/¯
if (record->event.pressed) {
send_unicode_string("¯\\_(ツ)_/¯");
}
break;
case UC_DISA: // ಠ_ಠ
if (record->event.pressed) {
send_unicode_string("ಠ_ಠ");
}
break;
#endif
static bool bsdel_mods = false;
case BSPCDEL:
if (record->event.pressed) {
if (get_mods() & MOD_BIT(KC_LSFT)) {
unregister_code(KC_LSFT);
register_code(KC_DEL);
bsdel_mods = true;
} else {
register_code(KC_BSPC);
}
} else {
if (bsdel_mods) {
unregister_code(KC_DEL);
register_code(KC_LSFT);
bsdel_mods = false;
} else {
unregister_code(KC_BSPC);
}
}
return false;
break;
case OE:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_1));
SEND_STRING(SS_TAP(X_KP_6));
SEND_STRING(SS_UP(X_LALT));
return false;
}
break;
case oe: //if (get_mods() & MODS_SHIFT_MASK)
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_4));
SEND_STRING(SS_TAP(X_KP_8));
SEND_STRING(SS_UP(X_LALT));
return false;
}
break;
case AE:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_1));
SEND_STRING(SS_TAP(X_KP_9));
SEND_STRING(SS_TAP(X_KP_8));
SEND_STRING(SS_UP(X_LALT));
return false;
}
break;
case ae:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_3));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_UP(X_LALT));
return false;
}
break;
case AA:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_1));
SEND_STRING(SS_TAP(X_KP_9));
SEND_STRING(SS_TAP(X_KP_7));
SEND_STRING(SS_UP(X_LALT));
return false;
}
break;
case aa:
if (record->event.pressed) {
SEND_STRING(SS_DOWN(X_LALT));
SEND_STRING(SS_TAP(X_KP_0));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_2));
SEND_STRING(SS_TAP(X_KP_9));
SEND_STRING(SS_UP(X_LALT));
return false;
}
break;
case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
if (record->event.pressed) {

View File

@ -10,9 +10,6 @@
enum userspace_custom_keycodes {
VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
KC_QWERTY, // Sets default layer to QWERTY
KC_COLEMAK, // Sets default layer to COLEMAK
KC_DVORAK, // Sets default layer to DVORAK
KC_WORKMAN, // Sets default layer to WORKMAN
KC_DIABLO_CLEAR, // Clears all Diablo Timers
KC_MAKE, // Run keyboard's customized make command
KC_RGB_T, // Toggles RGB Layer Indication mode
@ -23,11 +20,18 @@ enum userspace_custom_keycodes {
KC_SECRET_4, // test4
KC_SECRET_5, // test5
KC_CCCV, // Hold to copy, tap to paste
aa,
AA,
oe,
OE,
ae,
AE,
KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
UC_FLIP, // (ಠ痊ಠ)┻━┻
UC_TABL, // ┬─┬ノ( º _ ºノ)
UC_SHRG, // ¯\_(ツ)_/¯
UC_DISA, // ಠ_ಠ
BSPCDEL,
NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
};

View File

@ -273,13 +273,13 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
#ifdef RGBLIGHT_ENABLE
if (userspace_config.rgb_layer_change) {
switch (get_highest_layer(state)) {
case _MACROS:
rgblight_set_hsv_and_mode(HSV_ORANGE, userspace_config.is_overwatch ? RGBLIGHT_MODE_SNAKE + 2 : RGBLIGHT_MODE_SNAKE + 3);
case _QWERTY:
rgblight_set_hsv_and_mode(HSV_CYAN, RGBLIGHT_MODE_STATIC_LIGHT);
break;
case _MEDIA:
rgblight_set_hsv_and_mode(HSV_CHARTREUSE, RGBLIGHT_MODE_KNIGHT + 1);
case _WORKMAN:
rgblight_set_hsv_and_mode(HSV_PURPLE, RGBLIGHT_MODE_STATIC_LIGHT);
break;
case _GAMEPAD:
case _WARCRAFT:
rgblight_set_hsv_and_mode(HSV_ORANGE, RGBLIGHT_MODE_SNAKE + 2);
break;
case _DIABLO:
@ -298,26 +298,8 @@ layer_state_t layer_state_set_rgb_light(layer_state_t state) {
{
uint8_t mode = get_highest_layer(state) == _MODS ? RGBLIGHT_MODE_BREATHING : RGBLIGHT_MODE_STATIC_LIGHT;
switch (get_highest_layer(default_layer_state)) {
case _COLEMAK:
rgblight_set_hsv_and_mode(HSV_MAGENTA, mode);
break;
case _DVORAK:
rgblight_set_hsv_and_mode(HSV_SPRINGGREEN, mode);
break;
case _WORKMAN:
rgblight_set_hsv_and_mode(HSV_GOLDENROD, mode);
break;
case _NORMAN:
rgblight_set_hsv_and_mode(HSV_CORAL, mode);
break;
case _MALTRON:
rgblight_set_hsv_and_mode(HSV_YELLOW, mode);
break;
case _EUCALYN:
rgblight_set_hsv_and_mode(HSV_PINK, mode);
break;
case _CARPLAX:
rgblight_set_hsv_and_mode(HSV_BLUE, mode);
case _QWERTY:
rgblight_set_hsv_and_mode(HSV_CYAN, mode);
break;
default:
rgblight_set_hsv_and_mode(HSV_CYAN, mode);

View File

@ -1,64 +1,66 @@
SRC += drashna.c \
process_records.c
ifneq ($(strip $(DROP_ALT)), yes)
SRC += drashna.c \
process_records.c
ifneq ($(PLATFORM),CHIBIOS)
LTO_ENABLE = yes
endif
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
ifneq ($(strip $(NO_SECRETS)), yes)
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
SRC += secrets.c
ifneq ($(PLATFORM),CHIBIOS)
LTO_ENABLE = yes
endif
ifeq ($(strip $(NO_SECRETS)), lite)
OPT_DEFS += -DNO_SECRETS
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
ifneq ($(strip $(NO_SECRETS)), yes)
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
SRC += secrets.c
endif
ifeq ($(strip $(NO_SECRETS)), lite)
OPT_DEFS += -DNO_SECRETS
endif
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dances.c
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb_stuff.c
ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
OPT_DEFS += -DINDICATOR_LIGHTS
endif
ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
OPT_DEFS += -DRGBLIGHT_TWINKLE
endif
ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
OPT_DEFS += -DRGBLIGHT_NOEEPROM
endif
ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
endif
endif
RGB_MATRIX_ENABLE ?= no
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
SRC += rgb_matrix_stuff.c
endif
ifdef CONSOLE_ENABLE
ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
OPT_DEFS += -DKEYLOGGER_ENABLE
endif
endif
ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
OPT_DEFS += -DMAKE_BOOTLOADER
endif
# At least until build.mk or the like drops, this is here to prevent
# VUSB boards from enabling NKRO, as they do not support it. Ideally
# this should be handled per keyboard, but until that happens ...
ifeq ($(strip $(PROTOCOL)), VUSB)
NKRO_ENABLE = no
endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_stuff.c
endif
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dances.c
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb_stuff.c
ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
OPT_DEFS += -DINDICATOR_LIGHTS
endif
ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
OPT_DEFS += -DRGBLIGHT_TWINKLE
endif
ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
OPT_DEFS += -DRGBLIGHT_NOEEPROM
endif
ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
endif
endif
RGB_MATRIX_ENABLE ?= no
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
SRC += rgb_matrix_stuff.c
endif
ifdef CONSOLE_ENABLE
ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
OPT_DEFS += -DKEYLOGGER_ENABLE
endif
endif
ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
OPT_DEFS += -DMAKE_BOOTLOADER
endif
# At least until build.mk or the like drops, this is here to prevent
# VUSB boards from enabling NKRO, as they do not support it. Ideally
# this should be handled per keyboard, but until that happens ...
ifeq ($(strip $(PROTOCOL)), VUSB)
NKRO_ENABLE = no
endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_stuff.c
endif

View File

@ -17,6 +17,8 @@ expanded before being used as arguments to the LAYOUT_xxx macro.
#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__)
#define LAYOUT_ut472_wrapper(...) LAYOUT_ut472(__VA_ARGS__)
#define LAYOUT_dropALT_wrapper(...) LAYOUT_dropALT(__VA_ARGS__)
/*
Blocks for each of the four major keyboard layouts
@ -34,45 +36,14 @@ NOTE: These are all the same length. If you do a search/replace
#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G
#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
// #define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, TD_ae
// #define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, TD_oe
// #define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, TD_aa
#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P
#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN
#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH
#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G
#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D
#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O
#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH
#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B
#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G
#define ______________COLEMAK_MOD_DH_L3____________ KC_Z, KC_X, KC_C, KC_D, KC_V
#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
#define ______________COLEMAK_MOD_DH_R2____________ KC_M, KC_N, KC_E, KC_I, KC_O
#define ______________COLEMAK_MOD_DH_R3____________ KC_K, KC_H, KC_COMM, KC_DOT, KC_SLASH
#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
#define _________________DVORAK_L3_________________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, KC_Z
#define ________________DVORAK_AU_L1_______________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
#define ________________DVORAK_AU_L2_______________ KC_O, KC_A, KC_E, KC_I, KC_U
#define ________________DVORAK_AU_L3_______________ KC_SCLN, KC_Q, KC_J, KC_K, KC_X
#define ________________DVORAK_AU_R1_______________ KC_F, KC_G, KC_C, KC_R, KC_L
#define ________________DVORAK_AU_R2_______________ KC_D, KC_H, KC_T, KC_N, KC_S
#define ________________DVORAK_AU_R3_______________ KC_B, KC_M, KC_W, KC_V, KC_Z
#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B
#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G
#define _________________WORKMAN_L3________________ KC_Z, KC_X, KC_M, KC_C, KC_V
@ -81,70 +52,6 @@ NOTE: These are all the same length. If you do a search/replace
#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I
#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, KC_SLASH
#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K
#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G
#define _________________NORMAN_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B
#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN
#define _________________NORMAN_R2_________________ KC_Y, KC_N, KC_I, KC_O, KC_U
#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, KC_SLASH
#define _________________MALTRON_L1________________ KC_Q, KC_P, KC_Y, KC_C, KC_B
#define _________________MALTRON_L2________________ KC_A, KC_N, KC_I, KC_S, KC_F
#define _________________MALTRON_L3________________ KC_SCLN, KC_SLSH, KC_J, KC_G, KC_COMM
#define _________________MALTRON_R1________________ KC_V, KC_M, KC_U, KC_Z, KC_L
#define _________________MALTRON_R2________________ KC_D, KC_T, KC_D, KC_O, KC_R
#define _________________MALTRON_R3________________ KC_DOT, KC_W, KC_K, KC_MINS, KC_X
#define _________________EUCALYN_L1________________ KC_SLSH, KC_COMM, KC_DOT, KC_F, KC_Q
#define _________________EUCALYN_L2________________ KC_A, KC_O, KC_E, KC_I, KC_U
#define _________________EUCALYN_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_W
#define _________________EUCALYN_R1________________ KC_M, KC_R, KC_D, KC_Y, KC_P
#define _________________EUCALYN_R2________________ KC_G, KC_T, KC_K, KC_S, KC_N
#define _________________EUCALYN_R3________________ KC_B, KC_H, KC_J, KC_L, KC_SCLN
#define _____________CARPLAX_QFMLWY_L1_____________ KC_Q, KC_F, KC_M, KC_L, KC_W
#define _____________CARPLAX_QFMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
#define _____________CARPLAX_QFMLWY_L3_____________ KC_Z, KC_V, KC_G, KC_C, KC_X
#define _____________CARPLAX_QFMLWY_R1_____________ KC_Y, KC_U, KC_O, KC_B, KC_J
#define _____________CARPLAX_QFMLWY_R2_____________ KC_I, KC_A, KC_E, KC_H, KC_SCLN
#define _____________CARPLAX_QFMLWY_R3_____________ KC_P, KC_K, KC_COMM, KC_DOT, KC_SLSH
#define _____________CARPLAX_QGMLWB_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
#define _____________CARPLAX_QGMLWB_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
#define _____________CARPLAX_QGMLWB_L3_____________ KC_Z, KC_X, KC_C, KC_F, KC_J
#define _____________CARPLAX_QGMLWB_R1_____________ KC_B, KC_Y, KC_U, KC_V, KC_SCLN
#define _____________CARPLAX_QGMLWB_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H
#define _____________CARPLAX_QGMLWB_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
#define _____________CARPLAX_QGMLWY_L1_____________ KC_Q, KC_G, KC_M, KC_L, KC_W
#define _____________CARPLAX_QGMLWY_L2_____________ KC_D, KC_S, KC_T, KC_N, KC_R
#define _____________CARPLAX_QGMLWY_L3_____________ KC_Z, KC_X, KC_C, KC_V, KC_J
#define _____________CARPLAX_QGMLWY_R1_____________ KC_Y, KC_F, KC_U, KC_B, KC_SCLN
#define _____________CARPLAX_QGMLWY_R2_____________ KC_I, KC_A, KC_E, KC_O, KC_H
#define _____________CARPLAX_QGMLWY_R3_____________ KC_K, KC_P, KC_COMM, KC_DOT, KC_SLSH
#define _________________WHITE_R1__________________ KC_V, KC_Y, KC_D, KC_COMM, KC_QUOT
#define _________________WHITE_R2__________________ KC_A, KC_T, KC_H, KC_E, KC_B
#define _________________WHITE_R3__________________ KC_P, KC_K, KC_G, KC_W, KC_Q
#define _________________WHITE_L1__________________ KC_INT1, KC_J, KC_M, KC_L, KC_U
#define _________________WHITE_L2__________________ KC_MINS, KC_C, KC_S, KC_N, KC_O // KC_I
#define _________________WHITE_L3__________________ KC_X, KC_R, KC_F, KC_DOT, KC_Z
#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5
#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0
#define _________________FUNC_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5
@ -152,33 +59,38 @@ NOTE: These are all the same length. If you do a search/replace
#define ___________________BLANK___________________ _______, _______, _______, _______, _______
#define _________________LOWER_L1__________________ ___________________BLANK___________________
#define _________________LOWER_L2__________________ _______, KC_MPRV, KC_MPLY, KC_MNXT, _______
#define _________________LOWER_L3__________________ ___________________BLANK___________________
#define _________________LOWER_L1__________________ KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC
#define _________________LOWER_L2__________________ _________________FUNC_LEFT_________________
#define _________________LOWER_L3__________________ _________________FUNC_RIGHT________________
#define _________________LOWER_R1__________________ KC_SLSH, KC_7, KC_8, KC_9, KC_MINS
#define _________________LOWER_R2__________________ KC_ASTR, KC_4, KC_5, KC_6, KC_COMM
#define _________________LOWER_R3__________________ KC_0, KC_1, KC_2, KC_3, KC_EQL
#define _________________LOWER_R1__________________ KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN
#define _________________LOWER_R2__________________ _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR
#define _________________LOWER_R3__________________ _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
#define _________________RAISE_L1__________________ KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE
#define _________________RAISE_L2__________________ KC_HASH, KC_DLR, KC_LBRC, KC_RBRC, KC_GRV
#define _________________RAISE_L3__________________ KC_PERC, KC_CIRC, KC_LCBR, KC_RCBR, KC_TILD
#define _________________RAISE_R1__________________ _______, KC_UNDS, ALGR(KC_5),_______,KC_BSLS
#define _________________RAISE_R2__________________ KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC
#define _________________RAISE_R3__________________ KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH
#define _________________ADJUST_L1_________________ ___________________BLANK___________________
#define _________________ADJUST_L2_________________ _______, RGB_SAI, RGB_HUI, RGB_VAI, _______
#define _________________ADJUST_L3_________________ _______, RGB_SAD, RGB_HUD, RGB_VAD, _______
#define _________________RAISE_L1__________________ ________________NUMBER_LEFT________________
#define _________________RAISE_L2__________________ ___________________BLANK___________________
#define _________________RAISE_L3__________________ ___________________BLANK___________________
#define _________________ADJUST_R1_________________ RGB_TOG, KC_F7, KC_F8, KC_F9, KC_F10
#define _________________ADJUST_R2_________________ _______, KC_F4, KC_F5, KC_F6, KC_F11
#define _________________ADJUST_R3_________________ _______, KC_F1, KC_F2, KC_F3, KC_F12
#define _________________RAISE_R1__________________ ________________NUMBER_RIGHT_______________
#define _________________RAISE_R2__________________ _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC
#define _________________RAISE_R3__________________ _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
#define ___________________NAV_L1__________________ DF(_QWERTY), DF(_WORKMAN), TG(_WARCRAFT), TG(_DIABLO), _______
#define ___________________NAV_L2__________________ _______, _______, KC_UP , _______, _______
#define ___________________NAV_L3__________________ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______
#define ___________________NAV_R1__________________ KC_PGUP, KC_HOME, KC_UP, KC_END, _______
#define ___________________NAV_R2__________________ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______
#define ___________________NAV_R3__________________ _______, _______, _______, _______, _______
#define _________________ADJUST_L1_________________ RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG
#define _________________ADJUST_L2_________________ MU_TOG , CK_TOGG, AU_ON, AU_OFF, CG_NORM
#define _________________ADJUST_L3_________________ RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T
#define _________________ADJUST_R1_________________ KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5
#define _________________ADJUST_R2_________________ CG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN
#define _________________ADJUST_R3_________________ MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT
// clang-format on

View File

@ -22,8 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "eeprom.h"
#include "wrappers.h"
/* Define layer names */
enum userspace_layers {
_QWERTY = 0,
_NUMLOCK = 0,
@ -39,16 +37,3 @@ enum userspace_layers {
_NAV,
_ADJUST,
};
// clang-format off
typedef union {
uint32_t raw;
struct {
bool rgb_layer_change :1;
bool swapped_numbers :1;
bool rgb_matrix_idle_anim :1;
};
} userspace_config_t;
// clang-format on
extern userspace_config_t userspace_config;

66
users/frederik/rules.mk Normal file
View File

@ -0,0 +1,66 @@
ifeq ($(strip $(DROP_ALT)), yes)
SRC += drashna.c \
process_records.c
ifneq ($(PLATFORM),CHIBIOS)
LTO_ENABLE = yes
endif
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
ifneq ($(strip $(NO_SECRETS)), yes)
ifneq ("$(wildcard $(USER_PATH)/secrets.c)","")
SRC += secrets.c
endif
ifeq ($(strip $(NO_SECRETS)), lite)
OPT_DEFS += -DNO_SECRETS
endif
endif
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
SRC += tap_dances.c
endif
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
SRC += rgb_stuff.c
ifeq ($(strip $(INDICATOR_LIGHTS)), yes)
OPT_DEFS += -DINDICATOR_LIGHTS
endif
ifeq ($(strip $(RGBLIGHT_TWINKLE)), yes)
OPT_DEFS += -DRGBLIGHT_TWINKLE
endif
ifeq ($(strip $(RGBLIGHT_NOEEPROM)), yes)
OPT_DEFS += -DRGBLIGHT_NOEEPROM
endif
ifeq ($(strip $(RGBLIGHT_STARTUP_ANIMATION)), yes)
OPT_DEFS += -DRGBLIGHT_STARTUP_ANIMATION
endif
endif
RGB_MATRIX_ENABLE ?= no
ifneq ($(strip $(RGB_MATRIX_ENABLE)), no)
SRC += rgb_matrix_stuff.c
endif
ifdef CONSOLE_ENABLE
ifeq ($(strip $(KEYLOGGER_ENABLE)), yes)
OPT_DEFS += -DKEYLOGGER_ENABLE
endif
endif
ifeq ($(strip $(MAKE_BOOTLOADER)), yes)
OPT_DEFS += -DMAKE_BOOTLOADER
endif
# At least until build.mk or the like drops, this is here to prevent
# VUSB boards from enabling NKRO, as they do not support it. Ideally
# this should be handled per keyboard, but until that happens ...
ifeq ($(strip $(PROTOCOL)), VUSB)
NKRO_ENABLE = no
endif
ifeq ($(strip $(OLED_DRIVER_ENABLE)), yes)
SRC += oled_stuff.c
endif
endif