Miryoku Customisation Documentation #85
Replies: 6 comments 11 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.
-
So I've been doing it wrong here and all that code should live in |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
Can you also add columns (e.g. 2 columns for 42 key corne) too if you just added them to custom_config.h, or do I need to specify that there are 12 columns somewhere else too? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a draft of the new Miryoku customisation documentation.
custom_config.h:custom_config.has 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.hcan 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.hshared by members of the community.In Miryoku QMK,
custom_config.his https://github.com/manna-harbour/miryoku_qmk/blob/miryoku/users/manna-harbour_miryoku/custom_config.h. In Miryoku ZMK,custom_config.his 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.his https://github.com/manna-harbour/miryoku_kmk/blob/main/src/custom_config.h.Layers
Layer data is defined in
miryoku_babel/miryoku_layer_alternatives.hand selected inmiryoku_babel/miryoku_layer_selection.hat build time depending on build options.Substitute Layer
Copy the layer definition to be modified from
miryoku_layer_alternatives.hintocustom_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_QWERTYblock (5 lines) frommiryoku_layer_alternatives.hintocustom_config.h, and changeMIRYOKU_ALTERNATIVES_BASE_QWERTYtoMIRYOKU_LAYER_BASE. For Miryoku QMK replaceKC_QUOTwithKC_SCLN. For Miryoku ZMK replaceSQTwithSEMI. For Miryoku KMonad replaceU_QUOTwith;. For Miryoku KMK replaceKC.QUOTwithKC.SCLN.Add Layer
Define the layer data in
custom_config.hin 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_LISTblock (11 lines) intocustom_config.hand 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.halso contains a#definefor 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
#defineto remap the missing layer onto another layer. E.g. When removing the Fun layer, add#define U_FUN U_NUMto remap all references to the Num layer instead.For Miryoku ZMK and Miryoku KMK, remove the
#definefor the removed layer and renumber all entries as when adding a layer, but keep the additional#definethat remaps the layer.Mapping
Miryoku QMK
To change the mapping for all layers, copy the mapping macro definition to
custom_config.h, changeLAYOUT_miryokutoMIRYOKU_MAPPING, and edit as appropriate.E.g. to map the left hand top row outer pinkie column key on
crkbdto Escape, copy the contents oflayouts/community/split_3x6_3/manna-harbour_miryoku/config.htocustom_config.h, changeLAYOUT_miryokutoMIRYOKU_MAPPING, and change the firstXXXin the macro definition toKC_ESC.To change the mapping per layer, do as above, but change
LAYOUT_miryokutoMIRYOKU_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/#endifconditional on the automatically definedKEYBOARD_plus keyboard name macro. E.g. to make the mapping specific to builds forcrkbduse#if defined (KEYBOARD_crkbd)/#endif.Miryoku ZMK
To change the mapping for all layers, copy the mapping macro definition (everything inside the
#if defined/#endifconditional 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
corneto Escape, copy everything inside the#if !defined (MIRYOKU_LAYOUTMAPPING_CORNE)/#endifblock frommiryoku/mapping/42/corne.htocustom_config.h, and change the firstXXXin 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. forcorneand Base, changeMIRYOKU_LAYOUTMAPPING_CORNEtoMIRYOKU_LAYERMAPPING_BASE.As per layer mappings need to be specific to the keyboard, they should be wrapped in
#if defined/#endifconditional on the automatically definedMIRYOKU_KEYBOARD_plus keyboard name macro. E.g. forcorneuse#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.hfor local builds, e.g. forcorneuse#define MIRYOKU_KEYBOARD_CORNE.Miryoku KMonad
Edit the
defsrcsection. Also see #90.Miryoku KMK
To change the mapping for all layers, copy the mapping macro definition (everything inside the
#if defined/#endifconditional 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
CRKBDto Escape, copy everything inside the#if !defined (MIRYOKU_LAYOUTMAPPING_CRKBD)/#endifblock frommiryoku/mapping/42/crkbd.htocustom_config.h, and change the firstXXXin 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. forCRKBDand Base, changeMIRYOKU_LAYOUTMAPPING_CRKBDtoMIRYOKU_LAYERMAPPING_BASE.As per layer mappings need to be specific to the keyboard, they should be wrapped in
#if defined/#endifconditional on the automatically definedKMK_KEYBOARD_plus keyboard name macro. E.g. forCRKBDuse#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
layerstable, thelayer-bodysource block, and themiryoku_layer_alternatives.hsource blocks (other than the first few lines, the contents of themiryoku_layer_alternatives.hsource 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.cin 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.handkeymap.cfromlayouts/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.cinto the corresponding files in the keyboard'skeymaps/manna-harbour_miryoku/directory. E.g. to copy RGB and OLED support from the defaultcrkbdkeymap, copykeyboards/crkbd/keymaps/default/rules.mktokeyboards/crkbd/keymaps/harbour_miryoku/rules.mk, appendkeyboards/crkbd/keymaps/default/config.htokeyboards/crkbd/keymaps/harbour_miryoku/config.h, and copykeyboards/crkbd/keymaps/default/keymap.ctokeyboards/crkbd/keymaps/harbour_miryoku/keymap.cand remove thekeymapsarray (i.e. this block).Miryoku ZMK
See Kconfig Configuration.
Miryoku KMK
See Installation.
Beta Was this translation helpful? Give feedback.
All reactions