Skip to content

Commit af51d24

Browse files
authored
Merge pull request #1 from maatthc/simplify
feat: Simplify config
2 parents c95612d + 1d2817b commit af51d24

19 files changed

Lines changed: 146 additions & 1882 deletions

File tree

README.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# My Piantor Miryoku layout for QMK
1+
# My QMK keyboard layout
2+
3+
Based on Miryoku Layout
24

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

36+
### Install old GCC 8.3.0
37+
Reduces size considerably (~1.5k):
38+
39+
`./install_avr_8.3.0.sh`
40+
export PATH=${HOME}/avr_toolchain/bin:$PATH
3441

3542
### Compile
36-
`qmk compile -kb beekeeb/piantor -km manna_harbour_miryoku`
43+
`qmk compile -kb beekeeb/piantor -km maat`
3744

3845
### Flash
39-
`qmk flash -kb beekeeb/piantor -km manna_harbour_miryoku`
46+
`qmk flash -kb beekeeb/piantor -km maat`
47+
48+
### Generates the clang compile_commands.json
49+
`qmk compile --compiledb -kb crkbd/rev1 -km maat`
4050

4151
### Check debug logs
4252
`qmk console`
4353

4454
### info
4555

46-
`qmk info -kb beekeeb/piantor -km manna_harbour_miryoku`
56+
`qmk info -kb beekeeb/piantor -km maat`
4757

4858
## Configuration
4959

50-
Details: ./users/manna_harbour_miryoku/readme.org
51-
52-
- users/manna_harbour_miryoku/custom_config.h
53-
- users/manna_harbour_miryoku/custom_rules.mk
54-
- keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/config.h
55-
- keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/keymap.c
60+
- users/maat/
61+
- keyboards/beekeeb/piantor/keymaps/maat/
5662

5763
### Typing Test
5864

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#pragma once
2+
3+
// PTH
4+
// https://github.com/jgandert/qmk_modules/blob/main/predictive_tap_hold/README.md
5+
// #define PTH_DISABLED
6+
#define TAPPING_TERM 0
7+
#define PTH_FAST_STREAK_TAP_ENABLE
8+
// #define PTH_DEBUG
9+
#define PTH_DONT_HOLD_INSTANTLY
10+
// PTH end
11+
12+
// App Companion
13+
// https://docs.qmk.fm/features/rawhid#usage
14+
// https://github.com/maatthc/qmk_layers_app_companion
15+
#define RAW_EPSIZE 32
16+
#define PAYLOAD_MARK 0x90
17+
#define PAYLOAD_BEGIN 24
18+
19+
#define RAW_USAGE_PAGE 0xFF60
20+
#define RAW_USAGE 0x61
21+
// App Companion end
22+
23+
// Do not Auto Shift special keys -_, =+, [{, ]}, ;:, '", ,<, .>, and /?
24+
// #define NO_AUTO_SHIFT_SPECIAL
25+
26+
// Do not Auto Shift numeric keys, zero through nine.
27+
// #define NO_AUTO_SHIFT_NUMERIC
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
// clang-format off
2+
#include QMK_KEYBOARD_H
3+
#include "print.h"
4+
#include "raw_hid.h"
5+
#include "keymap.h"
6+
7+
const uint16_t PROGMEM restore_window_size[] = {RWIN(KC_LEFT), RWIN(KC_RIGHT), COMBO_END};
8+
combo_t key_combos[] = {
9+
COMBO(restore_window_size, RWIN(KC_UP)),
10+
};
11+
12+
// Notifies the host of the layer change using raw HID
13+
// https://docs.qmk.fm/features/rawhid#usage
14+
//
15+
#ifdef RAW_ENABLE
16+
layer_state_t layer_state_set_user(layer_state_t state) {
17+
uint8_t hi_layer = get_highest_layer(state);
18+
#ifdef CONSOLE_ENABLE
19+
#include "print.h"
20+
uprintf("LAYER: Selected Layer: %d\n", hi_layer);
21+
#endif
22+
uint8_t response[RAW_EPSIZE];
23+
memset(response, 0x00, RAW_EPSIZE);
24+
response[PAYLOAD_BEGIN] = PAYLOAD_MARK;
25+
response[PAYLOAD_BEGIN + 1] = hi_layer;
26+
raw_hid_send(response, RAW_EPSIZE);
27+
return state;
28+
}
29+
#endif /* ifdef RAW_ENABLE */
30+
31+
// Predictive tap hold: https://github.com/jgandert/qmk_modules/tree/main/predictive_tap_hold
32+
const uint8_t pth_side_layout[MATRIX_ROWS][MATRIX_COLS] PROGMEM = LAYOUT_split_3x6_3(
33+
PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R,
34+
PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R,
35+
PTH_L, PTH_L, PTH_L, PTH_L, PTH_L,PTH_L, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R, PTH_R,
36+
PTH_L, PTH_L, PTH_L, PTH_R, PTH_R, PTH_R
37+
);
38+
39+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
40+
[L_BASE]=LAYER(LAYER_BASE),
41+
[L_MEDIA]=LAYER(LAYER_MEDIA),
42+
[L_NAV]=LAYER(LAYER_NAV),
43+
[L_NUM]=LAYER(LAYER_NUM),
44+
[L_SYM]=LAYER(LAYER_SYM),
45+
[L_FUN]=LAYER(LAYER_FUN),
46+
};
47+

keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/keymap.json renamed to keyboards/beekeeb/piantor/keymaps/maat/keymap.json

File renamed without changes.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# https://docs.qmk.fm/features/combo
2+
COMBO_ENABLE = yes
3+
4+
# Audio control and System control
5+
EXTRAKEY_ENABLE = yes
6+
7+
AUTO_SHIFT_ENABLE = yes
8+
MOUSEKEY_ENABLE = yes
9+
10+
# https://docs.qmk.fm/features/tap_dance
11+
TAP_DANCE_ENABLE = no
12+
13+
CAPS_WORD_ENABLE = yes
14+
15+
# Required https://docs.qmk.fm/features/key_overrides
16+
KEY_OVERRIDE_ENABLE = no
17+
18+
# https://docs.qmk.fm/tap_hold#dynamic-tapping-term
19+
DYNAMIC_TAPPING_TERM_ENABLE = no
20+
21+
# CONSOLE_ENABLE = yes
22+
# KEYCODE_STRING_ENABLE = yes
23+
24+
RAW_ENABLE = yes

keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/config.h

Lines changed: 0 additions & 21 deletions
This file was deleted.

keyboards/beekeeb/piantor/keymaps/manna_harbour_miryoku/keymap.c

Lines changed: 0 additions & 35 deletions
This file was deleted.

qmk.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"userspace_version": "1.1",
3-
"build_targets": [
4-
["beekeeb/piantor", "manna_harbour_miryoku"]
5-
]
6-
}
3+
"build_targets": [["beekeeb/piantor", "maat"]]
4+
}
5+

users/manna_harbour_miryoku/custom_config.h renamed to users/maat/keymap.h

Lines changed: 29 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,14 @@
1-
// Copyright 2022 Manna Harbour
2-
// https://github.com/manna-harbour/miryoku
3-
4-
// 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/>.
5-
1+
// clang-format off
62
#pragma once
73

8-
// PTH
9-
// https://github.com/jgandert/qmk_modules/blob/main/predictive_tap_hold/README.md
10-
// #define PTH_DISABLED
11-
12-
#define TAPPING_TERM 0
13-
14-
#define PTH_FAST_STREAK_TAP_ENABLE
15-
// #define PTH_DEBUG
16-
#define PTH_DONT_HOLD_INSTANTLY
17-
// PTH end
18-
19-
// App Companion
20-
// https://docs.qmk.fm/features/rawhid#usage
21-
// https://github.com/maatthc/qmk_layers_app_companion
22-
#define RAW_EPSIZE 32
23-
#define PAYLOAD_MARK 0x90
24-
#define PAYLOAD_BEGIN 24
25-
26-
#define RAW_USAGE_PAGE 0xFF60
27-
#define RAW_USAGE 0x61
28-
// App Companion end
29-
30-
31-
// This is the number of combos you have defined in your keymap
32-
#define COMBO_COUNT 1
4+
#define LAYER(...) MAPPING(__VA_ARGS__)
5+
#define U_NA KC_NO
6+
#define U_NP KC_NO
7+
#define U_NU KC_NO
338

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

37-
// Do not Auto Shift numeric keys, zero through nine.
38-
//#define NO_AUTO_SHIFT_NUMERIC
39-
40-
#define MIRYOKU_MAPPING( \
11+
#define MAPPING( \
4112
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, \
4213
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, \
4314
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, \
@@ -50,28 +21,45 @@ RSG(KC_LEFT), K20, K21, K22, K23, K24, K25, K26, K27, K28, K29,
5021
K32, K33, K34, K35, K36, K37 \
5122
)
5223

53-
#define MIRYOKU_LAYER_BASE \
24+
#define LAYER_BASE \
5425
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \
5526
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, \
5627
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH,\
57-
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
28+
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
5829

5930

60-
#define MIRYOKU_LAYER_MEDIA \
31+
#define LAYER_MEDIA \
6132
U_NU, KC_BRID, KC_BRIU, QK_BACKLIGHT_STEP, U_NU, QK_BOOT, U_NA, U_NA, U_NA, U_NA, \
6233
KC_MPRV, KC_VOLD, KC_VOLU, KC_MNXT, U_NU, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, \
6334
RM_NEXT, RM_HUEU, RM_SATU, RM_SATD, RM_TOGG, U_NA, U_NA, U_NA, U_NA, U_NA, \
6435
U_NP, U_NP, KC_MUTE, KC_MPLY, KC_MSTP, U_NA, U_NA, U_NA, U_NP, U_NP
6536

66-
#define MIRYOKU_LAYER_NUM \
37+
38+
#define LAYER_NUM \
6739
U_NA, U_NA, U_NA, U_NA, U_NA, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC, \
6840
KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_SCLN, KC_4, KC_5, KC_6, KC_EQL, \
6941
U_NA, U_NA, U_NA, U_NA, U_NA, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS, \
7042
U_NP, U_NP, U_NA, U_NA, U_NA, KC_MINS, KC_0, KC_DOT, U_NP, U_NP
7143

72-
#define MIRYOKU_LAYER_FUN \
44+
45+
#define LAYER_FUN \
7346
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, U_NA, U_NA, U_NA, U_NA, U_NA, \
7447
KC_F11, KC_F4, KC_F5, KC_F6, KC_SCRL, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, \
7548
KC_F10, KC_F1, KC_F2, KC_F3, KC_PAUS, U_NA, U_NA, U_NA, U_NA, U_NA, \
7649
U_NP, U_NP, KC_APP, KC_SPC, KC_LGUI, U_NA, U_NA, U_NA, U_NP, U_NP
7750

51+
52+
#define LAYER_SYM \
53+
KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR, U_NA, U_NA, U_NA, U_NA, U_NA, \
54+
KC_COLN, KC_DLR, KC_PERC, KC_CIRC, KC_PLUS, U_NA, KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, \
55+
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_PIPE, U_NA, U_NA, U_NA, U_NA, U_NA, \
56+
U_NP, U_NP, KC_LPRN, KC_RPRN, KC_UNDS, U_NA, U_NA, U_NA, U_NP, U_NP
57+
58+
59+
#define LAYER_NAV \
60+
U_NA, U_NA, U_NA, U_NA, U_NA, KC_AGIN, KC_PSTE, KC_COPY, KC_CUT, KC_UNDO, \
61+
KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, U_NA, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, CW_TOGG, \
62+
U_NA, U_NA, U_NA, U_NA, U_NA, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, \
63+
U_NP, U_NP, U_NA, U_NA, U_NA, KC_ENT, KC_BSPC, KC_DEL, U_NP, U_NP
64+
65+

users/manna_harbour_miryoku/config.h

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)