[[https://github.com/manna-harbour/miryoku/][Miryoku]] is an ergonomic, minimal, orthogonal, and universal keyboard layout. [[https://github.com/manna-harbour/miryoku_qmk/tree/miryoku/users/manna-harbour_miryoku][Miryoku QMK]] is the Miryoku implementation for [[https://qmk.fm][QMK]].
QMK master is at https://github.com/qmk/qmk_firmware/tree/master. The corresponding Miryoku QMK readme is at https://github.com/qmk/qmk_firmware/tree/master/users/manna-harbour_miryoku and describes the version of Miryoku QMK in QMK master.
The Miryoku QMK development branch is named ~miryoku~ and is at https://github.com/manna-harbour/miryoku_qmk/tree/miryoku. The corresponding Miryoku QMK readme is at https://github.com/manna-harbour/miryoku_qmk/tree/miryoku/users/manna-harbour_miryoku.
New commits can be seen at the top of the [[https://github.com/manna-harbour/miryoku_qmk/commits/miryoku][history]] with commit messages beginning ~[miryoku]~ or ~[miryoku-github]~
Periodically, the ~[miryoku]~ commits are squashed and merged upstream into QMK master by pull request, the ~miryoku~ branch is renamed, and a new ~miryoku~ branch is created from QMK master.
**** Merge
To use both the current versions of QMK and Miryoku QMK together, the QMK master and ~miryoku~ branches need to be merged.
The ~[miryoku-github]~ commits relate to GitHub specific functions of the Miryoku QMK repository and forks, such as workflows. Directly merging ~miryoku~ with a branch based on QMK master will lead to conflicts due to those commits. To avoid conflicts, first drop or revert all ~[miryoku-github]~ commits from ~miryoku~ before merging.
Merging branches can be performed automatically at build time for [[#workflow-builds][workflow builds]] using the ~merge~ option, which will automatically revert all ~[miryoku-github]~ commits before merging. For local builds, see [[#checkout-update-and-merge][Checkout, Update, and Merge]] below.
Any local changes to existing workflow files should be made independently in commits with messages starting ~[miryoku-github]~ so that they can also be automatically excluded in workflow builds.
Next choose the [[#branches][branch]]. If using ~miryoku~, [[#checkout-update-and-merge][checkout, update, or merge]] as needed.
Build with ~manna-harbour_miryoku~ as the keymap name. Personalised defaults for [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#alternative-layouts][alternative layout]] options can be set in [[#userspace][custom_rules.mk]]. Options can also be set or overridden at build time. Build with [[#qmk][qmk]] or [[#make][make]].
**** Checkout, Update, and Merge
All of the following examples operate in your existing QMK build environment.
#+BEGIN_SRC sh :tangle no
cd qmk_firmware
#+END_SRC
To checkout the ~miryoku~ branch from Miryoku QMK:
#+BEGIN_SRC sh :tangle no
git remote add miryoku_qmk git@github.com:manna-harbour/miryoku_qmk.git # if using SSH
git remote add miryoku_qmk https://github.com/manna-harbour/miryoku_qmk.git # if using HTTPS
git fetch miryoku_qmk
git checkout --track miryoku_qmk/miryoku
make git-submodule
#+END_SRC
To update the ~miryoku~ branch from Miryoku QMK:
#+BEGIN_SRC sh :tangle no
git checkout miryoku
git fetch miryoku_qmk
git merge miryoku_qmk/miryoku
#+END_SRC
If a new ~miryoku~ branch has been created in Miryoku QMK you will see ~(forced update)~ after the fetch. To rename the existing ~miryoku~ branch and create a new ~miryoku~ branch from Miryoku QMK:
Firmware can be built via GitHub Actions workflows without use of a local build environment. Local tools are still required for [[https://docs.qmk.fm/#/newbs_flashing][flashing]].
First [[#fork-or-sync][fork the Miryoku QMK repository or sync the ~miryoku~ branch]]. Then use the [[#build-examples][Build Examples]] or [[#build-inputs][Build Inputs]] workflows.
To access a workflow, visit the Actions tab and select the workflow. To download the firmware from a workflow run, select the workflow, select the workflow run, select the desired Artifacts, and unzip the downloaded zip file.
If you don't have a fork, first [[https://github.com/signup][create a GitHub account]], [[https://github.com/login][login to GitHub]], [[https://docs.github.com/en/get-started/quickstart/fork-a-repo#forking-a-repository][fork]] https://github.com/manna-harbour/miryoku_qmk, and visit the Actions tab and enable workflows.
If you already have a fork, [[https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork#syncing-a-fork-branch-from-the-web-ui][sync]] the ~miryoku~ branch.
If a new ~miryoku~ branch has been created in Miryoku QMK, there will be a warning about conflicts when trying to sync. If you have local changes, first create a copy of the branch by [[https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository#creating-a-branch][creating a new branch]] and specifying the ~miryoku~ branch in your fork as the source, then sync the ~miryoku~ branch again. Accept the prompt to discard commits.
Copy one of the included Build Example workflow files, edit the ~name~ value, and edit and add options and values as desired. Select Run workflow, select the Branch if desired, and activate Run workflow.
The ~alphas~, ~nav~, ~clipboard~, and ~layers~ options correspond to the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#alternative-layouts][alternative layout]] options. The ~mapping~ option corresponds to the alternative [[#subset-mapping][mapping]] options. Alternative layout and mapping options are given in the documentation in the form ~MIRYOKU_OPTION=VALUE~. To use here, convert to the form specified above. Use ~default~ to represent the default value. Values for these five options are case-insensitive. See the [[../../.github/workflows/test-all-configs.yml][Test All Configs workflow file]] for all supported values.
The ~rules~ and ~custom_config~ options can be used to specify values to be appended to ~custom_rules.mk~ and ~custom_config.h~, respectively. Separate multiple lines with ~\n~.
The ~merge~ option can be used to merge branches at build time. Branches are specified in the form ~<user>/<repo>/<branch>~. E.g. QMK ~master~ and ~develop~ would be specified as ~qmk/qmk_firmware/master~ and ~qmk/qmk_firmware/develop~ respectively. Multiple space separated branches can be specified. For no merges, leave as ~default~.
The Build Inputs workflow can be used without editing workflow files. Select Run workflow, select the Branch and fill out the form as desired, and activate Run workflow.
Most options are specified by entering values directly in the corresponding field. Multiple comma separated values can be entered per option and a matrix build will be performed for each combination of values across all options.
Values for Miryoku alternative layout options are selected from a list. As multiple selection is not supported, matrix builds across multiple values are not possible for these options, and the Test Inputs or [[#build-examples][Build Example]] workflows should be used instead.
The ~Miryoku Alphas~, ~Miryoku Nav~, ~Miryoku Clipboard~, and ~Miryoku Layers~ options correspond to the [[https://github.com/manna-harbour/miryoku/tree/master/docs/reference#alternative-layouts][alternative layout]] options. The ~Miryoku Mapping~ option corresponds to the alternative [[#subset-mapping][mapping]] options. Alternative layout and mapping options are given in the documentation in the form ~MIRYOKU_OPTION=VALUE~. To use here, enter the ~value~ in the corresponding ~Miryoku Option~ field. Use ~default~ to represent the default value. Values for these five options are case-insensitive.
The ~custom_rules.mk~ and ~custom_config.h~ options can be used to specify values to be appended to the corresponding files. Join multiple lines with ~\n~.
The ~Merge QMK Branches~ option can be used to merge branches at build time. Branches are specified in the form ~<user>/<repo>/<branch>~. E.g. QMK ~master~ and ~develop~ would be specified as ~qmk/qmk_firmware/master~ and ~qmk/qmk_firmware/develop~ respectively. Multiple space separated branches can be specified. For no merges, leave as ~default~.
- [[./manna-harbour_miryoku.h]] :: Keymap-related definitions. Included from ~manna-harbour_miryoku.c~. Layer data is generated by [[https://github.com/manna-harbour/miryoku_babel][Miryoku Babel]] and is included from files in the [[miryoku_babel]] directory.
This is a hybrid mapping. Only the 3x10 alphas plus spacebars as primary thumb keys are mapped. The remaining keys are the same as the default keymap but with semicolon in place of quote. The keys adjacent to the spacebars are also mapped as corresponding thumb keys but may not be usable as such.
This is a hybrid mapping. Only the 3x10 alphas plus spacebars as primary thumb keys are mapped. The remaining keys are the same as the default keymap but with semicolon in place of quote. The keys adjacent to the spacebars are also mapped as corresponding thumb keys but may not be usable as such.
An alternative subset mapping is provided with all keys shifted up one row creating thumb keys in the original alpha area. To select this mapping, append ~MIRYOKU_MAPPING=SHIFTED_ROWS~ to the ~make~ command line when building.
Another alternative subset mapping is provided as for ~MIRYOKU_MAPPING=SHIFTED_ROWS~ but with the thumb keys shifted one position in the direction of thumb extension. To select this mapping, append ~MIRYOKU_MAPPING=SHIFTED_ROWS_EXTENDED_THUMBS~ to the ~make~ command line when building.
Another alternative subset mapping is provided as for ~MIRYOKU_MAPPING=SHIFTED_ROWS_EXTENDED_THUMBS~ but with the pinkie column moved down one row. To select this mapping, append ~MIRYOKU_MAPPING=SHIFTED_ROWS_EXTENDED_THUMBS_PINKIE_STAGGER~ to the ~make~ command line when building.
An alternative with 180 degree rotation is also provided to enable the USB cable to be relocated for use with laptops. To select this mapping, append ~MIRYOKU_MAPPING=ROTATE~ to the ~make~ command line when building.
On the trackball side the bottom row thumb key is used as the tertiary thumb key. Additionally, [[#thumb-combos][thumb combos]] are enabled automatically for this keyboard.
make takashicompany/minizone:manna-harbour_miryoku:flash # make
make takashicompany/minizone:manna-harbour_miryoku:flash MIRYOKU_MAPPING=EXTENDED_THUMBS # make, extended thumb position
make takashicompany/minizone:manna-harbour_miryoku:flash POINTING_DEVICE_ENABLE=yes POINTING_DEVICE_DRIVER=pimoroni_trackball OLED_ENABLE=no # make, with pimoroni trackball
[[https://github.com/qmk/qmk_firmware/blob/master/docs/feature_caps_word.md][Caps Word]] is used in place of ~Caps Lock~. Combine with ~Shift~ for ~Caps Lock~.
Combo the primary and secondary thumb keys to emulate the tertiary thumb key. Can be used on keyboards with missing or hard to reach tertiary thumb keys or for compatibility with same. Requires suitable keycaps to enable the thumb to press both keys simultaneously.
Use Miryoku QMK with any keyboard with [[https://github.com/manna-harbour/xmk][𝑥MK]].
For [[#local-builds][local builds]], merge https://github.com/manna-harbour/qmk_firmware/tree/xmk and build for keyboard ~converter/xmk~.
For [[#workflow-builds][workflow builds]], use the Build Inputs workflow and build with keyboard ~converter/xmk~ and merge ~manna-harbour/qmk_firmware/xmk~, or use the Build Example 𝑥MK workflow.
Also see [[https://github.com/manna-harbour/miryoku_kmonad][Miryoku KMonad]].