Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# My Piantor Miryoku layout for QMK
# My QMK keyboard layout

Based on Miryoku Layout

- Don’t connect or disconnect the TRRS cable when the keyboard is powered. Always disconnect the USB cable first.
- Flash the firmware on both Raspberry Pi Picos.
Expand Down Expand Up @@ -31,28 +33,32 @@ Details here: https://github.com/maatthc/miryoku_qmk_app
- Set up QMK:
`cd ..; qmk setup`

### Install old GCC 8.3.0
Reduces size considerably (~1.5k):

`./install_avr_8.3.0.sh`
export PATH=${HOME}/avr_toolchain/bin:$PATH

### Compile
`qmk compile -kb beekeeb/piantor -km manna_harbour_miryoku`
`qmk compile -kb beekeeb/piantor -km maat`

### Flash
`qmk flash -kb beekeeb/piantor -km manna_harbour_miryoku`
`qmk flash -kb beekeeb/piantor -km maat`

### Generates the clang compile_commands.json
`qmk compile --compiledb -kb crkbd/rev1 -km maat`

### Check debug logs
`qmk console`

### info

`qmk info -kb beekeeb/piantor -km manna_harbour_miryoku`
`qmk info -kb beekeeb/piantor -km maat`

## Configuration

Details: ./users/manna_harbour_miryoku/readme.org

- users/manna_harbour_miryoku/custom_config.h
- users/manna_harbour_miryoku/custom_rules.mk
- keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/config.h
- keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/keymap.c
- users/maat/
- keyboards/beekeeb/piantor/keymaps/maat/

### Typing Test

Expand Down
27 changes: 27 additions & 0 deletions keyboards/beekeeb/piantor/keymaps/maat/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

// PTH
// https://github.com/jgandert/qmk_modules/blob/main/predictive_tap_hold/README.md
// #define PTH_DISABLED
#define TAPPING_TERM 0
#define PTH_FAST_STREAK_TAP_ENABLE
// #define PTH_DEBUG
#define PTH_DONT_HOLD_INSTANTLY
// PTH end

// App Companion
// https://docs.qmk.fm/features/rawhid#usage
// https://github.com/maatthc/qmk_layers_app_companion
#define RAW_EPSIZE 32
#define PAYLOAD_MARK 0x90
#define PAYLOAD_BEGIN 24

#define RAW_USAGE_PAGE 0xFF60
#define RAW_USAGE 0x61
// App Companion end

// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /?
// #define NO_AUTO_SHIFT_SPECIAL

// Do not Auto Shift numeric keys, zero through nine.
// #define NO_AUTO_SHIFT_NUMERIC
47 changes: 47 additions & 0 deletions keyboards/beekeeb/piantor/keymaps/maat/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// clang-format off
#include QMK_KEYBOARD_H
#include "print.h"
#include "raw_hid.h"
#include "keymap.h"

const uint16_t PROGMEM restore_window_size[] = {RWIN(KC_LEFT), RWIN(KC_RIGHT), COMBO_END};
combo_t key_combos[] = {
COMBO(restore_window_size, RWIN(KC_UP)),
};

// Notifies the host of the layer change using raw HID
// https://docs.qmk.fm/features/rawhid#usage
//
#ifdef RAW_ENABLE
layer_state_t layer_state_set_user(layer_state_t state) {
uint8_t hi_layer = get_highest_layer(state);
#ifdef CONSOLE_ENABLE
#include "print.h"
uprintf("LAYER: Selected Layer: %d\n", hi_layer);
#endif
uint8_t response[RAW_EPSIZE];
memset(response, 0x00, RAW_EPSIZE);
response[PAYLOAD_BEGIN] = PAYLOAD_MARK;
response[PAYLOAD_BEGIN + 1] = hi_layer;
raw_hid_send(response, RAW_EPSIZE);
return state;
}
#endif /* ifdef RAW_ENABLE */

// Predictive tap hold: https://github.com/jgandert/qmk_modules/tree/main/predictive_tap_hold
const uint8_t pth_side_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = LAYOUT_split_3x6_3(
PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R,
PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R,
PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R,
PTH_L, PTH_L, PTH_L, PTH_R, PTH_R, PTH_R
);

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[L_BASE]=LAYER(LAYER_BASE),
[L_MEDIA]=LAYER(LAYER_MEDIA),
[L_NAV]=LAYER(LAYER_NAV),
[L_NUM]=LAYER(LAYER_NUM),
[L_SYM]=LAYER(LAYER_SYM),
[L_FUN]=LAYER(LAYER_FUN),
};

24 changes: 24 additions & 0 deletions keyboards/beekeeb/piantor/keymaps/maat/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# https://docs.qmk.fm/features/combo
COMBO_ENABLE = yes

# Audio control and System control
EXTRAKEY_ENABLE = yes

AUTO_SHIFT_ENABLE = yes
MOUSEKEY_ENABLE = yes

# https://docs.qmk.fm/features/tap_dance
TAP_DANCE_ENABLE = no

CAPS_WORD_ENABLE = yes

# Required https://docs.qmk.fm/features/key_overrides
KEY_OVERRIDE_ENABLE = no

# https://docs.qmk.fm/tap_hold#dynamic-tapping-term
DYNAMIC_TAPPING_TERM_ENABLE = no

