PDF(layer), Caps Word, and Layer Lock for vial-qmk. (#902)

* Caps Word and Layer Lock for vial-qmk.

* Enable Caps Word and Layer Lock. Set CAPS_WORD_INVERT_ON_SHIFT.
* Use the last bits of dynamic_vial_get_number_of_entries to indicate
  optionally supported features.
* Vial protocol version was already bumped to 6, matching the bump on
  made on the GUI side corresponding to this change.

* Add new keycodes to vial_ensure_keycode.h.
This commit is contained in:
Pascal Getreuer 2025-06-28 14:52:16 -07:00 committed by GitHub
parent e6dee240f9
commit 15a3bb1ab9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 18 additions and 1 deletions

View file

@ -6,8 +6,10 @@ TAP_DANCE_ENABLE ?= yes
ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAPPING_TERM_PER_KEY
endif
CAPS_WORD_ENABLE ?= yes
COMBO_ENABLE ?= yes
KEY_OVERRIDE_ENABLE ?= yes
LAYER_LOCK_ENABLE ?= yes
SRC += $(QUANTUM_DIR)/vial.c
OPT_DEFS += -DVIAL_ENABLE -DNO_DEBUG -DSERIAL_NUMBER=\"vial:f64c2b3c\"
@ -26,7 +28,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 -DCHORDAL_HOLD -DFLOW_TAP_TERM=321
-DCOMBO_TERM_PER_COMBO -DCHORDAL_HOLD -DFLOW_TAP_TERM=321 -DCAPS_WORD_INVERT_ON_SHIFT
endif
# Generate Vial layout definition header from JSON

View file

@ -224,6 +224,16 @@ void vial_handle_cmd(uint8_t *msg, uint8_t length) {
msg[0] = VIAL_TAP_DANCE_ENTRIES;
msg[1] = VIAL_COMBO_ENTRIES;
msg[2] = VIAL_KEY_OVERRIDE_ENTRIES;
// The last byte of msg indicates optionally supported features.
msg[length - 1] = (0
#ifdef CAPS_WORD_ENABLE
| (1 << 0) // Bit 0: Caps Word.
#endif
#ifdef LAYER_LOCK_ENABLE
| (1 << 1) // Bit 1: Layer Lock.
#endif
);
break;
}
#ifdef VIAL_TAP_DANCE_ENABLE

View file

@ -352,6 +352,7 @@ _Static_assert(MO(1) == 0x5221, "");
_Static_assert(DF(1) == 0x5241, "");
_Static_assert(TG(1) == 0x5261, "");
_Static_assert(OSL(1) == 0x5281, "");
_Static_assert(PDF(1) == 0x52E1, "");
_Static_assert(LM(1, KC_A) == 0x5024, "");
_Static_assert(OSM(MOD_RSFT) == 0x52B2, "");
_Static_assert(TT(1) == 0x52C1, "");
@ -810,9 +811,13 @@ _Static_assert(MI_BENDU == 0x718F, "");
_Static_assert(RESET == 0x7C00, "");
_Static_assert(QK_CAPS_WORD_TOGGLE == 0x7C73, "");
_Static_assert(FN_MO13 == 0x7C77, "");
_Static_assert(FN_MO23 == 0x7C78, "");
_Static_assert(QK_LAYER_LOCK == 0x7C7B, "");
/* Ensure that we have 64 USERxx keycodes */
_Static_assert(QK_KB == 0x7E00, "");
_Static_assert(QK_KB_MAX == 0x7E3F, "");