Miryoku is an ergonomic, minimal, orthogonal, and universal keyboard layout. Miryoku Babel generates the layer data source files for Miryoku implementations from a single source.
C
Miryoku Babel
Miryoku is an ergonomic, minimal, orthogonal, and universal keyboard layout. Miryoku Babel generates the layer data source files for Miryoku implementations from a single source.
This document describes Miryoku Babel only. For Miryoku documentation, implementations, and discussions and support, see Miryoku.
Overview
Emacs is an extensible text editor. Org is an emacs mode for structured text. Babel is org’s ability to execute source code from within org documents. This org document uses babel to generate the layer data source files for Miryoku implementations.
See the Install Org and Tangle steps in .github/workflows/main.yml for example shell commands that can be run locally.
GitHub Actions Workflow
Initial Setup
Log in to GitHub, fork the Miryoku Babel repository, and enable workflows.
The Test workflow is not applicable when using the Build workflow and should be prevented from running on push by deleting the push line in .github/workflows/test.yml.
Tangle
Visit the Actions tab, select the Build workflow, select Run workflow, select the Branch if desired, activate Run workflow, select the Artifacts, and unzip the downloaded zip file.
Layer Tables
The layers are maintained in tables. U_NP indicates the key is not present and is used to fill in the table around the thumb keys.
Basic keycodes are entered without the KC_ prefix. Symbols can be entered as-is, except for ‘-’ (MINS), ‘.’ (DOT), ‘|’ (PIPE), and ‘”’ (DQUO). Empty cells are unused.
The base layer is maintained as separate tables for tap alphas, tap thumbs, and hold. Other layers are specified as a single hand including thumbs. Tables are combined to produce the keymap data for each layer.
Base
Tap
Alphas
Q
W
F
P
B
J
L
U
Y
’
A
R
S
T
G
M
N
E
I
O
Z
X
C
D
V
K
H
,
DOT
/
Thumbs
U_NP
U_NP
ESC
SPC
TAB
ENT
BSPC
DEL
U_NP
U_NP
Hold
RESET
RESET
LGUI
LALT
LCTL
LSFT
LSFT
LCTL
LALT
LGUI
BUTTON
ALGR
ALGR
BUTTON
U_NP
U_NP
MEDIA
NAV
MOUSE
SYM
NUM
FUN
U_NP
U_NP
Nav
U_RDO
U_PST
U_CPY
U_CUT
U_UND
CAPS
LEFT
DOWN
UP
RGHT
INS
HOME
PGDN
PGUP
END
ENT
BSPC
DEL
U_NP
U_NP
Mou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Mouse
WH_U
WH_L
MS_U
WH_R
WH_D
MS_L
MS_D
MS_R
U_UND
U_CUT
U_CPY
U_PST
U_RDO
U_NP
U_NP
BTN2
BTN3
BTN1
Media
RGB_SAI
RGB_HUI
VOLU
RGB_MOD
RGB_TOG
RGB_VAI
MPRV
VOLD
MNXT
OUT_AUTO
U_BTSEL0
U_BTSEL1
U_BTSEL2
U_BTSEL3
U_BTCLR
U_NP
U_NP
MUTE
MPLY
MSTP
Scripts and Data
Common
layers
BASE
BUTTON
NAV
MOUSE
MEDIA
NUM
SYM
FUN
symbol-names
Symbol, name, and shifted symbol mappings for use in tables.
`
GRV
~
TILD
”-”
MINS
_
UNDS
=
EQL
+
PLUS
[
LBRC
{
LCBR
]
RBRC
}
RCBR
\
BSLS
PIPE
PIPE
;
SCLN
:
COLN
‘
QUOT
DQUO
DQUO
,
COMM
<
LT
”.”
DOT
>
GT
/
SLSH
?
QUES
1
1
!
EXLM
2
2
@
AT
3
3
#
HASH
4
4
$
DLR
5
5
%
PERC
6
6
^
CIRC
7
7
&
AMPR
8
8
*
ASTR
9
9
(
LPRN
0
0
)
RPRN
mods
Modifiers usable in hold table. Need to have the same name for KC_ and _T
versions.
LSFT
LCTL
LALT
LGUI
ALGR
keycode-translation
Source keycode to implementation equivalent (source, QMK, ZMK, KMonad).
#pragma once
#include"miryoku_alternatives.h"#if !defined(MIRYOKU_LAYER_BASE)
#if defined (MIRYOKU_LAYERS_FLIP)
#if defined (MIRYOKU_ALPHAS_AZERTY)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_AZERTY_FLIP
#elif defined (MIRYOKU_ALPHAS_BEAKL15)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_BEAKL15_FLIP
#elif defined (MIRYOKU_ALPHAS_COLEMAK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_COLEMAK_FLIP
#elif defined (MIRYOKU_ALPHAS_COLEMAKDHK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_COLEMAKDHK_FLIP
#elif defined (MIRYOKU_ALPHAS_DVORAK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_DVORAK_FLIP
#elif defined (MIRYOKU_ALPHAS_HALMAK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_HALMAK_FLIP
#elif defined (MIRYOKU_ALPHAS_WORKMAN)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_WORKMAN_FLIP
#elif defined (MIRYOKU_ALPHAS_QWERTY)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_QWERTY_FLIP
#elif defined (MIRYOKU_ALPHAS_QWERTZ)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_QWERTZ_FLIP
#else#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_COLEMAKDH_FLIP
#endif#else#if defined (MIRYOKU_ALPHAS_AZERTY)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_AZERTY
#elif defined (MIRYOKU_ALPHAS_BEAKL15)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_BEAKL15
#elif defined (MIRYOKU_ALPHAS_COLEMAK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_COLEMAK
#elif defined (MIRYOKU_ALPHAS_COLEMAKDHK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_COLEMAKDHK
#elif defined (MIRYOKU_ALPHAS_DVORAK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_DVORAK
#elif defined (MIRYOKU_ALPHAS_HALMAK)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_HALMAK
#elif defined (MIRYOKU_ALPHAS_WORKMAN)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_WORKMAN
#elif defined (MIRYOKU_ALPHAS_QWERTY)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_QWERTY
#elif defined (MIRYOKU_ALPHAS_QWERTZ)
#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_QWERTZ
#else#defineMIRYOKU_LAYER_BASE MIRYOKU_ALTERNATIVES_BASE_COLEMAKDH
#endif#endif#endif#if !defined(MIRYOKU_LAYER_NAV)
#if defined (MIRYOKU_LAYERS_FLIP)
#if defined (MIRYOKU_NAV_INVERTEDT)
#defineMIRYOKU_LAYER_NAV MIRYOKU_ALTERNATIVES_NAV_INVERTEDT_FLIP
#else#defineMIRYOKU_LAYER_NAV MIRYOKU_ALTERNATIVES_NAV_FLIP
#endif#else#if defined (MIRYOKU_NAV_INVERTEDT)
#defineMIRYOKU_LAYER_NAV MIRYOKU_ALTERNATIVES_NAV_INVERTEDT
#elif defined (MIRYOKU_NAV_VI)
#defineMIRYOKU_LAYER_NAV MIRYOKU_ALTERNATIVES_NAV_VI
#else#defineMIRYOKU_LAYER_NAV MIRYOKU_ALTERNATIVES_NAV
#endif#endif#endif#if !defined(MIRYOKU_LAYER_MOUSE)
#if defined (MIRYOKU_LAYERS_FLIP)
#if defined (MIRYOKU_NAV_INVERTEDT)
#defineMIRYOKU_LAYER_MOUSE MIRYOKU_ALTERNATIVES_MOUSE_INVERTEDT_FLIP
#else#defineMIRYOKU_LAYER_MOUSE MIRYOKU_ALTERNATIVES_MOUSE_FLIP
#endif#else#if defined (MIRYOKU_NAV_INVERTEDT)
#defineMIRYOKU_LAYER_MOUSE MIRYOKU_ALTERNATIVES_MOUSE_INVERTEDT
#elif defined (MIRYOKU_NAV_VI)
#defineMIRYOKU_LAYER_MOUSE MIRYOKU_ALTERNATIVES_MOUSE_VI
#else#defineMIRYOKU_LAYER_MOUSE MIRYOKU_ALTERNATIVES_MOUSE
#endif#endif#endif#if !defined(MIRYOKU_LAYER_MEDIA)
#if defined (MIRYOKU_LAYERS_FLIP)
#if defined (MIRYOKU_NAV_INVERTEDT)
#defineMIRYOKU_LAYER_MEDIA MIRYOKU_ALTERNATIVES_MEDIA_INVERTEDT_FLIP
#else#defineMIRYOKU_LAYER_MEDIA MIRYOKU_ALTERNATIVES_MEDIA_FLIP
#endif#else#if defined (MIRYOKU_NAV_INVERTEDT)
#defineMIRYOKU_LAYER_MEDIA MIRYOKU_ALTERNATIVES_MEDIA_INVERTEDT
#elif defined (MIRYOKU_NAV_VI)
#defineMIRYOKU_LAYER_MEDIA MIRYOKU_ALTERNATIVES_MEDIA_VI
#else#defineMIRYOKU_LAYER_MEDIA MIRYOKU_ALTERNATIVES_MEDIA
#endif#endif#endif#if !defined(MIRYOKU_LAYER_NUM)
#if defined (MIRYOKU_LAYERS_FLIP)
#defineMIRYOKU_LAYER_NUM MIRYOKU_ALTERNATIVES_NUM_FLIP
#else#defineMIRYOKU_LAYER_NUM MIRYOKU_ALTERNATIVES_NUM
#endif#endif#if !defined(MIRYOKU_LAYER_SYM)
#if defined (MIRYOKU_LAYERS_FLIP)
#defineMIRYOKU_LAYER_SYM MIRYOKU_ALTERNATIVES_SYM_FLIP
#else#defineMIRYOKU_LAYER_SYM MIRYOKU_ALTERNATIVES_SYM
#endif#endif#if !defined(MIRYOKU_LAYER_FUN)
#if defined (MIRYOKU_LAYERS_FLIP)
#defineMIRYOKU_LAYER_FUN MIRYOKU_ALTERNATIVES_FUN_FLIP
#else#defineMIRYOKU_LAYER_FUN MIRYOKU_ALTERNATIVES_FUN
#endif#endif#if !defined(MIRYOKU_LAYER_BUTTON)
#defineMIRYOKU_LAYER_BUTTON MIRYOKU_ALTERNATIVES_BUTTON
#endif
Miryoku QMK
nonkc
Keycodes that match any of these prefixes will not have KC_ automatically
prepended.
U_
RGB_
OUT_
RESET
S(
C(
SCMD(
LCMD(
license-qmk
License for tangled QMK C source files.
// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.