# CONSOLE_ENABLE = yes
# KEYCODE_STRING_ENABLE = yes

RAW_ENABLE = yes
21 changes: 0 additions & 21 deletions keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/config.h

This file was deleted.

35 changes: 0 additions & 35 deletions keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/keymap.c

This file was deleted.

7 changes: 3 additions & 4 deletions qmk.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"userspace_version": "1.1",
"build_targets": [
["beekeeb/piantor", "manna_harbour_miryoku"]
]
}
"build_targets": [["beekeeb/piantor", "maat"]]
}

70 changes: 29 additions & 41 deletions users/manna_harbour_miryoku/custom_config.h → users/maat/keymap.h
Original file line number Diff line number Diff line change
@@ -1,43 +1,14 @@
// Copyright 2022 Manna Harbour
// https://github.com/manna-harbour/miryoku

// 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/>.

// clang-format off
#pragma once

// PTH
// https://github.com/jgandert/qmk_modules/blob/main/predictive_tap_hold/README.md
// #define PTH_DISABLED

#define TAPPING_TERM 0

#define PTH_FAST_STREAK_TAP_ENABLE
// #define PTH_DEBUG
#define PTH_DONT_HOLD_INSTANTLY
// PTH end

// App Companion
// https://docs.qmk.fm/features/rawhid#usage
// https://github.com/maatthc/qmk_layers_app_companion
#define RAW_EPSIZE 32
#define PAYLOAD_MARK 0x90
#define PAYLOAD_BEGIN 24

#define RAW_USAGE_PAGE 0xFF60
#define RAW_USAGE 0x61
// App Companion end


// This is the number of combos you have defined in your keymap
#define COMBO_COUNT 1
#define LAYER(...) MAPPING(__VA_ARGS__)
#define U_NA KC_NO
#define U_NP KC_NO
#define U_NU KC_NO

// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /?
//#define NO_AUTO_SHIFT_SPECIAL
enum layers_num { L_BASE, L_NAV, L_MOUSE, L_MEDIA, L_NUM, L_SYM, L_FUN };

// Do not Auto Shift numeric keys, zero through nine.
//#define NO_AUTO_SHIFT_NUMERIC

#define MIRYOKU_MAPPING( \
#define MAPPING( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \
Expand All @@ -50,28 +21,45 @@ RSG(KC_LEFT), K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,
K32, K33, K34, K35, K36, K37 \
)

#define MIRYOKU_LAYER_BASE \
#define LAYER_BASE \
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
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), KC_QUOT, \
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH,\
U_NP, U_NP, LT(U_MOUSE,KC_ESC),LT(U_NAV,KC_BSPC), LT(U_NUM,KC_TAB),LT(U_SYM,KC_ENT), LT(U_MEDIA,KC_SPC), LT(U_FUN,KC_INS), U_NP, U_NP
U_NP, U_NP, LT(L_MOUSE,KC_ESC),LT(L_NAV,KC_BSPC), LT(L_NUM,KC_TAB),LT(L_SYM,KC_ENT), LT(L_FUN,KC_SPC), LT(L_MEDIA,KC_INS), U_NP, U_NP


#define MIRYOKU_LAYER_MEDIA \
#define LAYER_MEDIA \
U_NU, KC_BRID, KC_BRIU, QK_BACKLIGHT_STEP, U_NU, QK_BOOT, U_NA, U_NA, U_NA, U_NA, \
KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, U_NU, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, \
RM_NEXT, RM_HUEU, RM_SATU, RM_SATD, RM_TOGG, U_NA, U_NA, U_NA, U_NA, U_NA, \
U_NP, U_NP, KC_MUTE, KC_MPLY, KC_MSTP, U_NA, U_NA, U_NA, U_NP, U_NP

#define MIRYOKU_LAYER_NUM \

#define LAYER_NUM \
U_NA, 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_SCLN, KC_4, KC_5, KC_6, KC_EQL, \
U_NA, U_NA, U_NA, U_NA, U_NA, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \
U_NP, U_NP, U_NA, U_NA, U_NA, KC_MINS, KC_0, KC_DOT, U_NP, U_NP

#define MIRYOKU_LAYER_FUN \

#define LAYER_FUN \
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, U_NA, U_NA, U_NA, U_NA, U_NA, \
KC_F11, KC_F4, KC_F5, KC_F6, KC_SCRL, 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, U_NA, U_NA, \
U_NP, U_NP, KC_APP, KC_SPC, KC_LGUI, U_NA, U_NA, U_NA, U_NP, U_NP


#define LAYER_SYM \
KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, U_NA, U_NA, U_NA, U_NA, U_NA, \
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, U_NA, U_NA, \
U_NP, U_NP, KC_LPRN, KC_RPRN, KC_UNDS, U_NA, U_NA, U_NA, U_NP, U_NP


#define LAYER_NAV \
U_NA, U_NA, U_NA, U_NA, U_NA, KC_AGIN, KC_PSTE, KC_COPY, KC_CUT, KC_UNDO, \
KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CW_TOGG, \
U_NA, U_NA, 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


41 changes: 0 additions & 41 deletions users/manna_harbour_miryoku/config.h

This file was deleted.

21 changes: 0 additions & 21 deletions users/manna_harbour_miryoku/custom_rules.mk

This file was deleted.

Loading