Commit graph

25 commits

Author SHA1 Message Date
猫咪恐慌
0fb3aaec8e
[Doc]: Correct Markdown syntax errors. (#22511) 2023-11-29 02:48:47 +00:00
Nick Brassel
5faa23d54c
Keymap introspection for combos. (#19670) 2023-05-15 22:27:37 +10:00
Albert Y
387b64a79b
[Docs] Remove combo count from array (#20511) 2023-04-20 08:47:26 -07:00
Albert Y
ec3c2b75de
[Docs] Add mod-tap section header (#20041) 2023-03-08 12:36:36 -07:00
Eric.a Gebhart
db1eeea478
Add combo hook to allow per layer combo reference layers. (#16699)
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Sergey Vlasov <sigprof@gmail.com>
2023-02-13 03:31:04 +11:00
Arialdo Martini
98ed19045d
[Docs] Combos example consistently uses A B keys (#19792) 2023-02-10 02:40:15 -08:00
Paul Massendari
84a642266c
A comma was missing (#19507) 2023-01-05 15:12:46 +00:00
Ryan
efe520645e
Normalise Combo keycodes (#18877) 2022-10-27 13:59:58 +01:00
Jeff Epler
9632360caa
Use a macro to compute the size of arrays at compile time (#18044)
* Add ARRAY_SIZE and CEILING utility macros

* Apply a coccinelle patch to use ARRAY_SIZE

* fix up some straggling items

* Fix 'make test:secure'

* Enhance ARRAY_SIZE macro to reject acting on pointers

The previous definition would not produce a diagnostic for
```
int *p;
size_t num_elem = ARRAY_SIZE(p)
```
but the new one will.

* explicitly get definition of ARRAY_SIZE

* Convert to ARRAY_SIZE when const is involved

The following spatch finds additional instances where the array is
const and the division is by the size of the type, not the size of
the first element:
```
@ rule5a using "empty.iso" @
type T;
const T[] E;
@@

- (sizeof(E)/sizeof(T))
+ ARRAY_SIZE(E)

@ rule6a using "empty.iso" @
type T;
const T[] E;
@@

- sizeof(E)/sizeof(T)
+ ARRAY_SIZE(E)
```

* New instances of ARRAY_SIZE added since initial spatch run

* Use `ARRAY_SIZE` in docs (found by grep)

* Manually use ARRAY_SIZE

hs_set is expected to be the same size as uint16_t, though it's made
of two 8-bit integers

* Just like char, sizeof(uint8_t) is guaranteed to be 1

This is at least true on any plausible system where qmk is actually used.

Per my understanding it's universally true, assuming that uint8_t exists:
https://stackoverflow.com/questions/48655310/can-i-assume-that-sizeofuint8-t-1

* Run qmk-format on core C files touched in this branch

Co-authored-by: Stefan Kerkmann <karlk90@pm.me>
2022-08-30 10:20:04 +02:00
Albert Y
a1f0208797
[Docs] Use layer number as example for COMBO_ONLY_FROM_LAYER (#18072)
Co-authored-by: Ryan <fauxpark@gmail.com>
2022-08-16 19:37:06 -07:00
Pete Sevander
21958a9343
New combo configuration options (#15083)
Co-authored-by: precondition <57645186+precondition@users.noreply.github.com>
2022-01-09 12:02:25 -08:00
Albert Y
b384599663
Link Macro example for COMBO_ACTION documentation (#15164)
* Link Macro example for COMBO_ACTION documentation

* Restructure

Co-authored-by: filterpaper <filterpaper@localhost>
2021-12-27 14:07:00 +11:00
QMK Bot
3fd6ae93ad Merge remote-tracking branch 'origin/master' into develop 2021-11-22 20:02:13 +00:00
precondition
97a32eedf1
layer_combo → sd_combo (#15266) 2021-11-23 07:01:39 +11:00
Ryan
f529580860
Basic keycode overhaul (#14726) 2021-11-03 22:22:17 -07:00
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
Jan-Frederick Musiol
49abff9071
changed type of process_combo_event argument in tutorial (#10621)
in tutorial for combos feature, changed type of compo_index argument of process_combo_event form uint8_t to uint16_t
2020-10-13 02:14:37 +11:00
Michael Clayton
57540af102 Change "yu" to "you" in combo docs (#6510) 2019-08-08 18:10:16 +01:00
Drashna Jaelre
c44fc68297 Allow Combo feature to be enabled/disabled live (#6318)
* Add ability to enable/disable combos

* Update documentation for Combo feature

* Change keycodes for appeasement

* Simplify combo_toggle function

* Update names

* Update combo docs to use tables
2019-07-16 01:37:19 -07:00
Alex Mayer
b2f7915994 [Docs] Make Code Examples Consistent On Combo Page (#6078) 2019-06-05 11:18:20 -07:00
Noah Frederick
606b1fe82f Remove caveat about combos with shared keys (#5601)
Combos with shared keys are supported as of https://github.com/qmk/qmk_firmware/pull/2561. Therefore, this caveat no longer applies.
2019-04-10 18:36:05 -07:00
Joshua Bragge
e251850cd8 added missing ; on example (#5089) 2019-02-09 09:18:08 -08:00
Drashna Jaelre
26a201e687 fix example to reflect caveat 2018-11-06 00:38:44 -05:00
Drashna Jaelre
d3a6296199 Add key caveat to combos doc 2018-10-27 00:18:22 -04:00
Drashna Jaelre
a7d05820a6 Add documentation for Combo feature 2018-10-10 21:36:58 -04:00