From 65f8da3034c0bc854aa23e0b8e78cbfc8a14ff19 Mon Sep 17 00:00:00 2001 From: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Date: Sun, 4 Jul 2021 02:09:02 +1000 Subject: [Keymap] Update Miryoku (#13307) Fix reddit link Duplicate open parenthesis next to close parenthesis on NSSL Add customisation instructions Add lily58 Add gergo Co-authored-by: Jonathan Dayton Clean up LAYOUT macro formatting Add alternative vi-style navigation layout Add kyria Add minidox Change order of keyboards Add iris Expand TOC Re-order userspace subheadings Add atreus Add customisation section Add split_3x5_3 and split_3x6_3 layouts Add for_science Fix wrong paths in keyboard config.h and keymap.c headings Fix keyboard ordering Fix blank lines around headings Add compatibility with new org-mode version. Remove keyboards/crkbd now covered by layouts/split_3x6_3 Add Halmak Alphabetise alternative alpha arrangements Move build options out of base layer alphas headings Add list of keyboards supporting split_3x5_3 layout Enable Auto Shift and Retro Shift Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping) Change kyria thumb key mapping Add planck_mit layout Remove alternative bottom row support from ortho_4x12 Remove minidox - Covered by split_3x5_3 layout Add moonlander Remove KC_ macros Add 60_ansi layout Add ortho_5x15 layout Closes manna-harbour/qmk_firmware#5 Co-authored-by: Rob Fix typo (manna-harbour/qmk_firmware#7) Author: sonnius Add redox_w (manna-harbour/qmk_firmware#8) Author: Brian Romanko Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Add AUTO_SHIFT_NO_SETUP to reduce firmware size Update image paths Add instructions to checkout development branch Add kyria extended thumbs option, change default, add KLE Change clipboard keys - Change order to be mirror of windows bindings - Change default to use CUA bindings for Cut, Copy, and Paste, and Fun Cluster bindings for Undo and Redo - Add alternative bindings - Fun Cluster (original miryoku bindings) - Mac - Windows - Change prefix for local macros from X_ to U_ Disable Retro Shift, enable Auto Shift for non-alphas Revert "Add Retro Shift (Auto Shift for Tap Hold via Retro Tapping)" Add Experimental Features section Update miryoku image link Update cover image link Add dactyl_manuform/4x5 Add cutomisation examples Add https to remote example Fix dactyl_manuform/4x5 subset mapping Add extended thumbs to ortho_4x12 Update Colemak Mod-DH naming Closes manna-harbour/qmk_firmware#13 Add dactyl_manuform/5x6 Resolves manna-harbour/qmk_firmware#14 Co-authored-by: Sebastian Morales Add note on FORCE_LAYOUT - Needed to use EXTENDED_THUMBS on planck Add parent directories to keyboard headings and re-order Add keyboardio/atreus Resolves manna-harbour/qmk_firmware#15 Add torn Resolves manna-harbour/qmk_firmware#16 Author: Brian Romanko Co-authored-by: Manna Harbour <51143715+manna-harbour@users.noreply.github.com> Change map to zip - Adds support for python3, still compatible with python2. Resolves manna-harbour/qmk_firmware#10 Resolves manna-harbour/qmk_firmware#19 Co-authored-by: Ori Add python-version Add sofle Add ergotravel Add ortho_5x12 Add ortho_4x10 Add :main no header argument to C code blocks resolves manna-harbour/qmk_firmware#11 resolves manna-harbour/qmk_firmware#12 Co-authored-by: RubioJr9 Add flipped layers and inverted-T nav alternative layouts - Separate tap_table into alphas_table and thumbs_table - Add mode argument to table-layout-half - Remove layer_name - Rename layers - Add mods and clipboard to MBO and mirror - Add MIRYOKU_LAYERS=FLIP - Add MIRYOKU_NAV=INVERTEDT Add layer diagrams Update contact section Update links for Bilateral Combinations and Retro Shift Add description and no reverse angle option to 60_ansi layout Update list of keyboards supporting community layouts - and example build command lines Change moonlander thumb keys Update list of keyboards supporting split_3x5_3 Add license to tangled C source files --- users/manna-harbour_miryoku/config.h | 12 +- .../manna-harbour_miryoku/manna-harbour_miryoku.c | 247 +- .../manna-harbour_miryoku/manna-harbour_miryoku.h | 44 +- users/manna-harbour_miryoku/miryoku.org | 2435 +++++++++++++++++--- users/manna-harbour_miryoku/rules.mk | 24 +- 5 files changed, 2342 insertions(+), 420 deletions(-) (limited to 'users') diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index db16088158..38d363299e 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -1,8 +1,13 @@ +// Copyright 2019 Manna Harbour +// https://github.com/manna-harbour/miryoku // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- +// 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 . + #pragma once -// default but important +// default but used in macros +#undef TAPPING_TERM #define TAPPING_TERM 200 // Prevent normal rollover on alphas from accidentally triggering mods. @@ -11,6 +16,11 @@ // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. #define TAPPING_FORCE_HOLD +// Auto Shift +#define NO_AUTO_SHIFT_ALPHA +#define AUTO_SHIFT_TIMEOUT TAPPING_TERM +#define AUTO_SHIFT_NO_SETUP + // Recommended for heavy chording. #define QMK_KEYS_PER_SCAN 4 diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.c b/users/manna-harbour_miryoku/manna-harbour_miryoku.c index 9bc0f17e63..ff25b77934 100644 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.c +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.c @@ -1,91 +1,216 @@ +// Copyright 2019 Manna Harbour +// https://github.com/manna-harbour/miryoku // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- +// 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 . + #include "manna-harbour_miryoku.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -#if defined MIRYOKU_ALPHAS_QWERTY +#if defined MIRYOKU_LAYERS_FLIP [BASE] = LAYOUT_miryoku( + #if defined MIRYOKU_ALPHAS_COLEMAK + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_D, KC_H, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_COLEMAKDHK + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_K, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_DVORAK + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + LGUI_T(KC_A), LALT_T(KC_O), LCTL_T(KC_E), LSFT_T(KC_U), KC_I, KC_D, LSFT_T(KC_H), LCTL_T(KC_T), LALT_T(KC_N), LGUI_T(KC_S), + KC_SLSH, ALGR_T(KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, ALGR_T(KC_V), KC_Z, + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_HALMAK + KC_W, KC_L, KC_R, KC_B, KC_Z, KC_QUOT, KC_Q, KC_U, KC_D, KC_J, + LGUI_T(KC_S), LALT_T(KC_H), LCTL_T(KC_N), LSFT_T(KC_T), KC_COMM, KC_DOT, LSFT_T(KC_A), LCTL_T(KC_E), LALT_T(KC_O), LGUI_T(KC_I), + KC_F, ALGR_T(KC_M), KC_V, KC_C, KC_SLSH, KC_G, KC_P, KC_X, ALGR_T(KC_K), KC_Y, + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_WORKMAN + KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_H), LSFT_T(KC_T), KC_G, KC_Y, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_O), LGUI_T(KC_I), + KC_Z, ALGR_T(KC_X), KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_QWERTY KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, LSFT_T(KC_J), LCTL_T(KC_K), LALT_T(KC_L), LGUI_T(KC_QUOT), KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #else + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, + LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), + KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + U_NP, U_NP, LT(FUN, KC_DEL), LT(NUM, KC_BSPC), LT(SYM, KC_ENT), LT(MOUSE, KC_TAB), LT(NAV, KC_SPC), LT(MEDIA, KC_ESC), U_NP, U_NP + #endif ), -#elif defined MIRYOKU_ALPHAS_DVORAK - [BASE] = LAYOUT_miryoku( - KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, - LGUI_T(KC_A), LALT_T(KC_O), LCTL_T(KC_E), LSFT_T(KC_U), KC_I, KC_D, LSFT_T(KC_H), LCTL_T(KC_T), LALT_T(KC_N), LGUI_T(KC_S), - KC_SLSH, ALGR_T(KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, ALGR_T(KC_V), KC_Z, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + #if defined MIRYOKU_NAV_INVERTEDT + [NAV] = LAYOUT_miryoku( + KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS, U_NA, U_NA, U_NA, U_NA, RESET, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_DEL, KC_BSPC, KC_ENT, U_NA, U_NA, U_NA, U_NP, U_NP + ), + [MOUSE] = LAYOUT_miryoku( + KC_WH_U, KC_WH_L, KC_MS_U, KC_WH_R, U_NU, U_NA, U_NA, U_NA, U_NA, RESET, + KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, U_NU, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_BTN2, KC_BTN3, KC_BTN1, U_NA, U_NA, U_NA, U_NP, U_NP + ), + [MEDIA] = LAYOUT_miryoku( + U_NU, U_NU, KC_VOLU, U_NU, U_NU, U_NA, U_NA, U_NA, U_NA, RESET, + U_NU, KC_MPRV, KC_VOLD, KC_MNXT, U_NU, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_MUTE, KC_MPLY, KC_MSTP, U_NA, U_NA, U_NA, U_NP, U_NP + ), + #else + [NAV] = LAYOUT_miryoku( + KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, U_NA, U_NA, U_NA, U_NA, RESET, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_DEL, KC_BSPC, KC_ENT, U_NA, U_NA, U_NA, U_NP, U_NP + ), + [MOUSE] = LAYOUT_miryoku( + KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, U_NU, U_NA, U_NA, U_NA, U_NA, RESET, + KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, U_NU, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + U_UND, U_CUT, U_CPY, U_PST, U_RDO, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_BTN2, KC_BTN3, KC_BTN1, U_NA, U_NA, U_NA, U_NP, U_NP + ), + [MEDIA] = LAYOUT_miryoku( + RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, U_NA, U_NA, U_NA, U_NA, RESET, + KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, U_NU, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + U_NU, U_NU, U_NU, U_NU, U_NU, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_MUTE, KC_MPLY, KC_MSTP, U_NA, U_NA, U_NA, U_NP, U_NP + ), + #endif + [MBO] = LAYOUT_miryoku( + U_RDO, U_PST, U_CPY, U_CUT, U_UND, U_RDO, U_PST, U_CPY, U_CUT, U_UND, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_TRNS, KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + U_NP, U_NP, KC_BTN2, KC_BTN3, KC_BTN1, KC_BTN1, KC_BTN3, KC_BTN2, U_NP, U_NP + ), + [NUM] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_EQL, KC_4, KC_5, KC_6, KC_SCLN, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_BSLS, KC_1, KC_2, KC_3, KC_GRV, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_MINS, KC_0, KC_DOT, U_NP, U_NP ), -#elif defined MIRYOKU_ALPHAS_COLEMAK + [SYM] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_PLUS, KC_DLR, KC_PERC, KC_CIRC, KC_COLN, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_TILD, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_UNDS, KC_LPRN, KC_RPRN, U_NP, U_NP + ), + [FUN] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, KC_PSCR, KC_F7, KC_F8, KC_F9, KC_F12, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_SLCK, KC_F4, KC_F5, KC_F6, KC_F11, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_PAUS, KC_F1, KC_F2, KC_F3, KC_F10, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_TAB, KC_SPC, KC_APP, U_NP, U_NP + ) +, +#else [BASE] = LAYOUT_miryoku( + #if defined MIRYOKU_ALPHAS_COLEMAK KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_D, KC_H, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP - ), -#elif defined MIRYOKU_ALPHAS_COLEMAKDH - [BASE] = LAYOUT_miryoku( + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_COLEMAKDHK KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_K, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_M, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP - ), -#elif defined MIRYOKU_ALPHAS_WORKMAN - [BASE] = LAYOUT_miryoku( + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_DVORAK + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, + LGUI_T(KC_A), LALT_T(KC_O), LCTL_T(KC_E), LSFT_T(KC_U), KC_I, KC_D, LSFT_T(KC_H), LCTL_T(KC_T), LALT_T(KC_N), LGUI_T(KC_S), + KC_SLSH, ALGR_T(KC_Q), KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, ALGR_T(KC_V), KC_Z, + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_HALMAK + KC_W, KC_L, KC_R, KC_B, KC_Z, KC_QUOT, KC_Q, KC_U, KC_D, KC_J, + LGUI_T(KC_S), LALT_T(KC_H), LCTL_T(KC_N), LSFT_T(KC_T), KC_COMM, KC_DOT, LSFT_T(KC_A), LCTL_T(KC_E), LALT_T(KC_O), LGUI_T(KC_I), + KC_F, ALGR_T(KC_M), KC_V, KC_C, KC_SLSH, KC_G, KC_P, KC_X, ALGR_T(KC_K), KC_Y, + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_WORKMAN KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_H), LSFT_T(KC_T), KC_G, KC_Y, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_O), LGUI_T(KC_I), KC_Z, ALGR_T(KC_X), KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP - ), -#else - [BASE] = LAYOUT_miryoku( + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #elif defined MIRYOKU_ALPHAS_QWERTY + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + LGUI_T(KC_A), LALT_T(KC_S), LCTL_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, LSFT_T(KC_J), LCTL_T(KC_K), LALT_T(KC_L), LGUI_T(KC_QUOT), + KC_Z, ALGR_T(KC_X), KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #else KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, - KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP + U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP + #endif ), -#endif - [NAVR] = LAYOUT_miryoku( - KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_AGIN, KC_UNDO, KC_CUT, KC_COPY, KC_PSTE, - KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_INS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_ENT, KC_BSPC, KC_DEL, KC_NP, KC_NP - ), - [MOUR] = LAYOUT_miryoku( - KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, - KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, - KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP + #if defined MIRYOKU_NAV_VI + [NAV] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_CAPS, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_ENT, KC_BSPC, KC_DEL, U_NP, U_NP + ), + [MOUSE] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, U_NU, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, U_NU, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_BTN1, KC_BTN3, KC_BTN2, U_NP, U_NP + ), + [MEDIA] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, U_NU, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, U_NU, U_NU, U_NU, U_NU, U_NU, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_MSTP, KC_MPLY, KC_MUTE, U_NP, U_NP + ), + #else + [NAV] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, KC_INS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_ENT, KC_BSPC, KC_DEL, U_NP, U_NP + ), + [MOUSE] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, U_RDO, U_PST, U_CPY, U_CUT, U_UND, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, U_NU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, U_NU, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_BTN1, KC_BTN3, KC_BTN2, U_NP, U_NP ), + [MEDIA] = LAYOUT_miryoku( + RESET, U_NA, U_NA, U_NA, U_NA, RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, U_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, + U_NA, KC_ALGR, U_NA, U_NA, U_NA, U_NU, U_NU, U_NU, U_NU, U_NU, + U_NP, U_NP, U_NA, U_NA, U_NA, KC_MSTP, KC_MPLY, KC_MUTE, U_NP, U_NP + ), + #endif [MBO] = LAYOUT_miryoku( KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_NP, KC_NP, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN3, KC_BTN2, KC_NP, KC_NP - ), - [MEDR] = LAYOUT_miryoku( - KC_RST, KC_NA, KC_NA, KC_NA, KC_NA, KC_TOG, KC_MOD, KC_HUI, KC_SAI, KC_VAI, - KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_NA, KC_NU, KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, - KC_NA, KC_ALGR, KC_NA, KC_NA, KC_NA, KC_NU, KC_NU, KC_NU, KC_NU, KC_NU, - KC_NP, KC_NP, KC_NA, KC_NA, KC_NA, KC_MSTP, KC_MPLY, KC_MUTE, KC_NP, KC_NP - ), - [FUNL] = LAYOUT_miryoku( - KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, - KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, - KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, KC_NA, KC_NA, KC_NA, KC_ALGR, KC_NA, - KC_NP, KC_NP, KC_APP, KC_SPC, KC_TAB, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP - ), - [NSL] = LAYOUT_miryoku( - KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, - KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, - KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NA, KC_NA, KC_NA, KC_ALGR, KC_NA, - KC_NP, KC_NP, KC_DOT, KC_0, KC_MINS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP - ), - [NSSL] = LAYOUT_miryoku( - KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, - KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, KC_NA, KC_NA, KC_NA, KC_ALGR, KC_NA, - KC_NP, KC_NP, KC_GT, KC_RPRN, KC_UNDS, KC_NA, KC_NA, KC_NA, KC_NP, KC_NP + KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, KC_TRNS, KC_TRNS, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + U_RDO, U_PST, U_CPY, U_CUT, U_UND, U_RDO, U_PST, U_CPY, U_CUT, U_UND, + U_NP, U_NP, KC_BTN2, KC_BTN3, KC_BTN1, KC_BTN1, KC_BTN3, KC_BTN2, U_NP, U_NP + ), + [NUM] = LAYOUT_miryoku( + KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, U_NA, U_NA, U_NA, U_NA, RESET, + KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_DOT, KC_0, KC_MINS, U_NA, U_NA, U_NA, U_NP, U_NP + ), + [SYM] = LAYOUT_miryoku( + KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, U_NA, U_NA, U_NA, U_NA, RESET, + KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_LPRN, KC_RPRN, KC_UNDS, U_NA, U_NA, U_NA, U_NP, U_NP + ), + [FUN] = LAYOUT_miryoku( + KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, U_NA, U_NA, U_NA, U_NA, RESET, + KC_F11, KC_F4, KC_F5, KC_F6, KC_SLCK, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, + KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, U_NA, U_NA, U_NA, KC_ALGR, U_NA, + U_NP, U_NP, KC_APP, KC_SPC, KC_TAB, U_NA, U_NA, U_NA, U_NP, U_NP ) +#endif }; diff --git a/users/manna-harbour_miryoku/manna-harbour_miryoku.h b/users/manna-harbour_miryoku/manna-harbour_miryoku.h index 5f543cb0f6..4d62c17079 100644 --- a/users/manna-harbour_miryoku/manna-harbour_miryoku.h +++ b/users/manna-harbour_miryoku/manna-harbour_miryoku.h @@ -1,19 +1,41 @@ +// Copyright 2019 Manna Harbour +// https://github.com/manna-harbour/miryoku // generated from users/manna-harbour_miryoku/miryoku.org -*- buffer-read-only: t -*- +// 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 . + #pragma once #include QMK_KEYBOARD_H -#define KC_NP KC_NO // key is not present -#define KC_NA KC_NO // present but not available for use -#define KC_NU KC_NO // available but not used +#define U_NP KC_NO // key is not present +#define U_NA KC_NO // present but not available for use +#define U_NU KC_NO // available but not used -// non-KC_ keycodes -#define KC_RST RESET -#define KC_TOG RGB_TOG -#define KC_MOD RGB_MOD -#define KC_HUI RGB_HUI -#define KC_SAI RGB_SAI -#define KC_VAI RGB_VAI +enum layers { BASE, MBO, MEDIA, NAV, MOUSE, SYM, NUM, FUN }; -enum layers { BASE, MBO, MEDR, NAVR, MOUR, NSSL, NSL, FUNL }; +#if defined MIRYOKU_CLIPBOARD_FUN +#define U_RDO KC_AGIN +#define U_PST KC_PSTE +#define U_CPY KC_COPY +#define U_CUT KC_CUT +#define U_UND KC_UNDO +#elif defined MIRYOKU_CLIPBOARD_MAC +#define U_RDO SCMD(KC_Z) +#define U_PST LCMD(KC_V) +#define U_CPY LCMD(KC_C) +#define U_CUT LCMD(KC_X) +#define U_UND LCMD(KC_Z) +#elif defined MIRYOKU_CLIPBOARD_WIN +#define U_RDO C(KC_Y) +#define U_PST C(KC_V) +#define U_CPY C(KC_C) +#define U_CUT C(KC_X) +#define U_UND C(KC_Z) +#else +#define U_RDO KC_AGIN +#define U_PST S(KC_INS) +#define U_CPY C(KC_INS) +#define U_CUT S(KC_DEL) +#define U_UND KC_UNDO +#endif diff --git a/users/manna-harbour_miryoku/miryoku.org b/users/manna-harbour_miryoku/miryoku.org index 011e43455a..2f6b1d5a88 100644 --- a/users/manna-harbour_miryoku/miryoku.org +++ b/users/manna-harbour_miryoku/miryoku.org @@ -1,8 +1,8 @@ # After making changes to code or tables call org-babel-tangle (C-c C-v t). -#+Title: Miryoku [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/miryoku-roa-32.png]] +#+Title: Miryoku [[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/logos/miryoku-roa-32.png]] -[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/kle-miryoku-keycodes.png]] +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/cover/miryoku-kle-cover.png]] Miryoku is an ergonomic, minimal, orthogonal layout for ergo or ortho keyboards, implemented as part of the QMK firmware. @@ -13,23 +13,83 @@ different physical layouts as a subset without code duplication using the QMK userspace feature and C macros. Please see the [[https://github.com/manna-harbour/qmk_firmware/blob/miryoku/users/manna-harbour_miryoku/miryoku.org][development branch]] for any [[https://github.com/qmk/qmk_firmware/compare/master...manna-harbour:miryoku][updates not yet merged into QMK]]. -Additional visualisations are provided outside QMK in the [[https://github.com/manna-harbour/miryoku/blob/master/README.org][Miryoku (Extras) repository]]. -* Contents :TOC: +To checkout the development branch in your existing QMK build environment: +#+BEGIN_SRC sh :tangle no +git remote add manna-harbour git@github.com:manna-harbour/qmk_firmware.git # ssh +git remote add manna-harbour https://github.com/manna-harbour/qmk_firmware.git # https +git fetch manna-harbour +git checkout --track manna-harbour/miryoku +#+END_SRC + +Additional implementations and visualisations are provided outside QMK in the +[[https://github.com/manna-harbour/miryoku/blob/master/README.org][Miryoku (Extras) repository]]. + + +* Contents :TOC_3: - [[#layout][Layout]] - [[#general-principles][General Principles]] - [[#details][Details]] - [[#layers][Layers]] + - [[#base][Base]] + - [[#nav][Nav]] + - [[#mouse][Mouse]] + - [[#mouse-buttons-overlay][Mouse Buttons Overlay]] + - [[#media][Media]] + - [[#num][Num]] + - [[#sym][Sym]] + - [[#fun][Fun]] + - [[#alternative-layouts][Alternative Layouts]] - [[#code-generation][Code Generation]] - [[#table-conversion-scripts][Table Conversion Scripts]] + - [[#table-layout-taphold][table-layout-taphold]] + - [[#table-layout-half][table-layout-half]] + - [[#table-layout-full][table-layout-full]] + - [[#table-enums][table-enums]] + - [[#table-keycode-mappings][table-keycode-mappings]] - [[#data][Data]] + - [[#symbol-names][symbol-names]] + - [[#mods][mods]] + - [[#nonkc][nonkc]] + - [[#header][header]] + - [[#license-qmk][license-qmk]] - [[#subset-mapping][Subset Mapping]] - [[#userspace][Userspace]] + - [[#usersmanna-harbour_miryokurulesmk][users/manna-harbour_miryoku/rules.mk]] + - [[#usersmanna-harbour_miryokuconfigh][users/manna-harbour_miryoku/config.h]] + - [[#usersmanna-harbour_miryokumanna-harbour_miryokuh][users/manna-harbour_miryoku/manna-harbour_miryoku.h]] + - [[#usersmanna-harbour_miryokumanna-harbour_miryokuc][users/manna-harbour_miryoku/manna-harbour_miryoku.c]] - [[#layouts][Layouts]] + - [[#60_ansi][60_ansi]] + - [[#ergodox][ergodox]] + - [[#ortho_4x10][ortho_4x10]] + - [[#ortho_4x12][ortho_4x12]] + - [[#ortho_5x12][ortho_5x12]] + - [[#ortho_5x15][ortho_5x15]] + - [[#planck_mit][planck_mit]] + - [[#split_3x5_3][split_3x5_3]] + - [[#split_3x6_3][split_3x6_3]] - [[#keyboards][Keyboards]] + - [[#atreus][atreus]] + - [[#ergotravel][ergotravel]] + - [[#for_science][for_science]] + - [[#gergo][gergo]] + - [[#handwireddactyl_manuform4x5][handwired/dactyl_manuform/4x5]] + - [[#handwireddactyl_manuform5x6][handwired/dactyl_manuform/5x6]] + - [[#keebioiris][keebio/iris]] + - [[#keyboardioatreus][keyboardio/atreus]] + - [[#kyria][kyria]] + - [[#lily58][lily58]] + - [[#moonlander][moonlander]] + - [[#redox_w][redox_w]] + - [[#sofle][sofle]] + - [[#torn][torn]] + - [[#customisation][Customisation]] + - [[#examples][Examples]] +- [[#experimental-features][Experimental Features]] + - [[#bilateral-combinations][Bilateral Combinations]] + - [[#retro-shift][Retro Shift]] - [[#documentation][Documentation]] - - [[#qmk][QMK]] - - [[#org-mode][Org Mode]] - [[#contact][Contact]] * Layout @@ -70,184 +130,465 @@ Additional visualisations are provided outside QMK in the [[https://github.com/m thumbs, but thumb tap keys are mirrored onto some layers for use with auto-repeat. On other layers thumb keys are redefined with important functions for that layer. +- Auto Shift for numbers and symbols. ** Layers -The layers are maintained in tables, with the thumb keys on the bottom row. NP -indicates the key is not present and is used to fill in the table around the -thumb keys. The grid arrangement of the tables does not imply a particular -physical layout. +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-reference.png]] + +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. The grid arrangement of +the tables does not imply a particular physical layout. + +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 for each layer. -Basic keycodes are entered without the KC_ prefix. Symbols can be entered as-is -(excepting '"' (DQUO) and '|' (PIPE)). Empty cells are unused. +Mods (and reset) will be available on sub layers on the same hand as the layer +change thumb key. Unknown names are considered to be layer names. -The base layer has both halves of the layout joined for convenience. Other -layers are specified as a single hand. -*** Base (BASE) +*** Base +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-base.png]] -The base layer is maintained as separate tap and hold tables and are combined -into the corresponding tap-hold keycodes for mods and layer change. RST and -mods will be available on sub layers on the same hand as the layer change thumb -key. Unknown names are considered to be layer names. +The base layer alphas are Colemak Mod-DH. Dot, comma, slash, and apostrophe are +included with the alphas. The primary, secondary, and tertiary thumb keys are +backspace, enter, delete on the right and space, tab, escape on the left. + +Alternative alpha arrangements are also available. -Base layer alphas are Colemak-DHm. Thumb keys are backspace, enter, delete on -the right and space, tab, escape on the left. Dot, comma and apostrophe are -included for prose, dot and slash for file and directory names. **** Tap -#+NAME: colemakdhm -| 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 | , | . | / | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | + +***** Alphas + +#+NAME: colemakdh +| 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 + +#+NAME: thumbs +| U_NP | U_NP | ESC | SPC | TAB | ENT | BSPC | DEL | U_NP | U_NP | **** Hold #+NAME: hold -| RST | | | | | | | | | RST | -| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | -| | ALGR | | | | | | | ALGR | | -| NP | NP | MEDR | NAVR | MOUR | NSSL | NSL | FUNL | NP | NP | +| RESET | | | | | | | | | RESET | +| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | +| | ALGR | | | | | | | ALGR | | +| U_NP | U_NP | MEDIA | NAV | MOUSE | SYM | NUM | FUN | U_NP | U_NP | -**** Alternative Base Layer Alphas +*** Nav -Alternative base layer alphas are provided. To select, append -e.g. ~MIRYOKU_ALPHAS=QWERTY~ to the make command line when building. +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-nav.png]] -***** QWERTY (QWERTY) -#+NAME: qwerty -| Q | W | E | R | T | Y | U | I | O | P | -| A | S | D | F | G | H | J | K | L | ' | -| Z | X | C | V | B | N | M | , | . | / | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | +Primary right-hand layer (left home thumb) is navigation and editing. Cursor +keys are on the home position, line and page movement below, clipboard above, +caps lock and insert on the inner column. Thumb keys are duplicated from the +base layer to avoid having to layer change mid edit and to enable auto-repeat. +Alternative clipboard key mappings and navigation key arrangements are +available. + +#+NAME: nav-r +| 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 | + + +*** Mouse + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-mouse.png]] + +Secondary right-hand layer is mouse emulation. Mouse movement mirrors cursor +navigation on home and wheel mirrors line / page movement below. Buttons are on +the thumbs (L, M, R). Mouse movement, click, and drag, with modifiers, can be +performed from the home position. Clipboard keys are duplicated from the Nav +layer. + +#+NAME: mouse-r +| U_RDO | U_PST | U_CPY | U_CUT | U_UND | +| | MS_L | MS_D | MS_U | MS_R | +| | WH_L | WH_D | WH_U | WH_R | +| BTN1 | BTN3 | BTN2 | U_NP | U_NP | + + +*** Mouse Buttons Overlay + +Available for automatic activation depending on keyboard hardware and +configuration. Not activated manually. + +#+NAME: mbo +| U_RDO | U_PST | U_CPY | U_CUT | U_UND | U_RDO | U_PST | U_CPY | U_CUT | U_UND | +| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | +| | | | | | | | | | | +| U_NP | U_NP | BTN2 | BTN3 | BTN1 | BTN1 | BTN3 | BTN2 | U_NP | U_NP | + + +*** Media + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-media.png]] + +Tertiary right-hand layer is media control, with volume up / down and next / +prev mirroring the navigation keys. Pause, stop and mute are on thumbs. RGB +control is on the top row (combine with shift to invert). Unused keys are +available for other related functions. + +#+NAME: media-r +| RGB_TOG | RGB_MOD | RGB_HUI | RGB_SAI | RGB_VAI | +| | MPRV | VOLD | VOLU | MNXT | +| | | | | | +| MSTP | MPLY | MUTE | U_NP | U_NP | + + +*** Num + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-num.png]] + +Primary left-hand layer (right home thumb) is numerals and symbols. Numerals +are in the standard numpad locations with symbols in the remaining positions. +Dot is duplicated from the base layer. + +#+NAME: num-l +| [ | 7 | 8 | 9 | ] | +| ; | 4 | 5 | 6 | = | +| ` | 1 | 2 | 3 | \ | +| U_NP | U_NP | DOT | 0 | MINS | + + +*** Sym + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-sym.png]] + +Secondary left-hand layer has shifted symbols in the same locations to reduce +chording when using mods with shifted symbols. Open parenthesis is duplicated +next to close parenthesis. + +#+NAME: sym-l +| { | & | * | ( | } | +| : | $ | % | ^ | + | +| ~ | ! | @ | # | PIPE | +| U_NP | U_NP | ( | ) | _ | + + +*** Fun + +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-fun.png]] + +Tertiary left-hand layer has function keys mirroring the numerals on the primary +layer with extras on the pinkie column, plus system keys on the inner column. +App (menu) is on the tertiary thumb key and other thumb keys are duplicated from +the base layer to enable auto-repeat. + + +#+NAME: fun-l +| F12 | F7 | F8 | F9 | PSCR | +| F11 | F4 | F5 | F6 | SLCK | +| F10 | F1 | F2 | F3 | PAUS | +| U_NP | U_NP | APP | SPC | TAB | + + +*** Alternative Layouts + +The defaults are recommended, but alternative layouts are provided to +accommodate existing muscle memory and platform differences. + + +**** Alphas + +To select, append the corresponding option to the ~make~ command line when +building, e.g. ~MIRYOKU_ALPHAS=QWERTY~. -***** Dvorak (DVORAK) -#+NAME: dvorak -| ' | , | . | P | Y | F | G | C | R | L | -| A | O | E | U | I | D | H | T | N | S | -| / | Q | J | K | X | B | M | W | V | Z | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | +***** Colemak + +~MIRYOKU_ALPHAS=COLEMAK~ -***** Colemak (COLEMAK) #+NAME: colemak | Q | W | F | P | G | J | L | U | Y | ' | | A | R | S | T | D | H | N | E | I | O | -| Z | X | C | V | B | K | M | , | . | / | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | +| Z | X | C | V | B | K | M | , | DOT | / | -***** Colemak Mod-DH (COLEMAKDH) -#+NAME: colemakdh +***** Colemak Mod-DHk + +~MIRYOKU_ALPHAS=COLEMAKDHK~ + +#+NAME: colemakdhk | Q | W | F | P | B | J | L | U | Y | ' | | A | R | S | T | G | K | N | E | I | O | -| Z | X | C | D | V | M | H | , | . | / | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | +| Z | X | C | D | V | M | H | , | DOT | / | + + +***** Dvorak + +~MIRYOKU_ALPHAS=DVORAK~ + +#+NAME: dvorak +| ' | , | DOT | P | Y | F | G | C | R | L | +| A | O | E | U | I | D | H | T | N | S | +| / | Q | J | K | X | B | M | W | V | Z | + + +***** Halmak + +~MIRYOKU_ALPHAS=HALMAK~ + +#+NAME: halmak +| W | L | R | B | Z | ' | Q | U | D | J | +| S | H | N | T | , | DOT | A | E | O | I | +| F | M | V | C | / | G | P | X | K | Y | + +***** Workman + +~MIRYOKU_ALPHAS=WORKMAN~ -***** Workman (WORKMAN) #+NAME: workman | Q | D | R | W | B | J | F | U | P | ' | | A | S | H | T | G | Y | N | E | O | I | -| Z | X | M | C | V | K | L | , | . | / | -| NP | NP | ESC | SPC | TAB | ENT | BSPC | DEL | NP | NP | +| Z | X | M | C | V | K | L | , | DOT | / | +***** QWERTY -*** Navigation (NAVR) +~MIRYOKU_ALPHAS=QWERTY~ -Primary right-hand layer (left home thumb) is navigation and editing. Cursor -keys are on the home position, line and page movement below, clipboard above, -caps and insert on the inner column. Thumb keys are duplicated from the base -layer to avoid having to layer change mid edit and to enable auto-repeat. +#+NAME: qwerty +| Q | W | E | R | T | Y | U | I | O | P | +| A | S | D | F | G | H | J | K | L | ' | +| Z | X | C | V | B | N | M | , | DOT | / | -#+NAME: navr -| AGIN | UNDO | CUT | COPY | PSTE | -| CAPS | LEFT | DOWN | UP | RGHT | -| INS | HOME | PGDN | PGUP | END | -| ENT | BSPC | DEL | NP | NP | +**** Nav -*** Mouse (MOUR) -Secondary RH layer is mouse emulation. Mouse movement mirrors cursor navigation -on home and wheel mirrors line / page movement below. Buttons are on the thumbs -(L, M, R). Mouse movement, click, and drag with modifiers can be performed from -the home position. Unused keys are available for other related functions. +***** vi-Style -#+NAME: mour -| | | | | | -| | MS_L | MS_D | MS_U | MS_R | -| | WH_L | WH_D | WH_U | WH_R | -| BTN1 | BTN3 | BTN2 | NP | NP | +To select, append ~MIRYOKU_NAV=VI~ to the ~make~ command line when building. +Not available with ~MIRYOKU_LAYERS=FLIP~. -**** Mouse Buttons Overlay (MBO) +****** Nav -Available for automatic activation depending on keyboard hardware and -configuration. Not activated manually. +#+NAME: nav-r-vi +| U_RDO | U_PST | U_CPY | U_CUT | U_UND | +| LEFT | DOWN | UP | RGHT | CAPS | +| HOME | PGDN | PGUP | END | INS | +| ENT | BSPC | DEL | U_NP | U_NP | -#+NAME: mbo -| | | | | | | | | | | -| | | | | | | | | | | -| | | | | | | | | | | -| NP | NP | | | | BTN1 | BTN3 | BTN2 | NP | NP | +****** Mouse -*** Media (MEDR) +#+NAME: mouse-r-vi +| U_RDO | U_PST | U_CPY | U_CUT | U_UND | +| MS_L | MS_D | MS_U | MS_R | | +| WH_L | WH_D | WH_U | WH_R | | +| BTN1 | BTN3 | BTN2 | U_NP | U_NP | -Tertiary RH layer is media control, with volume up / down and next / prev -mirroring the navigation keys. Pause, stop and mute are on thumbs. RGB control -is on the top row (combine with shift to invert). Unused keys are available for -other related functions. -#+NAME: medr -| TOG | MOD | HUI | SAI | VAI | -| | MPRV | VOLD | VOLU | MNXT | -| | | | | | -| MSTP | MPLY | MUTE | NP | NP | +****** Media +#+NAME: media-r-vi +| RGB_TOG | RGB_MOD | RGB_HUI | RGB_SAI | RGB_VAI | +| MPRV | VOLD | VOLU | MNXT | | +| | | | | | +| MSTP | MPLY | MUTE | U_NP | U_NP | -*** Numerals and Symbols (NSL) -Primary left-hand layer (right home thumb) is numerals and symbols. Numerals -are in the standard numpad locations with symbols in the remaining positions. -Dot is duplicated from the base layer for convenience. +***** Inverted-T -#+NAME: nsl -| [ | 7 | 8 | 9 | ] | -| ; | 4 | 5 | 6 | = | -| ` | 1 | 2 | 3 | \ | -| NP | NP | . | 0 | - | +[[https://raw.githubusercontent.com/manna-harbour/miryoku/master/data/layers/miryoku-kle-reference-flip-invertedt.png]] +To select, append ~MIRYOKU_NAV=INVERTEDT~ to the ~make~ command line when +building. Only available with ~MIRYOKU_LAYERS=FLIP~. -*** Shifted Numerals and Symbols (NSSL) -Secondary LH layer has shifted symbols in the same locations to reduce chording -when using mods with shifted symbols. Automatically generated from unshifted -table. +****** Nav +#+NAME: nav-l-invertedt +| PGUP | HOME | UP | END | INS | +| PGDN | LEFT | DOWN | RGHT | CAPS | +| U_UND | U_CUT | U_CPY | U_PST | U_RDO | +| U_NP | U_NP | DEL | BSPC | ENT | -*** Function and System (FUNL) -Tertiary LH layer has function keys mirroring the numerals on the primary layer -with extras on the pinkie column, plus system keys on the inner column. App -(menu) is on the tertiary thumb key and other thumb keys are duplicated from the -base layer to enable auto-repeat. +****** Mouse +#+NAME: mouse-l-invertedt +| 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 | -#+NAME: funl -| F12 | F7 | F8 | F9 | PSCR | -| F11 | F4 | F5 | F6 | SLCK | -| F10 | F1 | F2 | F3 | PAUS | -| NP | NP | APP | SPC | TAB | + +****** Media + +#+NAME: media-l-invertedt +| | | VOLU | | | +| | MPRV | VOLD | MNXT | | +| RGB_MOD | RGB_HUI | RGB_SAI | RGB_VAI | RGB_TOG | +| U_NP | U_NP | MUTE | MPLY | MSTP | + + +**** Clipboard + +Keycodes are translated according to the following tables. + +By default, the main clipboard keys (cut, copy, and paste) use the CUA bindings +and should work in general unix and windows applications, emacs, and terminal +emulators. The additional keys (undo, redo) usually require rebinding in the +application. + +To select, append the corresponding option to the ~make~ command line when +building, e.g. ~MIRYOKU_CLIPBOARD=WIN~. + + +***** Default + +#+NAME: clipboard +| U_RDO | AGIN | +| U_PST | S(KC_INS) | +| U_CPY | C(KC_INS) | +| U_CUT | S(KC_DEL) | +| U_UND | UNDO | + + +***** Fun Cluster + +~MIRYOKU_CLIPBOARD=FUN~ + +#+NAME: clipboard-fun +| U_RDO | AGIN | +| U_PST | PSTE | +| U_CPY | COPY | +| U_CUT | CUT | +| U_UND | UNDO | + + +***** Mac + +~MIRYOKU_CLIPBOARD=MAC~ + +#+NAME: clipboard-mac +| U_RDO | SCMD(KC_Z) | +| U_PST | LCMD(KC_V) | +| U_CPY | LCMD(KC_C) | +| U_CUT | LCMD(KC_X) | +| U_UND | LCMD(KC_Z) | + + +***** Windows + +~MIRYOKU_CLIPBOARD=WIN~ + +#+NAME: clipboard-win +| U_RDO | C(KC_Y) | +| U_PST | C(KC_V) | +| U_CPY | C(KC_C) | +| U_CUT | C(KC_X) | +| U_UND | C(KC_Z) | + + +**** Layers + + +***** Flip + +Flip base layer thumb keys and sub layers between right and left hands. + +To select, append ~MIRYOKU_LAYERS=FLIP~ to the ~make~ command line when building. + + +****** Thumbs + +#+NAME: thumbs-flip +| U_NP | U_NP | DEL | BSPC | ENT | TAB | SPC | ESC | U_NP | U_NP | + + +****** Hold + +#+NAME: hold-flip +| RESET | | | | | | | | | RESET | +| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | +| | ALGR | | | | | | | ALGR | | +| U_NP | U_NP | FUN | NUM | SYM | MOUSE | NAV | MEDIA | U_NP | U_NP | + + +****** Nav + +#+NAME: nav-l +| HOME | PGDN | PGUP | END | INS | +| LEFT | DOWN | UP | RGHT | CAPS | +| U_UND | U_CUT | U_CPY | U_PST | U_RDO | +| U_NP | U_NP | DEL | BSPC | ENT | + + +****** Mouse + +#+NAME: mouse-l +| WH_L | WH_D | WH_U | WH_R | | +| MS_L | MS_D | MS_U | MS_R | | +| U_UND | U_CUT | U_CPY | U_PST | U_RDO | +| U_NP | U_NP | BTN2 | BTN3 | BTN1 | + + +****** Mouse Buttons Overlay + +#+NAME: mbo-flip +| | | | | | | | | | | +| LGUI | LALT | LCTL | LSFT | | | LSFT | LCTL | LALT | LGUI | +| U_RDO | U_PST | U_CPY | U_CUT | U_UND | U_RDO | U_PST | U_CPY | U_CUT | U_UND | +| U_NP | U_NP | BTN2 | BTN3 | BTN1 | BTN1 | BTN3 | BTN2 | U_NP | U_NP | + + +****** Media + +#+NAME: media-l +| RGB_MOD | RGB_HUI | RGB_SAI | RGB_VAI | RGB_TOG | +| MPRV | VOLD | VOLU | MNXT | | +| | | | | | +| U_NP | U_NP | MUTE | MPLY | MSTP | + + +****** Num + +#+NAME: num-r +| [ | 7 | 8 | 9 | ] | +| = | 4 | 5 | 6 | ; | +| \ | 1 | 2 | 3 | ` | +| MINS | 0 | DOT | U_NP | U_NP | + + +****** Sym + +#+NAME: sym-r +| { | & | * | ( | } | +| + | $ | % | ^ | : | +| PIPE | ! | @ | # | ~ | +| _ | ( | ) | U_NP | U_NP | + + +****** Fun + +#+NAME: fun-r +| PSCR | F7 | F8 | F9 | F12 | +| SLCK | F4 | F5 | F6 | F11 | +| PAUS | F1 | F2 | F3 | F10 | +| TAB | SPC | APP | U_NP | U_NP | *** COMMENT Templates @@ -258,84 +599,87 @@ base layer to enable auto-repeat. | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -| NP | NP | | | | | | | NP | NP | +| U_NP | U_NP | | | | | | | U_NP | U_NP | Duplicate base layer tap keys on thumbs rather than trans to enable auto-repeat. -#+NAME: temr +#+NAME: tem-r | | | | | | |------+------+------+------+------| | | | | | | | | | | | | | | | | | | -| ENT | BSPC | DEL | NP | NP | +| ENT | BSPC | DEL | U_NP | U_NP | -#+NAME: teml +#+NAME: tem-l | | | | | | |------+------+------+------+------| | | | | | | | | | | | | | | | | | | -| NP | NP | ESC | SPC | TAB | +| U_NP | U_NP | ESC | SPC | TAB | * Code Generation + ** Table Conversion Scripts + *** table-layout-taphold Produce base layer from separate tap and hold tables. #+NAME: table-layout-taphold -#+BEGIN_SRC python :var layer_name="BASE" :var tap_table=colemakdhm :var hold_table=hold :var symbol_names_table=symbol-names :var mods_list=mods :tangle no :results verbatim +#+BEGIN_SRC python :var alphas_table=colemakdh :var thumbs_table=thumbs :var hold_table=hold :var symbol_names_table=symbol-names :var mods_table=mods :var nonkc_table=nonkc :tangle no :results verbatim width = 19 -mods_dict = dict.fromkeys(mods_list) +mods_dict = dict.fromkeys(mods_table[0]) +nonkc_tuple = tuple(nonkc_table[0]) symbol_names_dict = {} for symbol, name, shifted_symbol, shifted_name in symbol_names_table: symbol_names_dict[symbol] = name symbol_names_dict[shifted_symbol] = shifted_name -results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' -for tap_row, hold_row in map(None, tap_table, hold_table): +results = '' +for tap_row, hold_row in zip(alphas_table + thumbs_table, hold_table): results += ' ' - for tap, hold in map(None, tap_row, hold_row): + for tap, hold in zip(tap_row, hold_row): if tap == '': - code = 'NU' + code = 'U_NU' elif tap in symbol_names_dict: code = symbol_names_dict[tap] else: code = tap - code = 'KC_' + str(code) + if not str(code).startswith(nonkc_tuple): + code = 'KC_' + str(code) if hold in mods_dict: code = str(hold) + '_T(' + code + ')' - elif hold != '' and hold != 'NP' and hold != 'RST': + elif hold != '' and hold != 'U_NP' and hold != 'RESET': code = 'LT(' + str(hold) + ', ' + code + ')' results += (code + ', ').ljust(width) results = results.rstrip(' ') + '\n' -results = results.rstrip('\n, ') + '\n )' +results = results.rstrip('\n, ') return results #+END_SRC #+RESULTS: table-layout-taphold -: [BASE] = LAYOUT_miryoku( : KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, : LGUI_T(KC_A), LALT_T(KC_R), LCTL_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, LSFT_T(KC_N), LCTL_T(KC_E), LALT_T(KC_I), LGUI_T(KC_O), : KC_Z, ALGR_T(KC_X), KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, ALGR_T(KC_DOT), KC_SLSH, -: KC_NP, KC_NP, LT(MEDR, KC_ESC), LT(NAVR, KC_SPC), LT(MOUR, KC_TAB), LT(NSSL, KC_ENT), LT(NSL, KC_BSPC), LT(FUNL, KC_DEL), KC_NP, KC_NP -: ) +: U_NP, U_NP, LT(MEDIA, KC_ESC), LT(NAV, KC_SPC), LT(MOUSE, KC_TAB), LT(SYM, KC_ENT), LT(NUM, KC_BSPC), LT(FUN, KC_DEL), U_NP, U_NP *** table-layout-half Produce sub layers given layer name and corresponding table for single hand and -incorporating mods and reset from base layer. Layer names must end with R or L. -A layer with shifted symbols can also be generated. +incorporating mods and reset from base layer. Layer names must end with 'R' or +'L'. A layer with shifted symbols can also be generated. #+NAME: table-layout-half -#+BEGIN_SRC python :var hold_table=hold :var layer_name="NSL" :var half_table=nsl :var symbol_names_table=symbol-names :var mods_list=mods :var shift="false" :tangle no :results verbatim +#+BEGIN_SRC python :var hold_table=hold :var mode="r" :var half_table=nav-r :var symbol_names_table=symbol-names :var mods_table=mods :var nonkc_table=nonkc :var shift="false" :tangle no :results verbatim width = 9 -mods_dict = dict.fromkeys(mods_list) +mods_dict = dict.fromkeys(mods_table[0]) +nonkc_tuple = tuple(nonkc_table[0]) symbol_names_dict = {} shifted_symbol_names_dict = {} for symbol, name, shifted_symbol, shifted_name in symbol_names_table: @@ -343,42 +687,43 @@ for symbol, name, shifted_symbol, shifted_name in symbol_names_table: symbol_names_dict[shifted_symbol] = shifted_name shifted_symbol_names_dict[symbol] = shifted_name length = len(half_table[0]) -mode = layer_name[-1:].lower() -results = ' [' + layer_name + '] = LAYOUT_miryoku(\n' -for half_row, hold_row in map(None, half_table, hold_table): +results = '' +for half_row, hold_row in zip(half_table, hold_table): results += ' ' hold_row_l, hold_row_r = hold_row[:length], hold_row[length:] for lr, hold_row_lr in ('l', hold_row_l), ('r', hold_row_r): if lr == mode: for half in half_row: if half == '': - code = 'NU' + code = 'U_NU' elif shift == "true" and half in shifted_symbol_names_dict: code = shifted_symbol_names_dict[half] elif half in symbol_names_dict: code = symbol_names_dict[half] else: code = half - results += ('KC_' + str(code) + ', ').ljust(width) + if not str(code).startswith(nonkc_tuple): + code = 'KC_' + str(code) + results += (str(code) + ', ').ljust(width) else: for hold in hold_row_lr: - if hold == '' or hold != 'NP' and hold != 'RST' and hold not in mods_dict: - code = 'NA' + if hold == '' or hold != 'U_NP' and hold != 'RESET' and hold not in mods_dict: + code = 'U_NA' else: code = hold - results += ('KC_' + str(code) + ', ').ljust(width) + if not str(code).startswith(nonkc_tuple): + code = 'KC_' + str(code) + results += (str(code) + ', ').ljust(width) results = results.rstrip(' ') + '\n' -results = results.rstrip('\n, ') + '\n )' +results = results.rstrip('\n, ') return results #+END_SRC #+RESULTS: table-layout-half -: [NSL] = LAYOUT_miryoku( -: KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, KC_NA, KC_NA, KC_NA, KC_NA, KC_RST, -: KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, KC_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, -: KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, KC_NA, KC_NA, KC_NA, KC_NA, KC_NA, -: KC_NP, KC_NP, KC_D