Added short-circuit leader key

This commit is contained in:
2023-12-19 08:34:06 -08:00
parent ae7c2b9534
commit e3e82a1109
7 changed files with 217 additions and 43 deletions

View File

@ -73,6 +73,10 @@ enum tap_dance_codes {
#include "features/autocorrect/autocorrect.h"
#endif
#ifdef ENABLE_BETA_LEADER
#include "features/leader/beta_leader.h"
#endif
#include "features/beta_rawhid.h"
// Send a special character.
@ -86,6 +90,14 @@ bool send_special_character(uint16_t keycode) {
}
void matrix_scan_user(void) {
#ifdef ENABLE_BETA_LEADER
beta_qk_leader_check();
#endif
}
// Include all other parts of configuration
#include "layers/layers.c"
#include "parts/leader.c"
@ -96,6 +108,10 @@ bool send_special_character(uint16_t keycode) {
// Return TRUE to allow QMK to handle keypress.
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
#ifdef ENABLE_BETA_LEADER
if (!beta_process_leader(keycode, record)) { return false; }
#endif
#ifdef ENABLE_HID_SPELLCHECK
if (!process_spellcheck(keycode, record)) { return false; }
#endif
@ -116,7 +132,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
SEND_STRING(SS_LCTL(SS_LGUI(SS_LSFT(SS_TAP(X_R)))));
}
return false;
// Workaround for one-shot LGUI key.
// Using just LGUI with LAYER_DESKTOP as OSL
// does not allow you to hold lgui. This does.