Commit Graph

227 Commits

Author SHA1 Message Date
QMK Bot
2343e525b3 Merge remote-tracking branch 'origin/develop' into xap 2025-01-27 11:33:00 +00:00
Pascal Getreuer
544ddde113
[Core] Add Chordal Hold, an "opposite hands rule" tap-hold option similar to Achordion, Bilateral Combinations. (#24560)
* Chordal Hold: restrict what chords settle as hold

* Chordal Hold: docs and further improvements

* Fix formatting.

* Doc rewording and minor edit.

* Support Chordal Hold of multiple tap-hold keys.

* Fix formatting.

* Simplification and additional test.

* Fix formatting.

* Tighten tests.

* Add test two_mod_taps_same_hand_hold_til_timeout.

* Revise handing of pairs of tap-hold keys.

* Generate a default chordal_hold_layout.

* Document chordal_hold_handedness().

* Add license notice to new and branched files in PR.

* Add `tapping.chordal_hold` property for info.json.

* Update docs/reference_info_json.md

* Revise "hand" jsonschema.

* Chordal Hold: Improved layout handedness heuristic.

This commit improves the heuristic used in generate-keyboard-c for
inferring key handedness from keyboard.json geometry data.

Heuristic summary:

1. If the layout is symmetric (e.g. most split keyboards), guess the
   handedness based on the sign of (x - layout_x_midpoint).

2. Otherwise, if the layout has a key of >=6u width, it is probably the
   spacebar. Form a dividing line through the spacebar, nearly vertical
   but with a slight angle to follow typical row stagger.

3. Otherwise, assume handedness based on the widest horizontal
   separation.

I have tested this strategy on a couple dozen keyboards and found it to
work reliably.

* Use Optional instead of `| None`.

* Refactor to avoid lambdas.

* Remove trailing comma in chordal_hold_layout.

* Minor docs edits.

* Revise to allow combining multiple same-hand mods.

This commit revises Chordal Hold as described in discussion in
https://github.com/qmk/qmk_firmware/pull/24560#discussion_r1894655238

1. In "RCTL_T(KC_A)↓, RSFT_T(KC_C)↓, RCTL_T(KC_A)↑" before the tapping
   term, RCTL_T(KC_A) is settled as tapped.
2. In "RCTL_T(KC_A)↓, RSFT_T(KC_C)↓, RSFT_T(KC_C)↑", both RCTL_T(KC_A)
   and RSFT_T(KC_C) are settled as tapped.
3. In "RCTL_T(KC_A)↓, RSFT_T(KC_C)↓, KC_U↓" (all keys on the same side),
   both RCTL_T(KC_A) and RSFT_T(KC_C) are settled as tapped.
4. In "RCTL_T(KC_A)↓, RSFT_T(KC_C)↓, LSFT_T(KC_T)↓", with the third key
   on the other side, we allow Permissive Hold or Hold On Other Keypress
   to decide how/when to settle the keys.
5. In "RCTL_T(KC_A)↓, RSFT_T(KC_C)↓" held until the tapping term, the
   keys are settled as held.

1–3 provide same-hand roll protection. 4–5 are for combining multiple
same-hand modifiers.

I've updated the unit tests and have been running it on my keyboard, for
a few hours so far, and all seems good. I really like this scheme. It
allows combining same-side mods, yet it also has roll protection on
streaks. For me, this feels like Achordion, but clearly better streak
handling and improved responsiveness.

* Fix formatting.

* Add a couple tests with LT keys.

* Remove stale use of CHORDAL_HOLD_LAYOUT.

* Fix misspelling lastest -> latest

* Handling tweak for LTs and tests.

* Fix formatting.

* More tests with LT keys.

* Fix formatting.
2025-01-27 12:32:23 +01:00
QMK Bot
b010d1522b Merge remote-tracking branch 'origin/develop' into xap 2024-12-15 19:06:36 +00:00
Ryan
0f3993b9a3
default_keyboard.h generation tweaks (#24715) 2024-12-15 19:06:05 +00:00
QMK Bot
a465d3dee4 Merge remote-tracking branch 'origin/develop' into xap 2024-07-03 07:18:57 +00:00
Ryan
bc0c69570b
Rename encoder pins defines (#24003) 2024-07-03 17:18:27 +10:00
zvecr
33b84e7f24 Merge remote-tracking branch 'origin/develop' into xap 2024-06-18 03:56:01 +01:00
Joel Challis
53a0cdc446
Implement data driven joysticks (#22947) 2024-06-18 03:44:22 +01:00
Joel Challis
938badc3b0
Generate keymap dd keycodes to header (#20273) 2024-06-17 21:51:53 +01:00
QMK Bot
6fbf78dca1 Merge remote-tracking branch 'origin/develop' into xap 2024-06-15 09:38:45 +00:00
Nick Brassel
0262161914
[CLI] Don't exit() when certain exceptions occur. (#23442) 2024-06-15 10:37:47 +01:00
Nick Brassel
22f78171a2
Merge remote-tracking branch 'upstream/develop' into xap 2024-06-04 20:27:25 +10:00
Nick Brassel
6ef9717288
Vitepress conversion of docs. (#23795) 2024-05-30 12:00:41 +10:00
Nick Brassel
6aacdb0b76
Merge remote-tracking branch 'upstream/develop' into xap 2024-05-02 20:48:16 +10:00
Nick Brassel
ac80cee9da
Merge remote-tracking branch 'upstream/master' into develop 2024-05-02 20:32:16 +10:00
Nick Brassel
9a4f39b738
clangd enhancements. (#23310) 2024-05-02 20:08:41 +10:00
QMK Bot
16271f8f1d Merge remote-tracking branch 'origin/develop' into xap 2024-03-10 05:20:58 +00:00
Joel Challis
9f4a9d5826
Enable 'keyboard.json' as a build target (#22891) 2024-03-10 16:20:25 +11:00
QMK Bot
7121d544e7 Merge remote-tracking branch 'origin/develop' into xap 2024-02-22 12:48:13 +00:00
Nick Brassel
56802f506c
Ensure qmk generate-compilation-database copies to userspace as well. (#23129) 2024-02-22 12:47:42 +00:00
QMK Bot
f2d2f07e7e Merge remote-tracking branch 'origin/develop' into xap 2024-01-22 11:36:54 +00:00
QMK Bot
2655ce58f9 Merge remote-tracking branch 'origin/master' into develop 2024-01-22 11:36:23 +00:00
Joel Challis
58721a433b
Move layout macro OOB checks to lint (#22610) 2024-01-22 11:35:51 +00:00
QMK Bot
528007cc58 Merge remote-tracking branch 'origin/develop' into xap 2024-01-14 10:34:28 +00:00
Ryan
1bebaa310a
CLI: Allow generation of both LED and RGB Matrix config (#22896) 2024-01-14 10:33:58 +00:00
QMK Bot
f328bb4618 Merge remote-tracking branch 'origin/develop' into xap 2024-01-06 13:16:52 +00:00
Joel Challis
71257e21e6
Generate true/false for _DEFAULT_ON options (#22829) 2024-01-06 13:16:23 +00:00
QMK Bot
7a4b14da11 Merge remote-tracking branch 'origin/develop' into xap 2023-12-06 07:00:39 +00:00
Sergey Vlasov
958215e9d6
Fix more qmk generate-api fallout from userspace support (#22619) 2023-12-06 17:59:42 +11:00
QMK Bot
5f63daf2b9 Merge remote-tracking branch 'origin/develop' into xap 2023-12-06 04:56:33 +00:00
Ryan
f1043e3a92
Fix JSON keymap URLs generated by the API (#22618) 2023-12-06 15:55:35 +11:00
QMK Bot
cde94f827c Merge remote-tracking branch 'origin/develop' into xap 2023-12-05 13:33:16 +00:00
Joel Challis
bba5c14933
Avoid exceptions when layouts contain OOB matrix values (#22609) 2023-12-05 13:32:07 +00:00
Nick Brassel
8fa6fd6d64
Merge remote-tracking branch 'upstream/develop' into xap 2023-11-22 13:27:44 +11:00
Nick Brassel
46b996a55e
CLI parallel search updates (#22525) 2023-11-22 11:14:34 +11:00
QMK Bot
b1d9184cab Merge remote-tracking branch 'origin/develop' into xap 2023-11-15 05:25:30 +00:00
Nick Brassel
4938210711
CLI refactoring for common build target APIs (#22221) 2023-11-15 16:24:54 +11:00
QMK Bot
47da199a6e Merge remote-tracking branch 'origin/develop' into xap 2023-11-01 02:12:15 +00:00
Joel Challis
b31426252e
Generate switch statement helpers for keycode ranges (#20059) 2023-11-01 13:11:42 +11:00
QMK Bot
3040d6cf49 Merge remote-tracking branch 'origin/develop' into xap 2023-11-01 01:27:04 +00:00
Joel Challis
fbbb221a31
Implement data driven lighting defaults (#21825) 2023-11-01 01:26:24 +00:00
zvecr
60cf8ba553 Merge remote-tracking branch 'origin/develop' into xap 2023-11-01 01:19:30 +00:00
Joel Challis
a19ae3d784
Add dd mapping for hardware based split handedness (#22369) 2023-11-01 00:55:48 +00:00
Joel Challis
17c3182b1c
Remove use of broken split.main (#22363) 2023-10-30 00:49:56 +00:00
Joel Challis
559450a099
Fix 'to_c' for config.h mappings (#22364) 2023-10-29 23:41:44 +00:00
Joel Challis
98530cad3b
Implement data driven dip switches (#22017)
* Add data driven dip switches

* Autogen weak matrix_mask
2023-10-29 01:09:02 +01:00
QMK Bot
5bfbb007ef Merge remote-tracking branch 'origin/develop' into xap 2023-09-28 10:50:14 +00:00
QMK Bot
f4677c866e Merge remote-tracking branch 'origin/master' into develop 2023-09-28 10:49:40 +00:00
Nick Brassel
fb0c64a567
Allow inline generation of compile_commands.json while doing a qmk compile, using --compiledb (#21549) 2023-09-28 11:48:58 +01:00
QMK Bot
b7c219b03c Merge remote-tracking branch 'origin/develop' into xap 2023-09-13 00:13:20 +00:00