Replace suspend with soft off

This commit is contained in:
Manna Harbour 2024-04-30 16:10:31 +10:00
parent 0599d01e51
commit 347059d847
5 changed files with 27 additions and 27 deletions

View File

@ -0,0 +1,14 @@
# Copyright 2024 Manna Harbour
# https://github.com/manna-harbour/miryoku
name: 'Build Example soft off'
on: workflow_dispatch
jobs:
build:
uses: ./.github/workflows/main.yml
secrets: inherit
with:
board: '["nice_nano"]'
shield: '["corne_left","corne_right"]'
custom_config: '["#define MIRYOKU_KLUDGE_SOFT_OFF"]'
kconfig: '["CONFIG_ZMK_PM_SOFT_OFF=y"]'

View File

@ -1,14 +0,0 @@
# Copyright 2022 Manna Harbour
# https://github.com/manna-harbour/miryoku
name: 'Build Example suspend'
on: workflow_dispatch
jobs:
build:
uses: ./.github/workflows/main.yml
secrets: inherit
with:
board: '["nice_nano"]'
shield: '["corne_left","corne_right"]'
custom_config: '["#define MIRYOKU_KLUDGE_SUSPEND"]'
branches: '["manna-harbour/zmk/suspend-test","zmkfirmware/zmk/main manna-harbour/zmk/suspend-test"]'

View File

@ -20,8 +20,8 @@ MIRYOKU_LAYER_LIST
#undef MIRYOKU_X #undef MIRYOKU_X
#if defined (MIRYOKU_KLUDGE_DOUBLETAPBOOT) #if defined (MIRYOKU_KLUDGE_DOUBLETAPBOOT)
#if defined (MIRYOKU_KLUDGE_SUSPEND) #if defined (MIRYOKU_KLUDGE_SOFT_OFF)
MIRYOKU_DOUBLE_TAP_GUARD(u_suspend, &suspend) MIRYOKU_DOUBLE_TAP_GUARD(u_soft_off, &soft_off)
#else #else
MIRYOKU_DOUBLE_TAP_GUARD(u_bootloader, &bootloader) MIRYOKU_DOUBLE_TAP_GUARD(u_bootloader, &bootloader)
#endif #endif

View File

@ -4,14 +4,14 @@
#pragma once #pragma once
#if defined (MIRYOKU_KLUDGE_DOUBLETAPBOOT) #if defined (MIRYOKU_KLUDGE_DOUBLETAPBOOT)
#if defined (MIRYOKU_KLUDGE_SUSPEND) #if defined (MIRYOKU_KLUDGE_SOFT_OFF)
#define U_BOOT &u_suspend #define U_BOOT &u_soft_off
#else #else
#define U_BOOT &u_bootloader #define U_BOOT &u_bootloader
#endif #endif
#else #else
#if defined (MIRYOKU_KLUDGE_SUSPEND) #if defined (MIRYOKU_KLUDGE_SOFT_OFF)
#define U_BOOT &suspend #define U_BOOT &soft_off
#else #else
#define U_BOOT &bootloader #define U_BOOT &bootloader
#endif #endif

View File

@ -26,7 +26,7 @@ The [[#keyboard-keymaps][keyboard keymaps]] are composed of the config file, a [
[[#global-shift-functions][global shift functions]], [[#global-shift-functions][global shift functions]],
[[#key-emulation-combos][key emulation combos]], [[#key-emulation-combos][key emulation combos]],
[[#mouse-keys][mouse keys]], [[#mouse-keys][mouse keys]],
[[#suspend][suspend]], [[#soft-off][soft off]],
[[#tap-delay][tap delay]], [[#tap-delay][tap delay]],
and [[#𝑥MK][𝑥MK]]. and [[#𝑥MK][𝑥MK]].
Open [[#issues][issues]] are also noted. Open [[#issues][issues]] are also noted.
@ -577,17 +577,17 @@ For workflow builds using [[#build-examples][Build Example]] workflows, see the
For local builds, make the changes locally. For local builds, make the changes locally.
*** Suspend *** Soft Off
Support for https://github.com/zmkfirmware/zmk/issues/1292#issuecomment-1264603539 is included using https://github.com/manna-harbour/zmk/tree/suspend-test and https://github.com/manna-harbour/zephyr/tree/v3.0.0+zmk-fixes-suspend-test. Support for [[https://zmk.dev/docs/features/soft-off][soft off]] can be enabled.
Suspend takes the place of the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#additional-features][boot]] key. For split keyboards, suspend the peripheral side then the central side. Soft off takes the place of the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#additional-features][boot]] key.
For [[#local-builds][local builds]], add ~#define MIRYOKU_KLUDGE_SUSPEND~ to the [[#config-file][config file]] and switch to or merge https://github.com/manna-harbour/zmk/tree/suspend-test. For [[#local-builds][local builds]], add ~#define MIRYOKU_KLUDGE_SOFT_OFF~ to the [[#config-file][config file]] and ~CONFIG_ZMK_PM_SOFT_OFF=y~ to the [[#kconfig-configuration][Kconfig configuration]].
For [[#workflow-builds][workflow builds]] using the [[#build-inputs][Build Inputs]] workflow, use ~#define MIRYOKU_KLUDGE_SUSPEND~ with the ~custom_config~ option, and ~manna-harbour/zmk/suspend-test~ with the ~branches~ option. Alternatively, use ~zmkfirmware/zmk/main manna-harbour/zmk/suspend-test~ to attempt an automatic [[#branches][merge]] of the branch into ZMK main. For [[#workflow-builds][workflow builds]] using the [[#build-inputs][Build Inputs]] workflow, use ~#define MIRYOKU_KLUDGE_SOFT_OFF~ with the ~custom_config~ option, and ~CONFIG_ZMK_PM_SOFT_OFF=y~ with the ~kconfig~ option.
For workflow builds using [[#build-examples][Build Example]] workflows, see the [[.github/workflows/build-example-suspend.yml][Build Example suspend]] workflow. For workflow builds using [[#build-examples][Build Example]] workflows, see the [[.github/workflows/build-example-soft_off.yml][Build Example soft_off]] workflow.
*** Tap Delay *** Tap Delay