1
0
Fork 0
forked from forks/qmk_firmware
qmk_firmware/keyboards/gboards
Pete Sevander 7e983796e1
Process combos earlier & overlapping combos (#8591)
* Combo processing improvements.

Now it is possible to use ModTap and LayerTap keys as part of combos.
Overlapping combos also don't trigger all the combos, just exactly the
one that you press.

New settings:
- COMBO_MUST_HOLD_MODS
- COMBO_MOD_TERM
- COMBO_TERM_PER_COMBO
- COMBO_MUST_HOLD_PER_COMBO
- COMBO_STRICT_TIMER
- COMBO_NO_TIMER

* Remove the size flags from combo_t struct boolean members.

This in the end actually saves space as the members are accessed so many
times. The amount of operations needed to access the bits uses more
memory than setting the size saves.

* Fix `process_combo_key_release` not called correctly with tap-only combos

* Fix not passing a pointer when NO_ACTION_TAPPING is defined.

* Docs for `COMBO_ONLY_FROM_LAYER`

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update quantum/process_keycode/process_combo.c

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Add `EXTRA_SHORT_COMBOS` option.

Stuff combo's `disabled` and `active` flags into `state`. Possibly can
save some space.

* Add more examples and clarify things with dict management system.

- Simple examples now has a combo that has modifiers included.
- The slightly more advanced examples now are actually more advanced
  instead of just `tap_code16(<modded-keycode>)`.
- Added a note that `COMBO_ACTION`s are not needed anymore as you can
  just use custom keycodes.
- Added a note that the `g/keymap_combo.h` macros use the
  `process_combo_event` function and that it is not usable in one's
  keymap afterwards.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Change "the" combo action example to "email" example.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Fix sneaky infinite loop with `combo_disable()`

No need to call `dump_key_buffer` when disabling combos because the
buffer is either being dumped if a combo-key was pressed, or the buffer is empty
if a non-combo-key is pressed.

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

* Update docs/feature_combo.md

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>

Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
2021-08-06 09:44:57 +10:00
..
combos
dicts/aset
engine Remove rules.mk for gboards/engine and gboards/g (#9444) 2020-06-19 15:51:50 +10:00
g Process combos earlier & overlapping combos (#8591) 2021-08-06 09:44:57 +10:00
readme.md

gBoards Monorepo

Ever wanted to do some crazy stuff with combos or onboard steno? Here's a big repo for you to include into your keymaps. You may need to do some configuration on your part, for the documentation hit up docs.gboards.ca

Building

You can find all of my keyboards under the k/ folder. Make with

make gboards/k/gergoplex:default:flash or similar

Configuration

Dictionaries are layered ontop of each other at compile time, you specify these in dicts.def and combos.def respectively. This system allows the easy integration of other users combos and a simple way to break out combos by functionality.

If you have a cool dictionary, please submit a PR against the respective directory!

Combos

This is a set of dicts that templates macros ontop of QMK. Use this for augmenting your current setup with multi-chords! You can browse the available combo lists in combos/

Engine

This is the onboard chording engine for all sorts of fun shenanigans. Be aware that this currently is a bit of a QMK replacement focused on pure chording. Take a look at the configuration in keyboards/ginny for ideas, all these dicts are stored over in dicts/

Installation

You will need to add the following bits to your rules.mk, refer to keyboards/ginny for a working example VPATH += keyboards/gboards/

And if you're using the chording engine, this as well. SRC += g/engine.c

For combos, add #include "g/keymap_combos.h" to keymap.c to compile your combos.def into your keymap

For the chording engine, add #include "g/keymap_engine.h" to keymap.c compile your dicts.def into your keymap. If you don't have a config_engine.h file for your keyboard, you will need to create it. (Once again, look at keyboards/ginny/ for a example of how to do this.