summaryrefslogtreecommitdiff
path: root/users/drashna/keyrecords/process_records.c
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2022-05-30 22:02:55 -0700
committerGitHub <noreply@github.com>2022-05-30 22:02:55 -0700
commitcda343acbe45826225edac75eaa63216bf76d874 (patch)
tree398a14c907baa8e6521fc9d001a4619289e1d7a3 /users/drashna/keyrecords/process_records.c
parentb554e4b612d24109ce714554a306043a01382cbd (diff)
[Keymap] Drashna update for post Q2 merge (#17241)
Diffstat (limited to 'users/drashna/keyrecords/process_records.c')
-rw-r--r--users/drashna/keyrecords/process_records.c72
1 files changed, 19 insertions, 53 deletions
diff --git a/users/drashna/keyrecords/process_records.c b/users/drashna/keyrecords/process_records.c
index 99267d88a8..240156e816 100644
--- a/users/drashna/keyrecords/process_records.c
+++ b/users/drashna/keyrecords/process_records.c
@@ -3,9 +3,6 @@
#include "drashna.h"
#include "version.h"
-#ifdef CAPS_WORD_ENABLE
-# include "caps_word.h"
-#endif
#ifdef AUTOCORRECTION_ENABLE
# include "autocorrection/autocorrection.h"
#endif
@@ -37,6 +34,15 @@ __attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t
* @return false Stop process keycode and do not send to host
*/
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+#ifdef ENCODER_ENABLE // some debouncing for weird issues
+ if (IS_ENCODEREVENT(record->event)) {
+ static bool ignore_first = true;
+ if (ignore_first) {
+ ignore_first = false;
+ return false;
+ }
+ }
+#endif
// If console is enabled, it will print the matrix position and status of each key pressed
#ifdef KEYLOGGER_ENABLE
uprintf("KL: kc: 0x%04X, col: %2u, row: %2u, pressed: %b, time: %5u, int: %b, count: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed, record->event.time, record->tap.interrupted, record->tap.count);
@@ -58,9 +64,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#if defined(CUSTOM_POINTING_DEVICE)
&& process_record_pointing(keycode, record)
#endif
-#ifdef CAPS_WORD_ENABLE
- && process_caps_word(keycode, record)
-#endif
#ifdef AUTOCORRECTION_ENABLE
&& process_autocorrection(keycode, record)
#endif
@@ -87,33 +90,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
- case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader
- if (!record->event.pressed) {
-#ifndef MAKE_BOOTLOADER
- uint8_t temp_mod = mod_config(get_mods());
- uint8_t temp_osm = mod_config(get_oneshot_mods());
- clear_mods();
- clear_oneshot_mods();
-#endif
- send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY);
-#ifndef MAKE_BOOTLOADER
- if ((temp_mod | temp_osm) & MOD_MASK_SHIFT)
-#endif
- {
- send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY);
-#ifndef MAKE_BOOTLOADER
- } else {
- send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY);
-#endif
- }
- send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY);
-#ifdef CONVERT_TO_PROTON_C
- send_string_with_delay_P(PSTR(" -e CTPC=yes"), TAP_CODE_DELAY);
-#endif
- 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);
@@ -148,13 +124,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
dprintf("rgblight layer change [EEPROM]: %u\n", userspace_config.rgb_layer_change);
eeconfig_update_user(userspace_config.raw);
if (userspace_config.rgb_layer_change) {
-# if defined(CUSTOM_RGBLIGHT) && defined(CUSTOM_RGB_MATRIX)
+# if defined(CUSTOM_RGB_MATRIX)
+ rgb_matrix_set_flags(LED_FLAG_UNDERGLOW | LED_FLAG_KEYLIGHT | LED_FLAG_INDICATOR);
+# if defined(CUSTOM_RGBLIGHT)
rgblight_enable_noeeprom();
+# endif
# endif
- layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
-# if defined(CUSTOM_RGBLIGHT) && defined(CUSTOM_RGB_MATRIX)
+ layer_state_set(layer_state); // This is needed to immediately set the layer color (looks better)
+# if defined(CUSTOM_RGB_MATRIX)
} else {
+ rgb_matrix_set_flags(LED_FLAG_ALL);
+# if defined(CUSTOM_RGBLIGHT)
rgblight_disable_noeeprom();
+# endif
# endif
}
}
@@ -218,23 +200,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
break;
}
- case EEP_RST:
- if (record->event.pressed) {
- eeconfig_disable();
- shutdown_user();
-#ifdef __AVR__
- wdt_enable(WDTO_250MS);
-#else
- NVIC_SystemReset();
-#endif
- }
- return false;
- case REBOOT:
- if (record->event.pressed) {
- software_reset();
- }
- return false;
- }
+ }
return true;
}