From 0d8942571b8098e96500b8d006df0233d1e06ea0 Mon Sep 17 00:00:00 2001 From: Christoph Cullmann Date: Thu, 19 Dec 2024 20:56:05 +0100 Subject: [PATCH] https://github.com/qmk/qmk_firmware/pull/24560#discussion_r1893059336 --- common/keymap.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/common/keymap.h b/common/keymap.h index ef712af..6dcf7da 100644 --- a/common/keymap.h +++ b/common/keymap.h @@ -96,6 +96,17 @@ char chordal_hold_handedness(keypos_t key) return (key.row < MATRIX_ROWS / 2) ? 'L' : 'R'; } +bool get_chordal_hold(uint16_t tap_hold_keycode, keyrecord_t* tap_hold_record, + uint16_t other_keycode, keyrecord_t* other_record) { + // Allow hold between any pair of mod-tap keys. + if (IS_QK_MOD_TAP(tap_hold_keycode) && IS_QK_MOD_TAP(other_keycode)) { + return true; + } + + // Otherwise defer to the opposite hands rule. + return get_chordal_hold_default(tap_hold_record, other_record); +} + #ifndef CC_NO_LED void keyboard_post_init_user(void) {