summaryrefslogtreecommitdiffstats
path: root/users/drashna
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-05-06 22:34:09 -0700
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-05-06 22:34:09 -0700
commitf3d5b1091d364468cd9f5510aef9e723d8542279 (patch)
tree762b8f562b1e96e42657f872fd4b04c8efaaa829 /users/drashna
parent7a751f114114bf3b78d5d8fc8bedf2b42b665dba (diff)
[Keymap] RGB Changes for Drashna Keyboards (#5803)
* Disable a bunch of reactive modes * Enable rgb matrix for Corne Keyboard * Convert CRKBD to rgb matrix * Add Gergo keyboard layout * Make Diablo 3 tap dance better * Add basic support for Planck EZ * Fix RGB Matrix stuff * Fix keycodes for Planck EZ * Update CRKBD OLED stuff * Fix typo for sleep on ergodox glow * Improve my gergo layout * Scrolling OLED key logger! * Change gergo layout * Hnadle unicode keycodes if unicode is disabled * Disable COMMAND/CONSOLE for gergo * Fix right side control * Re-enable LTO for all platforms Since I got updated arm gcc binaries that no longer error out on lto * Update formatting to match newer community standards Poor 2 space * Re-alight startup animation to use new HUE range * Streamline gitlab ci scripts * Disabled Space Cadet * Add support for breathing table * Enable new LTO Option And clean up defines that will now be repeatitive * Remove vscode settings * Additional formatting cleanup of config.h files
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/.gitlab-ci.yml35
-rw-r--r--users/drashna/config.h72
-rw-r--r--users/drashna/drashna.c198
-rw-r--r--users/drashna/drashna.h76
-rw-r--r--users/drashna/process_records.c232
-rw-r--r--users/drashna/process_records.h76
-rw-r--r--users/drashna/rgb_stuff.c441
-rw-r--r--users/drashna/rgblight_breathe_table.h116
-rw-r--r--users/drashna/rules.mk46
-rw-r--r--users/drashna/send_unicode.h104
-rw-r--r--users/drashna/tap_dances.c77
-rw-r--r--users/drashna/tap_dances.h15
-rw-r--r--users/drashna/wrappers.h3
13 files changed, 770 insertions, 721 deletions
diff --git a/users/drashna/.gitlab-ci.yml b/users/drashna/.gitlab-ci.yml
index 92813a27d3..679bdf4351 100644
--- a/users/drashna/.gitlab-ci.yml
+++ b/users/drashna/.gitlab-ci.yml
@@ -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:
diff --git a/users/drashna/config.h b/users/drashna/config.h
index 1680eb4cb1..a6d8e75263 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -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 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 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)
#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
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index ec249dd224..7c60a2e4a5 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -19,78 +19,78 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
userspace_config_t userspace_config;
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- #define DRASHNA_UNICODE_MODE UC_WIN
+ #define DRASHNA_UNICODE_MODE UC_WIN
#else
// set to 2 for UC_WIN, set to 4 for UC_WINC
- #define DRASHNA_UNICODE_MODE 2
+ #define DRASHNA_UNICODE_MODE 2
#endif
// This block is for all of the gaming macros, as they were all doing
// the same thing, but with differring text sent.
bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
- if (!record->event.pressed || override) {
- uint16_t keycode;
- if (userspace_config.is_overwatch) {
- keycode = KC_BSPC;
- } else {
- keycode = KC_ENTER;
+ if (!record->event.pressed || override) {
+ uint16_t keycode;
+ if (userspace_config.is_overwatch) {
+ keycode = KC_BSPC;
+ } else {
+ keycode = KC_ENTER;
+ }
+ clear_keyboard();
+ tap_code(keycode);
+ wait_ms(TAP_CODE_DELAY);
+ send_string_with_delay(str, TAP_CODE_DELAY);
+ wait_ms(TAP_CODE_DELAY);
+ tap_code(KC_ENTER);
}
- clear_keyboard();
- tap_code(keycode);
- wait_ms(TAP_CODE_DELAY);
- send_string_with_delay(str, TAP_CODE_DELAY);
- wait_ms(TAP_CODE_DELAY);
- tap_code(KC_ENTER);
- }
- if (override) wait_ms(3000);
- return false;
+ if (override) wait_ms(3000);
+ return false;
}
bool mod_key_press_timer (uint16_t code, uint16_t mod_code, bool pressed) {
- static uint16_t this_timer;
- if(pressed) {
- this_timer= timer_read();
- } else {
- if (timer_elapsed(this_timer) < TAPPING_TERM){
- tap_code(code);
- } else {
- register_code(mod_code);
- tap_code(code);
- unregister_code(mod_code);
- }
- }
- return false;
+ static uint16_t this_timer;
+ if(pressed) {
+ this_timer= timer_read();
+ } else {
+ if (timer_elapsed(this_timer) < TAPPING_TERM){
+ tap_code(code);
+ } else {
+ register_code(mod_code);
+ tap_code(code);
+ unregister_code(mod_code);
+ }
+ }
+ return false;
}
bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t this_timer) {
- if(pressed) {
- this_timer= timer_read();
- } else {
- if (timer_elapsed(this_timer) < TAPPING_TERM){
- tap_code(code);
- } else {
- register_code(mod_code);
- tap_code(code);
- unregister_code(mod_code);
- }
- }
- return false;
+ if(pressed) {
+ this_timer= timer_read();
+ } else {
+ if (timer_elapsed(this_timer) < TAPPING_TERM){
+ tap_code(code);
+ } else {
+ register_code(mod_code);
+ tap_code(code);
+ unregister_code(mod_code);
+ }
+ }
+ 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();
- }
+ 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();
+ }
}
// Add reconfigurable functions here, for keymap customization
@@ -103,21 +103,21 @@ void matrix_init_keymap(void) {}
// Call user matrix init, set default RGB colors and then
// call the keymap's init function
void matrix_init_user(void) {
- userspace_config.raw = eeconfig_read_user();
+ userspace_config.raw = eeconfig_read_user();
- #ifdef BOOTLOADER_CATERINA
- DDRD &= ~(1<<5);
- PORTD &= ~(1<<5);
+ #ifdef BOOTLOADER_CATERINA
+ DDRD &= ~(1<<5);
+ PORTD &= ~(1<<5);
- DDRB &= ~(1<<0);
- PORTB &= ~(1<<0);
- #endif
+ DDRB &= ~(1<<0);
+ PORTB &= ~(1<<0);
+ #endif
- #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
- set_unicode_input_mode(DRASHNA_UNICODE_MODE);
- get_unicode_input_mode();
- #endif //UNICODE_ENABLE
- matrix_init_keymap();
+ #if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
+ set_unicode_input_mode(DRASHNA_UNICODE_MODE);
+ get_unicode_input_mode();
+ #endif //UNICODE_ENABLE
+ matrix_init_keymap();
}
__attribute__((weak))
@@ -125,26 +125,26 @@ void keyboard_post_init_keymap(void){ }
void keyboard_post_init_user(void){
#ifdef RGBLIGHT_ENABLE
- keyboard_post_init_rgb();
+ keyboard_post_init_rgb();
#endif
- keyboard_post_init_keymap();
+ keyboard_post_init_keymap();
}
__attribute__ ((weak))
void shutdown_keymap(void) {}
void shutdown_user (void) {
- #ifdef RGBLIGHT_ENABLE
- rgblight_enable_noeeprom();
- rgblight_mode_noeeprom(1);
- rgblight_setrgb_red();
- #endif // RGBLIGHT_ENABLE
- #ifdef RGB_MATRIX_ENABLE
- // uint16_t timer_start = timer_read();
- // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
- // while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
- #endif //RGB_MATRIX_ENABLE
- shutdown_keymap();
+ #ifdef RGBLIGHT_ENABLE
+ rgblight_enable_noeeprom();
+ rgblight_mode_noeeprom(1);
+ rgblight_setrgb_red();
+ #endif // RGBLIGHT_ENABLE
+ #ifdef RGB_MATRIX_ENABLE
+ // uint16_t timer_start = timer_read();
+ // rgb_matrix_set_color_all( 0xFF, 0x00, 0x00 );
+ // while(timer_elapsed(timer_start) < 250) { wait_ms(1); }
+ #endif //RGB_MATRIX_ENABLE
+ shutdown_keymap();
}
__attribute__ ((weak))
@@ -158,7 +158,7 @@ __attribute__ ((weak))
void suspend_wakeup_init_keymap(void) {}
void suspend_wakeup_init_user(void) {
- suspend_wakeup_init_keymap();
+ suspend_wakeup_init_keymap();
}
@@ -168,54 +168,54 @@ void matrix_scan_keymap(void) {}
// No global matrix scan code, so just run keymap's matrix
// scan function
void matrix_scan_user(void) {
- static bool has_ran_yet;
- if (!has_ran_yet) {
- has_ran_yet = true;
- startup_user();
- }
+ static bool has_ran_yet;
+ if (!has_ran_yet) {
+ has_ran_yet = true;
+ startup_user();
+ }
#ifdef TAP_DANCE_ENABLE // Run Diablo 3 macro checking code.
- run_diablo_macro_check();
+ run_diablo_macro_check();
#endif // TAP_DANCE_ENABLE
#ifdef RGBLIGHT_ENABLE
- matrix_scan_rgb();
+ matrix_scan_rgb();
#endif // RGBLIGHT_ENABLE
- matrix_scan_keymap();
+ matrix_scan_keymap();
}
__attribute__ ((weak))
uint32_t layer_state_set_keymap (uint32_t state) {
- return state;
+ return state;
}
// on layer change, no matter where the change was initiated
// Then runs keymap's layer change check
uint32_t layer_state_set_user(uint32_t state) {
- state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
+ state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
#ifdef RGBLIGHT_ENABLE
- state = layer_state_set_rgb(state);
+ state = layer_state_set_rgb(state);
#endif // RGBLIGHT_ENABLE
- return layer_state_set_keymap (state);
+ return layer_state_set_keymap (state);
}
__attribute__ ((weak))
uint32_t default_layer_state_set_keymap (uint32_t state) {
- return state;
+ return state;
}
// Runs state check and changes underglow color and animation
uint32_t default_layer_state_set_user(uint32_t state) {
- state = default_layer_state_set_keymap(state);
+ state = default_layer_state_set_keymap(state);
#if 0
#ifdef RGBLIGHT_ENABLE
state = default_layer_state_set_rgb(state);
#endif // RGBLIGHT_ENABLE
#endif
- return state;
+ return state;
}
__attribute__ ((weak))
@@ -225,16 +225,16 @@ void led_set_keymap(uint8_t usb_led) {}
// So far, I only have keyboard specific code,
// So nothing goes here.
void led_set_user(uint8_t usb_led) {
- led_set_keymap(usb_led);
+ led_set_keymap(usb_led);
}
__attribute__ ((weak))
void eeconfig_init_keymap(void) {}
void eeconfig_init_user(void) {
- userspace_config.raw = 0;
- userspace_config.rgb_layer_change = true;
- eeconfig_update_user(userspace_config.raw);
+ userspace_config.raw = 0;
+ userspace_config.rgb_layer_change = true;
+ eeconfig_update_user(userspace_config.raw);
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(DRASHNA_UNICODE_MODE);
get_unicode_input_mode();
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index 6645626d98..5df67792a5 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -22,36 +22,36 @@ 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 */
enum userspace_layers {
- _QWERTY = 0,
- _NUMLOCK = 0,
- _COLEMAK,
- _DVORAK,
- _WORKMAN,
- _NORMAN,
- _MALTRON,
- _EUCALYN,
- _CARPLAX,
- _MODS, /* layer 8 */
- _GAMEPAD,
- _DIABLO,
- _MACROS,
- _MEDIA,
- _LOWER,
- _RAISE,
- _ADJUST,
+ _QWERTY = 0,
+ _NUMLOCK = 0,
+ _COLEMAK,
+ _DVORAK,
+ _WORKMAN,
+ _NORMAN,
+ _MALTRON,
+ _EUCALYN,
+ _CARPLAX,
+ _MODS, /* layer 8 */
+ _GAMEPAD,
+ _DIABLO,
+ _MACROS,
+ _MEDIA,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
};
/*
@@ -73,14 +73,14 @@ void led_set_keymap(uint8_t usb_led);
void eeconfig_init_keymap(void);
typedef union {
- uint32_t raw;
- struct {
- bool rgb_layer_change :1;
- bool is_overwatch :1;
- bool nuke_switch :1;
- uint8_t unicode_mod :4;
- bool swapped_numbers :1;
- };
+ uint32_t raw;
+ struct {
+ bool rgb_layer_change :1;
+ bool is_overwatch :1;
+ bool nuke_switch :1;
+ uint8_t unicode_mod :4;
+ bool swapped_numbers :1;
+ };
} userspace_config_t;
extern userspace_config_t userspace_config;
@@ -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
diff --git a/users/drashna/process_records.c b/users/drashna/process_records.c
index 2b6ccf510c..a5487b5855 100644
--- a/users/drashna/process_records.c
+++ b/users/drashna/process_records.c
@@ -4,12 +4,12 @@ uint16_t copy_paste_timer;
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
- return true;
+ return true;
}
__attribute__ ((weak))
bool process_record_secrets(uint16_t keycode, keyrecord_t *record) {
- return true;
+ return true;
}
// Defines actions tor my global custom keycodes. Defined in drashna.h file
@@ -18,140 +18,140 @@ 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)
- xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed);
- #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
+# 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
+ 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 //KEYLOGGER_ENABLE
- switch (keycode) {
- case KC_QWERTY ... KC_CARPLAX:
- if (record->event.pressed) {
- set_single_persistent_default_layer(keycode - KC_QWERTY);
- }
- break;
+ switch (keycode) {
+ case KC_QWERTY ... KC_CARPLAX:
+ if (record->event.pressed) {
+ set_single_persistent_default_layer(keycode - KC_QWERTY);
+ }
+ break;
- case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
- if (!record->event.pressed) {
- uint8_t temp_mod = get_mods();
- uint8_t temp_osm = get_oneshot_mods();
- clear_mods(); clear_oneshot_mods();
- send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
+ case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
+ if (!record->event.pressed) {
+ uint8_t temp_mod = get_mods();
+ uint8_t temp_osm = get_oneshot_mods();
+ clear_mods(); clear_oneshot_mods();
+ send_string_with_delay_P(PSTR("make " QMK_KEYBOARD ":" QMK_KEYMAP), TAP_CODE_DELAY);
#ifndef MAKE_BOOTLOADER
- if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT )
+ if ( ( temp_mod | temp_osm ) & MOD_MASK_SHIFT )
#endif
- {
- #if defined(__arm__)
- send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY);
- #elif defined(BOOTLOADER_DFU)
- send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY);
- #elif defined(BOOTLOADER_HALFKAY)
- send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY);
- #elif defined(BOOTLOADER_CATERINA)
- send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY);
- #endif // bootloader options
- }
- if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); }
- send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
- }
- break;
+ {
+ #if defined(__arm__)
+ send_string_with_delay_P(PSTR(":dfu-util"), TAP_CODE_DELAY);
+ #elif defined(BOOTLOADER_DFU)
+ send_string_with_delay_P(PSTR(":dfu"), TAP_CODE_DELAY);
+ #elif defined(BOOTLOADER_HALFKAY)
+ send_string_with_delay_P(PSTR(":teensy"), TAP_CODE_DELAY);
+ #elif defined(BOOTLOADER_CATERINA)
+ send_string_with_delay_P(PSTR(":avrdude"), TAP_CODE_DELAY);
+ #endif // bootloader options
+ }
+ if ( ( temp_mod | temp_osm ) & MOD_MASK_CTRL) { send_string_with_delay_P(PSTR(" -j8 --output-sync"), TAP_CODE_DELAY); }
+ send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY);
+ }
+ break;
- case VRSN: // Prints firmware version
- if (record->event.pressed) {
- send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
- }
- break;
+ case VRSN: // Prints firmware version
+ if (record->event.pressed) {
+ send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY);
+ }
+ 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); }
+ 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); }
#ifdef RGBLIGHT_ENABLE
- userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
+ userspace_config.is_overwatch ? rgblight_mode_noeeprom(17) : rgblight_mode_noeeprom(18);
#endif //RGBLIGHT_ENABLE
- break;
- case KC_SALT:
- return send_game_macro("Salt, salt, salt...", record, false);
- case KC_MORESALT:
- return send_game_macro("Please sir, can I have some more salt?!", record, false);
- case KC_SALTHARD:
- return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false);
- case KC_GOODGAME:
- return send_game_macro("Good game, everyone!", record, false);
- case KC_GLHF:
- return send_game_macro("Good luck, have fun!!!", record, false);
- case KC_SYMM:
- return send_game_macro("Left click to win!", record, false);
- case KC_JUSTGAME:
- return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false);
- case KC_TORB:
- return send_game_macro("That was positively riveting!", record, false);
- case KC_AIM:
- send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true);
- return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false);
- case KC_C9:
- return send_game_macro("OMG!!! C9!!!", record, false);
- case KC_GGEZ:
- return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false);
+ break;
+ case KC_SALT:
+ return send_game_macro("Salt, salt, salt...", record, false);
+ case KC_MORESALT:
+ return send_game_macro("Please sir, can I have some more salt?!", record, false);
+ case KC_SALTHARD:
+ return send_game_macro("Your salt only makes me harder, and even more aggressive!", record, false);
+ case KC_GOODGAME:
+ return send_game_macro("Good game, everyone!", record, false);
+ case KC_GLHF:
+ return send_game_macro("Good luck, have fun!!!", record, false);
+ case KC_SYMM:
+ return send_game_macro("Left click to win!", record, false);
+ case KC_JUSTGAME:
+ return send_game_macro("It may be a game, but if you don't want to actually try, please go play AI, so that people that actually want to take the game seriously and \"get good\" have a place to do so without trolls like you throwing games.", record, false);
+ case KC_TORB:
+ return send_game_macro("That was positively riveting!", record, false);
+ case KC_AIM:
+ send_game_macro("That aim is absolutely amazing. It's almost like you're a machine!", record, true);
+ return send_game_macro("Wait! That aim is TOO good! You're clearly using an aim hack! CHEATER!", record, false);
+ case KC_C9:
+ return send_game_macro("OMG!!! C9!!!", record, false);
+ case KC_GGEZ:
+ return send_game_macro("That was a fantastic game, though it was a bit easy. Try harder next time!", record, false);
#endif // MACROS_ENABLED
- case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
+ case KC_DIABLO_CLEAR: // reset all Diablo timers, disabling them
#ifdef TAP_DANCE_ENABLE
- if (record->event.pressed) {
- uint8_t dtime;
- for (dtime = 0; dtime < 4; dtime++) {
- diablo_key_time[dtime] = diablo_times[0];
- }
- }
+ if (record->event.pressed) {
+ uint8_t dtime;
+ for (dtime = 0; dtime < 4; dtime++) {
+ diablo_timer[dtime].key_time = diablo_times[0];
+ }
+ }
#endif // TAP_DANCE_ENABLE
- break;
+ break;
case KC_CCCV: // One key copy/paste
- if(record->event.pressed){
- copy_paste_timer = timer_read();
- } else {
- if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
- register_code(KC_LCTL);
- tap_code(KC_C);
- unregister_code(KC_LCTL);
- } else { // Tap, paste
- register_code(KC_LCTL);
- tap_code(KC_V);
- unregister_code(KC_LCTL);
- }
- }
- break;
+ if(record->event.pressed){
+ copy_paste_timer = timer_read();
+ } else {
+ if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
+ register_code(KC_LCTL);
+ tap_code(KC_C);
+ unregister_code(KC_LCTL);
+ } else { // Tap, paste
+ register_code(KC_LCTL);
+ tap_code(KC_V);
+ unregister_code(KC_LCTL);
+ }
+ }
+ break;
#ifdef UNICODE_ENABLE
- case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
- if (record->event.pressed) {
- send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
- }
- break;
- case UC_TABL: // ┬─┬ノ( º _ ºノ)
- if (record->event.pressed) {
- send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029");
- }
- break;
- case UC_SHRG: // ¯\_(ツ)_/¯
- if (record->event.pressed) {
- send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
- }
- break;
- case UC_DISA: // ಠ_ಠ
- if (record->event.pressed) {
- send_unicode_hex_string("0CA0 005F 0CA0");
- }
- break;
+ case UC_FLIP: // (ノಠ痊ಠ)ノ彡┻━┻
+ if (record->event.pressed) {
+ send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
+ }
+ break;
+ case UC_TABL: // ┬─┬ノ( º _ ºノ)
+ if (record->event.pressed) {
+ send_unicode_hex_string("252C 2500 252C 30CE 0028 0020 00BA 0020 005F 0020 00BA 30CE 0029");
+ }
+ break;
+ case UC_SHRG: // ¯\_(ツ)_/¯
+ if (record->event.pressed) {
+ send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF");
+ }
+ break;
+ case UC_DISA: // ಠ_ಠ
+ if (record->event.pressed) {
+ send_unicode_hex_string("0CA0 005F 0CA0");
+ }
+ break;
#endif
- }
- return process_record_keymap(keycode, record) &&
+ }
+ return process_record_keymap(keycode, record) &&
#if defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
- process_record_user_rgb(keycode, record) &&
+ process_record_user_rgb(keycode, record) &&
#endif // RGBLIGHT_ENABLE
- process_record_secrets(keycode, record);
+ process_record_secrets(keycode, record);
}
diff --git a/users/drashna/process_records.h b/users/drashna/process_records.h
index 5e3374d3f2..35adec84cc 100644
--- a/users/drashna/process_records.h
+++ b/users/drashna/process_records.h
@@ -2,48 +2,48 @@
#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 {
- 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_NORMAN, // Sets default layer to NORMAN
- KC_MALTRON, // Sets default layer to MALTRON
- KC_EUCALYN, // Sets default layer to EUCALYN
- KC_CARPLAX, // Sets default layer to CARPLAX
- KC_DIABLO_CLEAR, // Clears all Diablo Timers
- KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat)
- KC_SALT, // See drashna.c for details
- KC_MORESALT,
- KC_SALTHARD,
- KC_GOODGAME,
- KC_SYMM,
- KC_JUSTGAME,
- KC_GLHF,
- KC_TORB,
- KC_AIM,
- KC_C9,
- KC_GGEZ,
- KC_MAKE, // Run keyboard's customized make command
- KC_RGB_T, // Toggles RGB Layer Indication mode
- KC_SECRET_1, // test1
- KC_SECRET_2, // test2
- KC_SECRET_3, // test3
- KC_SECRET_4, // test4
- KC_SECRET_5, // test5
- KC_CCCV, // Hold to copy, tap to paste
- KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
- UC_FLIP, // (ಠ痊ಠ)┻━┻
- UC_TABL, // ┬─┬ノ( º _ ºノ)
- UC_SHRG, // ¯\_(ツ)_/¯
- UC_DISA, // ಠ_ಠ
- NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
+ 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_NORMAN, // Sets default layer to NORMAN
+ KC_MALTRON, // Sets default layer to MALTRON
+ KC_EUCALYN, // Sets default layer to EUCALYN
+ KC_CARPLAX, // Sets default layer to CARPLAX
+ KC_DIABLO_CLEAR, // Clears all Diablo Timers
+ KC_OVERWATCH, // Toggles game macro input mode (so in OW, it defaults to game chat)
+ KC_SALT, // See drashna.c for details<