aboutsummaryrefslogtreecommitdiff
path: root/docs/feature_combo.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/feature_combo.md')
-rw-r--r--docs/feature_combo.md32
1 files changed, 23 insertions, 9 deletions
diff --git a/docs/feature_combo.md b/docs/feature_combo.md
index 4cb1bcda0..9db7be511 100644
--- a/docs/feature_combo.md
+++ b/docs/feature_combo.md
@@ -59,19 +59,12 @@ void process_combo_event(uint8_t combo_index, bool pressed) {
59 switch(combo_index) { 59 switch(combo_index) {
60 case ZC_COPY: 60 case ZC_COPY:
61 if (pressed) { 61 if (pressed) {
62 register_code(KC_LCTL); 62 tap_code16(LCTL(KC_C));
63 register_code(KC_C);
64 unregister_code(KC_C);
65 unregister_code(KC_LCTL);
66 } 63 }
67 break; 64 break;
68
69 case XV_PASTE: 65 case XV_PASTE:
70 if (pressed) { 66 if (pressed) {
71 register_code(KC_LCTL); 67 tap_code16(LCTL(KC_V));
72 register_code(KC_V);
73 unregister_code(KC_V);
74 unregister_code(KC_LCTL);
75 } 68 }
76 break; 69 break;
77 } 70 }
@@ -87,3 +80,24 @@ If you're using long combos, or even longer combos, you may run into issues with
87In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file. 80In this case, you can add either `#define EXTRA_LONG_COMBOS` or `#define EXTRA_EXTRA_LONG_COMBOS` in your `config.h` file.
88 81
89You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`. 82You may also be able to enable action keys by defining `COMBO_ALLOW_ACTION_KEYS`.
83
84## Keycodes
85
86You can enable, disable and toggle the Combo feature on the fly. This is useful if you need to disable them temporarily, such as for a game.
87
88|Keycode |Description |
89|----------|---------------------------------|
90|`CMB_ON` |Turns on Combo feature |
91|`CMB_OFF` |Turns off Combo feature |
92|`CMB_TOG` |Toggles Combo feature on and off |
93
94## User callbacks
95
96In addition to the keycodes, there are a few functions that you can use to set the status, or check it:
97
98|Function |Description |
99|-----------|--------------------------------------------------------------------|
100| `combo_enable()` | Enables the combo feature |
101| `combo_disable()` | Disables the combo feature, and clears the combo buffer |
102| `combo_toggle()` | Toggles the state of the combo feature |
103| `is_combo_enabled()` | Returns the status of the combo feature state (true or false) |