mirror of
https://github.com/nalf3in/vial-qmk.git
synced 2025-12-22 03:30:03 +00:00
qmk_settings: add chordal hold
This commit is contained in:
@@ -26,7 +26,7 @@ ifeq ($(strip $(QMK_SETTINGS)), yes)
|
||||
OPT_DEFS += -DQMK_SETTINGS \
|
||||
-DAUTO_SHIFT_NO_SETUP -DAUTO_SHIFT_REPEAT_PER_KEY -DAUTO_SHIFT_NO_AUTO_REPEAT_PER_KEY \
|
||||
-DPERMISSIVE_HOLD_PER_KEY -DHOLD_ON_OTHER_KEY_PRESS_PER_KEY -DQUICK_TAP_TERM_PER_KEY -DRETRO_TAPPING_PER_KEY \
|
||||
-DCOMBO_TERM_PER_COMBO
|
||||
-DCOMBO_TERM_PER_COMBO -DCHORDAL_HOLD
|
||||
endif
|
||||
|
||||
# Generate Vial layout definition header from JSON
|
||||
|
||||
@@ -70,6 +70,7 @@ static const qmk_settings_proto_t protos[] PROGMEM = {
|
||||
DECLARE_STATIC_BITSETTING(23, tapping_v2, QS_tapping_hold_on_other_key_press_bit),
|
||||
DECLARE_STATIC_BITSETTING(24, tapping_v2, QS_tapping_retro_tapping_bit),
|
||||
DECLARE_STATIC_SETTING(25, quick_tap_term),
|
||||
DECLARE_STATIC_BITSETTING(26, tapping_v2, QS_tapping_chordal_hold_bit),
|
||||
};
|
||||
|
||||
static void eeprom_settings_load(void) {
|
||||
@@ -328,3 +329,10 @@ bool get_auto_shift_repeat(uint16_t keycode, keyrecord_t *record) {
|
||||
bool get_auto_shift_no_auto_repeat(uint16_t keycode, keyrecord_t *record) {
|
||||
return QS_auto_shift_no_auto_repeat;
|
||||
}
|
||||
|
||||
bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record,
|
||||
uint16_t other_keycode, keyrecord_t* other_record) {
|
||||
if (QS_tapping_chordal_hold)
|
||||
return get_chordal_hold_default(tap_hold_record, other_record);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -161,6 +161,8 @@ extern qmk_settings_t QS;
|
||||
#define QS_tapping_hold_on_other_key_press (QS.tapping_v2 & (1 << QS_tapping_hold_on_other_key_press_bit))
|
||||
#define QS_tapping_retro_tapping_bit 2
|
||||
#define QS_tapping_retro_tapping (QS.tapping_v2 & (1 << QS_tapping_retro_tapping_bit))
|
||||
#define QS_tapping_chordal_hold_bit 3
|
||||
#define QS_tapping_chordal_hold (QS.tapping_v2 & (1 << QS_tapping_chordal_hold_bit))
|
||||
|
||||
/* Grave escape */
|
||||
#define QS_grave_esc_alt_override (QS.grave_esc_override & 1)
|
||||
|
||||
Reference in New Issue
Block a user