1
0
Fork 0
Commit graph

151 commits

Author SHA1 Message Date
Ryan
273d8d6a1a
qmk docs: restore --port and --browser arguments (#24623)
* `qmk docs`: restore `--port` and `--browser` arguments

* Make docs command args always a list
2025-02-01 21:19:30 +11: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
Ryan
0f3993b9a3
default_keyboard.h generation tweaks (#24715) 2024-12-15 19:06:05 +00:00
Ryan
bc0c69570b
Rename encoder pins defines (#24003) 2024-07-03 17:18:27 +10: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
Nick Brassel
0262161914
[CLI] Don't exit() when certain exceptions occur. (#23442) 2024-06-15 10:37:47 +01:00
Nick Brassel
6ef9717288
Vitepress conversion of docs. (#23795) 2024-05-30 12:00:41 +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
Joel Challis
9f4a9d5826
Enable 'keyboard.json' as a build target (#22891) 2024-03-10 16:20:25 +11: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
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
Ryan
1bebaa310a
CLI: Allow generation of both LED and RGB Matrix config (#22896) 2024-01-14 10:33:58 +00:00
Joel Challis
71257e21e6
Generate true/false for _DEFAULT_ON options (#22829) 2024-01-06 13:16:23 +00:00
Sergey Vlasov
958215e9d6
Fix more qmk generate-api fallout from userspace support (#22619) 2023-12-06 17:59:42 +11:00
Ryan
f1043e3a92
Fix JSON keymap URLs generated by the API (#22618) 2023-12-06 15:55:35 +11:00
Joel Challis
bba5c14933
Avoid exceptions when layouts contain OOB matrix values (#22609) 2023-12-05 13:32:07 +00:00
Nick Brassel
46b996a55e
CLI parallel search updates (#22525) 2023-11-22 11:14:34 +11:00
Nick Brassel
4938210711
CLI refactoring for common build target APIs (#22221) 2023-11-15 16:24:54 +11:00
Joel Challis
b31426252e
Generate switch statement helpers for keycode ranges (#20059) 2023-11-01 13:11:42 +11:00
Joel Challis
fbbb221a31
Implement data driven lighting defaults (#21825) 2023-11-01 01:26:24 +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
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
Joel Challis
de381ad3b7
Generate keymap.json config options more forcefully (#21960) 2023-09-13 01:12:46 +01:00
Ryan
f407d90598
keycode aliases: work around ChibiOS ch.h include guard (#21497) 2023-07-31 09:35:06 +10:00
Ryan
030511ece3
CLI: Improve error messages when layout key matrix row/col is OOB (#21640) 2023-07-31 09:34:19 +10:00
QMK Bot
9d96bfc5f5 Merge remote-tracking branch 'origin/master' into develop 2023-05-20 21:29:58 +00:00
Nick Brassel
420e35f922
qmk generate-make-dependencies improvements (#21001)
* Recommendations from @sigprof

* Fix CI tests
2023-05-20 22:29:21 +01:00
Ryan
6d90fa2300
qmk format-json: Expose full key path and respect sort_keys (#20836) 2023-05-20 22:15:05 +10:00
Peter
7b31c18d46
Fix English word list retrieval in qmk generate-autocorrect-data (#20915) 2023-05-20 22:11:57 +10:00
Nick Brassel
433dc60686
Merge remote-tracking branch 'upstream/master' into develop 2023-05-15 22:10:42 +10:00
Nick Brassel
507e32b28c
Generate make dependency file during build for info.json's etc. (#20451) 2023-05-15 21:58:12 +10:00
QMK Bot
6c172772db Merge remote-tracking branch 'origin/master' into develop 2023-04-09 16:42:12 +00:00
Dasky
6e0acf0548
Add autocomplete to generate-compilation-database (#20387) 2023-04-09 17:41:30 +01:00
QMK Bot
4aa2cd45a1 Merge remote-tracking branch 'origin/master' into develop 2023-04-07 13:08:43 +00:00
Joel Challis
e9b36bebb2
Avoid generating empty ENCODER_RESOLUTION (#20179) 2023-04-07 14:07:59 +01:00
QMK Bot
66f19518b4 Merge remote-tracking branch 'origin/master' into develop 2023-03-29 12:01:55 +00:00
Joel Challis
f56580404d
Minify content published to API (#20285) 2023-03-29 13:01:16 +01:00
Joel Challis
79b0f9168e
Custom keycodes in JSON (#19925) 2023-03-27 20:01:07 +01:00
Joel Challis
c3c40dfda8
Remove some use of keymap.h (#19980) 2023-03-03 11:26:53 +00:00
Joel Challis
6ceff1367d
Tidy up use of keycode range helpers (#19813) 2023-02-12 17:09:34 +00:00
Jouke Witteveen
3137883956
Typographic updates to source generation (#19160) 2023-02-10 22:39:13 +00:00
Joel Challis
1d0b4c8d38
Tidy up use of keycode range helpers (#19756) 2023-02-10 21:10:14 +00:00
Pablo Martínez
d55b07696b
Add commit info to version.h (#19542)
* Initial commit

* Fix import order

* Fix deleted code instead of debug print line

* Format

* Update lib/python/qmk/cli/generate/version_h.py

Co-authored-by: Ryan <fauxpark@gmail.com>

* Renaming

* Update lib/python/qmk/cli/generate/version_h.py

Co-authored-by: Joel Challis <git@zvecr.com>

* Update lib/python/qmk/git.py

Co-authored-by: Joel Challis <git@zvecr.com>

---------

Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Joel Challis <git@zvecr.com>
2023-02-02 18:23:27 +00:00