aboutsummaryrefslogtreecommitdiffstats
path: root/docs/features
diff options
context:
space:
mode:
Diffstat (limited to 'docs/features')
-rw-r--r--docs/features/dynamic_macros.md13
-rw-r--r--docs/features/haptic_feedback.md2
-rw-r--r--docs/features/led_matrix.md59
-rw-r--r--docs/features/pointing_device.md17
-rw-r--r--docs/features/rgb_matrix.md59
-rw-r--r--docs/features/tap_dance.md12
6 files changed, 152 insertions, 10 deletions
diff --git a/docs/features/dynamic_macros.md b/docs/features/dynamic_macros.md
index a642ced43e..fa7373a4bd 100644
--- a/docs/features/dynamic_macros.md
+++ b/docs/features/dynamic_macros.md
@@ -32,12 +32,13 @@ For the details about the internals of the dynamic macros, please read the comme
There are a number of options added that should allow some additional degree of customization
-|Define |Default |Description |
-|----------------------------|----------------|-----------------------------------------------------------------------------------------------------------------|
-|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. |
-|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. |
-|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). |
-|`DYNAMIC_MACRO_DELAY` |*Not Defined* |Sets the waiting time (ms unit) when sending each key. |
+|Define |Default |Description |
+|------------------------------------------|----------------|-----------------------------------------------------------------------------------------------------------------|
+|`DYNAMIC_MACRO_SIZE` |128 |Sets the amount of memory that Dynamic Macros can use. This is a limited resource, dependent on the controller. |
+|`DYNAMIC_MACRO_USER_CALL` |*Not defined* |Defining this falls back to using the user `keymap.c` file to trigger the macro behavior. |
+|`DYNAMIC_MACRO_NO_NESTING` |*Not Defined* |Defining this disables the ability to call a macro from another macro (nested macros). |
+|`DYNAMIC_MACRO_DELAY` |*Not Defined* |Sets the waiting time (ms unit) when sending each key. |
+|`DYNAMIC_MACRO_KEEP_ORIGINAL_LAYER_STATE` |*Not Defined* |Defining this keeps the layer state when starting to record a macro |
If the LEDs start blinking during the recording with each keypress, it means there is no more space for the macro in the macro buffer. To fit the macro in, either make the other macro shorter (they share the same buffer) or increase the buffer size by adding the `DYNAMIC_MACRO_SIZE` define in your `config.h` (default value: 128; please read the comments for it in the header).
diff --git a/docs/features/haptic_feedback.md b/docs/features/haptic_feedback.md
index 08e66ea8e1..d380b1b999 100644
--- a/docs/features/haptic_feedback.md
+++ b/docs/features/haptic_feedback.md
@@ -121,7 +121,7 @@ Linear resonant actuators (LRA, also know as a linear vibrator) works different
#### DRV2605L waveform library
-DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `DRV_pulse(*sequence name or number*)`
+DRV2605L comes with preloaded library of various waveform sequences that can be called and played. If writing a macro, these waveforms can be played using `drv2605l_pulse(*sequence name or number*)` after adding `#include "drv2605l.h"`.
List of waveform sequences from the datasheet:
diff --git a/docs/features/led_matrix.md b/docs/features/led_matrix.md
index 28d24bc400..f14fb47d62 100644
--- a/docs/features/led_matrix.md
+++ b/docs/features/led_matrix.md
@@ -88,6 +88,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|`QK_LED_MATRIX_BRIGHTNESS_DOWN`|`LM_BRID`|Decrease the brightness level |
|`QK_LED_MATRIX_SPEED_UP` |`LM_SPDU`|Increase the animation speed |
|`QK_LED_MATRIX_SPEED_DOWN` |`LM_SPDD`|Decrease the animation speed |
+|`QK_LED_MATRIX_FLAG_NEXT` |`LM_FLGN`|Cycle through flags |
+|`QK_LED_MATRIX_FLAG_PREVIOUS` |`LM_FLGP`|Cycle through flags in reverse |
## LED Matrix Effects {#led-matrix-effects}
@@ -253,6 +255,7 @@ const char* effect_name = led_matrix_get_mode_name(led_matrix_get_mode());
#define LED_MATRIX_DEFAULT_FLAGS LED_FLAG_ALL // Sets the default LED flags, if none has been set
#define LED_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
+#define LED_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_NONE } // Sets the flags which can be cycled through.
```
## EEPROM storage {#eeprom-storage}
@@ -505,6 +508,62 @@ The current effect speed, from 0 to 255.
---
+### `void led_matrix_set_flags(led_flags_t flags)` {#api-led-matrix-set-flags}
+
+Set the global effect flags.
+
+#### Arguments {#api-led-matrix-set-flags-arguments}
+
+ - `led_flags_t flags`
+ The [flags](#flags) value to set.
+
+---
+
+### `void led_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-led-matrix-set-flags-noeeprom}
+
+Set the global effect flags. New state is not written to EEPROM.
+
+#### Arguments {#api-led-matrix-set-flags-noeeprom-arguments}
+
+ - `led_flags_t flags`
+ The [flags](#flags) value to set.
+
+---
+
+### `void led_matrix_flags_step(void)` {#api-led-matrix-flags-step}
+
+Move to the next flag combination.
+
+---
+
+### `void led_matrix_flags_step_noeeprom(void)` {#api-led-matrix-flags-step-noeeprom}
+
+Move to the next flag combination. New state is not written to EEPROM.
+
+---
+
+### `void led_matrix_flags_step_reverse(void)` {#api-led-matrix-flags-step-reverse}
+
+Move to the previous flag combination.
+
+---
+
+### `void led_matrix_flags_step_reverse_noeeprom(void)` {#api-led-matrix-flags-step-reverse-noeeprom}
+
+Move to the previous flag combination. New state is not written to EEPROM.
+
+---
+
+### `uint8_t led_matrix_get_flags(void)` {#api-led-matrix-get-flags}
+
+Get the current global effect flags.
+
+#### Return Value {#api-led-matrix-get-flags-return}
+
+The current effect [flags](#flags).
+
+---
+
### `void led_matrix_reload_from_eeprom(void)` {#api-led-matrix-reload-from-eeprom}
Reload the effect configuration (enabled, mode and brightness) from EEPROM.
diff --git a/docs/features/pointing_device.md b/docs/features/pointing_device.md
index d6dcddcdf0..eedbf59b95 100644
--- a/docs/features/pointing_device.md
+++ b/docs/features/pointing_device.md
@@ -267,6 +267,23 @@ The paw 3204 sensor uses a serial type protocol for communication, and requires
The CPI range is 400-1600, with supported values of (400, 500, 600, 800, 1000, 1200 and 1600). Defaults to 1000 CPI.
+### PAW-3222 Sensor
+
+To use the PAW-3222 sensor, add this to your `rules.mk`:
+
+```make
+POINTING_DEVICE_DRIVER = paw3222
+```
+
+The following pins must be defined in `config.h`:
+
+| Setting (`config.h`) | Description | Default |
+| --------------------- | ------------------------------------------------------------------ | ---------------------------- |
+| `PAW3222_CS_PIN` | (Required) The pin connected to the chip select pin of the sensor. | `POINTING_DEVICE_CS_PIN` |
+| `PAW3222_SPI_DIVISOR` | (Required) The SPI clock divisor. This is dependent on your MCU. | _not defined_ |
+
+The CPI range is up to 4,000. Defaults to 1,000 CPI.
+
### Pimoroni Trackball
To use the Pimoroni Trackball module, add this to your `rules.mk`:
diff --git a/docs/features/rgb_matrix.md b/docs/features/rgb_matrix.md
index 95ee4c4896..36680f24a2 100644
--- a/docs/features/rgb_matrix.md
+++ b/docs/features/rgb_matrix.md
@@ -96,6 +96,8 @@ As mentioned earlier, the center of the keyboard by default is expected to be `{
|`QK_RGB_MATRIX_VALUE_DOWN` |`RM_VALD`|Decrease the brightness level |
|`QK_RGB_MATRIX_SPEED_UP` |`RM_SPDU`|Increase the animation speed |
|`QK_RGB_MATRIX_SPEED_DOWN` |`RM_SPDD`|Decrease the animation speed |
+|`QK_RGB_MATRIX_FLAG_NEXT` |`RM_FLGN`|Cycle through flags |
+|`QK_RGB_MATRIX_FLAG_PREVIOUS` |`RM_FLGP`|Cycle through flags in reverse |
## RGB Matrix Effects {#rgb-matrix-effects}
@@ -409,6 +411,7 @@ const char* effect_name = rgb_matrix_get_mode_name(rgb_matrix_get_mode());
#define RGB_MATRIX_SPLIT { X, Y } // (Optional) For split keyboards, the number of LEDs connected on each half. X = left, Y = Right.
// If reactive effects are enabled, you also will want to enable SPLIT_TRANSPORT_MIRROR
#define RGB_TRIGGER_ON_KEYDOWN // Triggers RGB keypress events on key down. This makes RGB control feel more responsive. This may cause RGB to not function properly on some boards
+#define RGB_MATRIX_FLAG_STEPS { LED_FLAG_ALL, LED_FLAG_KEYLIGHT | LED_FLAG_MODIFIER, LED_FLAG_UNDERGLOW, LED_FLAG_NONE } // Sets the flags which can be cycled through.
```
## EEPROM storage {#eeprom-storage}
@@ -852,6 +855,62 @@ The current effect speed, from 0 to 255.
---
+### `void rgb_matrix_set_flags(led_flags_t flags)` {#api-rgb-matrix-set-flags}
+
+Set the global effect flags.
+
+#### Arguments {#api-rgb-matrix-set-flags-arguments}
+
+ - `led_flags_t flags`
+ The [flags](#flags) value to set.
+
+---
+
+### `void rgb_matrix_set_flags_noeeprom(led_flags_t flags)` {#api-rgb-matrix-set-flags-noeeprom}
+
+Set the global effect flags. New state is not written to EEPROM.
+
+#### Arguments {#api-rgb-matrix-set-flags-noeeprom-arguments}
+
+ - `led_flags_t flags`
+ The [flags](#flags) value to set.
+
+---
+
+### `void rgb_matrix_flags_step(void)` {#api-rgb-matrix-flags-step}
+
+Move to the next flag combination.
+
+---
+
+### `void rgb_matrix_flags_step_noeeprom(void)` {#api-rgb-matrix-flags-step-noeeprom}
+
+Move to the next flag combination. New state is not written to EEPROM.
+
+---
+
+### `void rgb_matrix_flags_step_reverse(void)` {#api-rgb-matrix-flags-step-reverse}
+
+Move to the previous flag combination.
+
+---
+
+### `void rgb_matrix_flags_step_reverse_noeeprom(void)` {#api-rgb-matrix-flags-step-reverse-noeeprom}
+
+Move to the previous flag combination. New state is not written to EEPROM.
+
+---
+
+### `uint8_t rgb_matrix_get_flags(void)` {#api-rgb-matrix-get-flags}
+
+Get the current global effect flags.
+
+#### Return Value {#api-rgb-matrix-get-flags-return}
+
+The current effect [flags](#flags).
+
+---
+
### `void rgb_matrix_sethsv(uint8_t h, uint8_t s, uint8_t v)` {#api-rgb-matrix-sethsv}
Set the global effect hue, saturation, and value (brightness).
diff --git a/docs/features/tap_dance.md b/docs/features/tap_dance.md
index d533e41aaa..688241a16b 100644
--- a/docs/features/tap_dance.md
+++ b/docs/features/tap_dance.md
@@ -40,6 +40,10 @@ Similar to the first option, the second and third option are good for simple lay
For more complicated cases, like blink the LEDs, fiddle with the backlighting, and so on, use the fourth or fifth option. Examples of each are listed below.
+::: tip
+If too many tap dances are active at the same time, later ones won't have any effect. You need to increase `TAP_DANCE_MAX_SIMULTANEOUS` by adding `#define TAP_DANCE_MAX_SIMULTANEOUS 5` (or higher) to your keymap's `config.h` file if you expect that users may hold down many tap dance keys simultaneously. By default, only 3 tap dance keys can be used together at the same time.
+:::
+
## Implementation Details {#implementation}
Well, that's the bulk of it! You should now be able to work through the examples below, and to develop your own Tap Dance functionality. But if you want a deeper understanding of what's going on behind the scenes, then read on for the explanation of how it all works!
@@ -209,11 +213,13 @@ tap_dance_action_t tap_dance_actions[] = {
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
tap_dance_action_t *action;
+ tap_dance_state_t* state;
switch (keycode) {
- case TD(CT_CLN): // list all tap dance keycodes with tap-hold configurations
- action = &tap_dance_actions[QK_TAP_DANCE_GET_INDEX(keycode)];
- if (!record->event.pressed && action->state.count && !action->state.finished) {
+ case TD(CT_CLN):
+ action = tap_dance_get(QK_TAP_DANCE_GET_INDEX(keycode));
+ state = tap_dance_get_state(QK_TAP_DANCE_GET_INDEX(keycode));
+ if (!record->event.pressed && state != NULL && state->count && !state->finished) {
tap_dance_tap_hold_t *tap_hold = (tap_dance_tap_hold_t *)action->user_data;
tap_code16(tap_hold->tap);
}