Skip to content

Commit

Permalink
Larger revamp of the (soft off)->(low power states) feature page
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-Munnich committed Jul 16, 2024
1 parent f8706b7 commit ee50a89
Show file tree
Hide file tree
Showing 6 changed files with 367 additions and 303 deletions.
4 changes: 2 additions & 2 deletions docs/docs/behaviors/soft-off.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ sidebar_label: Soft Off

The soft off behavior is used to force the keyboard into an off state. Depending on the specific keyboard hardware, the keyboard can be turned back on again either with a dedicated on/off button that is available, or using the reset button found on the device.

Refer to the [soft off config](../config/power.md#soft-off) for details on enabling soft off in order to use this behavior.
Refer to the [low power states config](../config/power.md#low-power-states) for details on enabling soft off in order to use this behavior.

For more information, see the [Soft Off Feature](../features/soft-off.md) page.
For more information, see the [Soft Off Feature](../features/low-power-states#soft-off) page.

### Behavior Binding

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/config/kscan.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ Transforms should be used any time the physical layout of a keyboard's keys does

Transforms can also be used for keyboards with multiple layouts. You can define multiple matrix transform nodes, one for each layout, and users can select which one they want from the `/chosen` node in their keymaps.

See the [new shield guide](../development/new-shield.mdx#optional-matrix-transform) for more documentation on how to define a matrix transform.
See the [new shield guide](../development/new-shield.mdx#matrix-transform) for more documentation on how to define a matrix transform.

### Devicetree

Expand Down
31 changes: 8 additions & 23 deletions docs/docs/config/power.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,20 @@ sidebar_label: Power Management
See [Configuration Overview](index.md) for instructions on how to
change these settings.

## Idle/Sleep
## Low Power States

Configuration for entering low power modes when the keyboard is idle.

In the idle state, peripherals such as displays and lighting are disabled, but the keyboard remains connected to Bluetooth so it can immediately respond when you press a key.

In the deep sleep state, the keyboard additionally disconnects from Bluetooth and any external power output is disabled. This state uses very little power, but it may take a few seconds to reconnect after waking. To allow a device to wake from deep sleep, the `wakeup-source` property needs to be added to the [keyboard scan driver](kscan.md) of said device.

### Kconfig

Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig)

| Config | Type | Description | Default |
| ------------------------------- | ---- | ----------------------------------------------------- | ------- |
| `CONFIG_ZMK_IDLE_TIMEOUT` | int | Milliseconds of inactivity before entering idle state | 30000 |
| `CONFIG_ZMK_SLEEP` | bool | Enable deep sleep support | n |
| `CONFIG_ZMK_IDLE_SLEEP_TIMEOUT` | int | Milliseconds of inactivity before entering deep sleep | 900000 |

## Soft Off

The [soft off feature](../features/soft-off.md) allows turning the keyboard on/off from either dedicated hardware, or using the [`&soft_off` behavior](../behaviors/soft-off.md) to turn off and a reset button to turn back on again.
Configuration for entering [low power states](../features/low-power-states.mdx) when the keyboard is idle.

### Kconfig

Definition file: [zmk/app/Kconfig](https://github.com/zmkfirmware/zmk/blob/main/app/Kconfig)

| Config | Type | Description | Default |
| ------------------------ | ---- | ------------------------------------------------------------------- | ------- |
| `CONFIG_ZMK_PM_SOFT_OFF` | bool | Enable soft off functionality from the keymap or dedicated hardware | n |
| Config | Type | Description | Default |
| ------------------------------- | ---- | ------------------------------------------------------------------- | ------- |
| `CONFIG_ZMK_IDLE_TIMEOUT` | int | Milliseconds of inactivity before entering idle state | 30000 |
| `CONFIG_ZMK_SLEEP` | bool | Enable deep sleep support | n |
| `CONFIG_ZMK_IDLE_SLEEP_TIMEOUT` | int | Milliseconds of inactivity before entering deep sleep | 900000 |
| `CONFIG_ZMK_PM_SOFT_OFF` | bool | Enable soft off functionality from the keymap or dedicated hardware | n |

## External Power Control

Expand Down
Loading

0 comments on commit ee50a89

Please sign in to comment.