Miryoku Customisation Documentation #85
manna-harbour
announced in
Announcements
Replies: 5 comments 7 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been hidden.
This comment has been hidden.
-
When it says to redefine a layer (when removing it) to another layer, could I say define it to any valid keycode, i.e. replace the mouse layer with KC_LSFT? |
Beta Was this translation helpful? Give feedback.
1 reply
-
So I've been doing it wrong here and all that code should live in |
Beta Was this translation helpful? Give feedback.
1 reply
This comment was marked as off-topic.
This comment was marked as off-topic.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This is a draft of the new Miryoku customisation documentation.
custom_config.h
:custom_config.h
as part of the title.custom_config.h
. Use live links, permalinks to the file, permalinks to lines or regions, or a gist.custom_config.h
custom_config.h
can be used to substitute, add, and remove layers, and to substitute mappings for all layers or per layer, in a single file and without causing merge conflicts with updates.For complete examples, see example
custom_config.h
shared by members of the community.In Miryoku QMK,
custom_config.h
is https://github.com/manna-harbour/miryoku_qmk/blob/miryoku/users/manna-harbour_miryoku/custom_config.h. In Miryoku ZMK,custom_config.h
is https://github.com/manna-harbour/miryoku_zmk/blob/master/miryoku/custom_config.h and is described at https://github.com/manna-harbour/miryoku_zmk#config-file. In Miryoku KMK,custom_config.h
is https://github.com/manna-harbour/miryoku_kmk/blob/main/src/custom_config.h.Layers
Layer data is defined in
miryoku_babel/miryoku_layer_alternatives.h
and selected inmiryoku_babel/miryoku_layer_selection.h
at build time depending on build options.Substitute Layer
Copy the layer definition to be modified from
miryoku_layer_alternatives.h
intocustom_config.h
, change the macro name to match the name for the layer used inmiryoku_layer_selection.h
, and edit the definition as appropriate.E.g. to replace apostrophe with semicolon on Base when using
MIRYOKU_ALPHAS=QWERTY
, copy the#define MIRYOKU_ALTERNATIVES_BASE_QWERTY
block (5 lines) frommiryoku_layer_alternatives.h
intocustom_config.h
, and changeMIRYOKU_ALTERNATIVES_BASE_QWERTY
toMIRYOKU_LAYER_BASE
. For Miryoku QMK replaceKC_QUOT
withKC_SCLN
. For Miryoku ZMK replaceSQT
withSEMI
. For Miryoku KMonad replaceU_QUOT
with;
. For Miryoku KMK replaceKC.QUOT
withKC.SCLN
.Add Layer
Define the layer data in
custom_config.h
in the same way as when substituting a layer, but use a new layer name in the macro name. Available layers are listed inmiryoku_babel/miryoku_layer_list.h
. Copy the#define MIRYOKU_LAYER_LIST
block (11 lines) intocustom_config.h
and add an entry for the new layer. Note the layer names in this list (and in layer data macro names) do not have theU_
prefix. The name in quotes is for display. If not also changing the per layer mapping for this layer, add a default forMIRYOKU_LAYERMAPPING_
plus layer name toMIRYOKU_MAPPING
. E.g. for a new layerGAME
, add#define MIRYOKU_LAYERMAPPING_GAME MIRYOKU_MAPPING
.For Miryoku ZMK and Miryoku KMK,
miryoku_layer_list.h
also contains a#define
for each layer. These lines must also be copied, a new entry added, and all entries renumbered.Remove Layer
Copy the layer list in the same way as when adding a layer, then remove the entry for the layer to be removed.
Layers are referenced from other layers, so to avoid having to modify other layers, add a
#define
to remap the missing layer onto another layer. E.g. When removing the Fun layer, add#define U_FUN U_NUM
to remap all references to the Num layer instead.For Miryoku ZMK and Miryoku KMK, remove the
#define
for the removed layer and renumber all entries as when adding a layer, but keep the additional#define
that remaps the layer.Mapping
Miryoku QMK
To change the mapping for all layers, copy the mapping macro definition to
custom_config.h
, changeLAYOUT_miryoku
toMIRYOKU_MAPPING
, and edit as appropriate.E.g. to map the left hand top row outer pinkie column key on
crkbd
to Escape, copy the contents oflayouts/community/split_3x6_3/manna-harbour_miryoku/config.h
tocustom_config.h
, changeLAYOUT_miryoku
toMIRYOKU_MAPPING
, and change the firstXXX
in the macro definition toKC_ESC
.To change the mapping per layer, do as above, but change
LAYOUT_miryoku
toMIRYOKU_LAYERMAPPING_
plus layer name. E.g. for Base, change toMIRYOKU_LAYERMAPPING_BASE
.As mappings need to be specific to the keyboard, everything should be wrapped in
#if defined
/#endif
conditional on the automatically definedKEYBOARD_
plus keyboard name macro. E.g. to make the mapping specific to builds forcrkbd
use#if defined (KEYBOARD_crkbd)
/#endif
.Miryoku ZMK
To change the mapping for all layers, copy the mapping macro definition (everything inside the
#if defined
/#endif
conditional on theMIRYOKU_LAYOUTMAPPING_
plus layout name macro) tocustom_config.h
, and edit as appropriate.E.g. to map the left hand top row outer pinkie column key on
corne
to Escape, copy everything inside the#if !defined (MIRYOKU_LAYOUTMAPPING_CORNE)
/#endif
block frommiryoku/mapping/42/corne.h
tocustom_config.h
, and change the firstXXX
in the macro definition to&kp ESC
.To change the mapping per layer, do as above, but change
MIRYOKU_LAYOUTMAPPING_
plus layout name toMIRYOKU_LAYERMAPPING_
plus layer name. E.g. forcorne
and Base, changeMIRYOKU_LAYOUTMAPPING_CORNE
toMIRYOKU_LAYERMAPPING_BASE
.As per layer mappings need to be specific to the keyboard, they should be wrapped in
#if defined
/#endif
conditional on the automatically definedMIRYOKU_KEYBOARD_
plus keyboard name macro. E.g. forcorne
use#if defined (MIRYOKU_KEYBOARD_CORNE)
/#endif
. Note that the automatic macro is only available for workflow builds and will need to be manually added to the top ofcustom_config.h
for local builds, e.g. forcorne
use#define MIRYOKU_KEYBOARD_CORNE
.Miryoku KMonad
Edit the
defsrc
section. Also see #90.Miryoku KMK
To change the mapping for all layers, copy the mapping macro definition (everything inside the
#if defined
/#endif
conditional on theMIRYOKU_LAYOUTMAPPING_
plus layout name macro) tocustom_config.h
, and edit as appropriate.E.g. to map the left hand top row outer pinkie column key on
CRKBD
to Escape, copy everything inside the#if !defined (MIRYOKU_LAYOUTMAPPING_CRKBD)
/#endif
block frommiryoku/mapping/42/crkbd.h
tocustom_config.h
, and change the firstXXX
in the macro definition toKC.ESC
.To change the mapping per layer, do as above, but change
MIRYOKU_LAYOUTMAPPING_
plus layout name toMIRYOKU_LAYERMAPPING_
plus layer name. E.g. forCRKBD
and Base, changeMIRYOKU_LAYOUTMAPPING_CRKBD
toMIRYOKU_LAYERMAPPING_BASE
.As per layer mappings need to be specific to the keyboard, they should be wrapped in
#if defined
/#endif
conditional on the automatically definedKMK_KEYBOARD_
plus keyboard name macro. E.g. forCRKBD
use#if defined (KMK_KEYBOARD_CRKBD)
/#endif
.Miryoku Babel
Miryoku Babel can be used to modify, add, and remove layers for all implementations from a single source. To modify layers, edit the corresponding source tables. To add layers, add new source tables. To add or remove layers, edit the
layers
table, thelayer-body
source block, and themiryoku_layer_alternatives.h
source blocks (other than the first few lines, the contents of themiryoku_layer_alternatives.h
source blocks can be copied between implementations).Custom Hardware Support
Only the hardware support enabled at the keyboard level is included by default.
Miryoku QMK
For hardware support or other custom code, add to
rules.mk
,config.h
, andkeymap.c
in the keyboard'skeymaps/manna-harbour_miryoku/
directory. For keyboards supported via community layouts, first change to a keyboard keymap, e.g. forckrbd
, createkeyboards/crkbd/keymaps/manna-harbour_miryoku/
and copyconfig.h
andkeymap.c
fromlayouts/community/split_3x6_3/manna-harbour_miryoku/
tokeyboards/crkbd/keymaps/manna-harbour_miryoku/
.To copy from another keymap, copy the appropriate lines from
rules.mk
,config.h
, andkeymap.c
into the corresponding files in the keyboard'skeymaps/manna-harbour_miryoku/
directory. E.g. to copy RGB and OLED support from the defaultcrkbd
keymap, copykeyboards/crkbd/keymaps/default/rules.mk
tokeyboards/crkbd/keymaps/harbour_miryoku/rules.mk
, appendkeyboards/crkbd/keymaps/default/config.h
tokeyboards/crkbd/keymaps/harbour_miryoku/config.h
, and copykeyboards/crkbd/keymaps/default/keymap.c
tokeyboards/crkbd/keymaps/harbour_miryoku/keymap.c
and remove thekeymaps
array (i.e. this block).Miryoku ZMK
See Kconfig Configuration.
Miryoku KMK
See Installation.
Beta Was this translation helpful? Give feedback.
All reactions