Merge branch 'main' of github.com:zmkfirmware/zmk into pillbug
This commit is contained in:
commit
afe365815f
5 changed files with 33 additions and 1 deletions
|
@ -30,6 +30,20 @@ config ZMK_KSCAN_GPIO_MATRIX
|
|||
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_GPIO_MATRIX))
|
||||
select ZMK_KSCAN_GPIO_DRIVER
|
||||
|
||||
if ZMK_KSCAN_GPIO_MATRIX
|
||||
|
||||
config ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS
|
||||
int "Ticks to wait between each output when scanning"
|
||||
default 0
|
||||
help
|
||||
When iterating over each output to drive it active, read inputs, then set
|
||||
inactive again, some boards may take time for the previous output to
|
||||
"settle" before reading inputs for the next active output column. In that
|
||||
scenario, set this value to a positive value to configure the number of
|
||||
usecs to wait after reading each column of keys.
|
||||
|
||||
endif # ZMK_KSCAN_GPIO_MATRIX
|
||||
|
||||
config ZMK_KSCAN_MOCK_DRIVER
|
||||
bool
|
||||
default $(dt_compat_enabled,$(DT_COMPAT_ZMK_KSCAN_MOCK))
|
||||
|
|
|
@ -250,6 +250,10 @@ static int kscan_matrix_read(const struct device *dev) {
|
|||
LOG_ERR("Failed to set output %i inactive: %i", o, err);
|
||||
return err;
|
||||
}
|
||||
|
||||
#if CONFIG_ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS > 0
|
||||
k_busy_wait(CONFIG_ZMK_KSCAN_MATRIX_WAIT_BETWEEN_OUTPUTS);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Process the new state.
|
||||
|
|
|
@ -134,6 +134,12 @@ bindings
|
|||
;
|
||||
```
|
||||
|
||||
### Behavior Queue Limit
|
||||
|
||||
Macros use an internal queue to invoke each behavior in the bindings list when triggered, which has a size of 64 by default. Bindings in "press" and "release" modes correspond to one event in the queue, whereas "tap" mode bindings correspond to two (one for press and one for release). As a result, the effective number of actions processed might be less than 64 and this can cause problems for long macros.
|
||||
|
||||
To prevent issues with longer macros, you can change the size of this queue via the `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` setting in your configuration, [typically through your `.conf` file](../config/index.md). For example, `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE=512` would allow your macro to type about 256 characters.
|
||||
|
||||
## Common Patterns
|
||||
|
||||
Below are some examples of how the macro behavior can be used for various useful functionality.
|
||||
|
|
|
@ -9,6 +9,14 @@ See [Configuration Overview](index.md) for instructions on how to change these s
|
|||
|
||||
See the [zmk/app/dts/behaviors/](https://github.com/zmkfirmware/zmk/tree/main/app/dts/behaviors) folder for all default behaviors.
|
||||
|
||||
## Common
|
||||
|
||||
### Kconfig
|
||||
|
||||
| Config | Type | Description | Default |
|
||||
| --------------------------------- | ---- | ------------------------------------------------------------------------------------ | ------- |
|
||||
| `CONFIG_ZMK_BEHAVIORS_QUEUE_SIZE` | int | Maximum number of behaviors to allow queueing from a macro or other complex behavior | 64 |
|
||||
|
||||
## Caps Word
|
||||
|
||||
Creates a custom behavior that behaves similar to a caps lock but deactivates when any key not in a continue list is pressed.
|
||||
|
|
|
@ -134,7 +134,7 @@ See [Zephyr's Devicetree guide](https://docs.zephyrproject.org/latest/build/dts/
|
|||
### Changing Devicetree Properties
|
||||
|
||||
Since Devicetree properties are set for specific nodes in the tree, you will first need to find the node you want to configure. You will typically need to
|
||||
search through the `.dts` file for you board, `.overlay` file for your shield, or a `.dtsi` file included in by of those files using an `#include` statement.
|
||||
search through the `.dts` file for your board, `.overlay` file for your shield, or a `.dtsi` file included by those files using an `#include` statement.
|
||||
|
||||
A Devicetree node looks like this:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue