use 32 keys and be happy

This commit is contained in:
Christoph Cullmann 2022-10-18 21:06:28 +02:00
parent 52d304ed3a
commit ecc2b462ca
4 changed files with 86 additions and 66 deletions

View file

@ -16,13 +16,22 @@
#pragma once
// include miryoku defaults
#include <users/manna-harbour_miryoku/config.h>
//
// improve home row modifiers via achoridion
//
// settings for home row modifiers
// details see https://precondition.github.io/home-row-mods
// configure the global tapping term
#define TAPPING_TERM 250
// Prevent normal rollover on alphas from accidentally triggering mods.
#define IGNORE_MOD_TAP_INTERRUPT
// Enable rapid switch from tap to hold, disables double tap hold auto-repeat.
#define TAPPING_FORCE_HOLD
// try to be more permissive with holds, allows to trigger modifiers faster
// achordion will avoid the worst
#define PERMISSIVE_HOLD
@ -66,6 +75,9 @@
// remove some features we don't need
//
// not more than 8 layers
#define LAYER_STATE_8BIT
// we don't need locking
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE

108
keymap.c
View file

@ -16,24 +16,6 @@
#include QMK_KEYBOARD_H
// map miryoku to our 4x12 grid
// we setup some extra keys in the holes
#define LAYOUT_miryoku(\
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,\
N30, N31, K32, K33, K34, K35, K36, K37, N38, N39\
)\
LAYOUT_ortho_4x12(\
K00, K01, K02, K03, K04, KC_NO, KC_NO, K05, K06, K07, K08, K09,\
K10, K11, K12, K13, K14, KC_NO, KC_NO, K15, K16, K17, K18, K19,\
K20, K21, K22, K23, K24, KC_NO, KC_NO, K25, K26, K27, K28, K29,\
KC_NO, KC_NO, K32, K33, K34, KC_NO, KC_NO, K35, K36, K37, KC_NO, KC_NO\
)
// include miryoku defaults
#include <users/manna-harbour_miryoku/manna-harbour_miryoku.c>
//
// improve home row modifiers via achordion
//
@ -83,9 +65,54 @@ bool achordion_chord(uint16_t tap_hold_keycode,
return planck_on_left_hand(tap_hold_record->event.key) != planck_on_left_hand(other_record->event.key);
}
//
// underglow configuration
//
// our layers, used as index in layers and rgb lights
enum planck_layers {
_QWERTY,
_SYM,
_NUM,
_NAV,
_CMD,
_FN
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_planck_grid(
KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, 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, XXXXXXX, XXXXXXX, KC_H, RSFT_T(KC_J), RCTL_T(KC_K), LALT_T(KC_L), RGUI_T(KC_QUOT),
KC_Z, RALT_T(KC_X), KC_C, KC_V, KC_B, XXXXXXX, XXXXXXX, KC_N, KC_M, KC_COMM, RALT_T(KC_DOT), KC_SLSH,
XXXXXXX, XXXXXXX, XXXXXXX, LT(_SYM, KC_TAB), LT(_NAV, KC_SPC), XXXXXXX, XXXXXXX, LT(_FN, KC_ENT), LT(_NUM, KC_BSPC), XXXXXXX, XXXXXXX, XXXXXXX
),
[_NUM] = LAYOUT_planck_grid(
KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
LGUI_T(KC_1), LALT_T(KC_2), LCTL_T(KC_3), LSFT_T(KC_4), KC_5, XXXXXXX, XXXXXXX, KC_6, RSFT_T(KC_7), RCTL_T(KC_8), LALT_T(KC_9), RGUI_T(KC_0),
XXXXXXX, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC,
XXXXXXX, XXXXXXX, XXXXXXX, KC_TAB, KC_SPC, XXXXXXX, XXXXXXX, KC_ENT, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX
),
[_SYM] = LAYOUT_planck_grid(
KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_PIPE, KC_TILD,
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, XXXXXXX, XXXXXXX, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
XXXXXXX, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR,
XXXXXXX, XXXXXXX, XXXXXXX, KC_TAB, KC_SPC, XXXXXXX, XXXXXXX, KC_ENT, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX
),
[_NAV] = LAYOUT_planck_grid(
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX,
KC_LGUI, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_SCLN,
XXXXXXX, KC_RALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, KC_TAB, KC_SPC, XXXXXXX, XXXXXXX, KC_ENT, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX
),
[_FN] = LAYOUT_planck_grid(
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT,
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, KC_RGUI,
KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, KC_TAB, KC_SPC, XXXXXXX, XXXXXXX, KC_ENT, KC_BSPC, XXXXXXX, XXXXXXX, XXXXXXX
)
};
/* plwnck rev6 RGB layout:
* ----------------------------------
@ -99,51 +126,40 @@ const rgblight_segment_t PROGMEM qwerty_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_WHITE}
);
const rgblight_segment_t PROGMEM lower_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_BLUE}
const rgblight_segment_t PROGMEM num_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_YELLOW}
);
const rgblight_segment_t PROGMEM raise_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_YELLOW}
const rgblight_segment_t PROGMEM sym_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_BLUE}
);
const rgblight_segment_t PROGMEM nav_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_WHITE}
);
const rgblight_segment_t PROGMEM cmd_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_GREEN}
);
const rgblight_segment_t PROGMEM fn_layer[] = RGBLIGHT_LAYER_SEGMENTS(
{1, 8, HSV_RED}
);
const rgblight_segment_t * const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
[BASE] = qwerty_layer,
[NAV] = cmd_layer,
[MOUSE] = raise_layer,
[MEDIA] = nav_layer,
[NUM] = cmd_layer,
[SYM] = fn_layer,
[FUN] = nav_layer,
[BUTTON] = raise_layer
[_QWERTY] = qwerty_layer,
[_NUM] = num_layer,
[_SYM] = sym_layer,
[_NAV] = nav_layer,
[_FN] = fn_layer
);
void keyboard_post_init_user(void)
{
void keyboard_post_init_user(void) {
// Enable the LED layers
rgblight_layers = my_rgb_layers;
}
layer_state_t layer_state_set_user(layer_state_t state)
{
rgblight_set_layer_state(NAV, layer_state_cmp(state, NAV));
rgblight_set_layer_state(MOUSE, layer_state_cmp(state, MOUSE));
rgblight_set_layer_state(MEDIA, layer_state_cmp(state, MEDIA));
rgblight_set_layer_state(NUM, layer_state_cmp(state, NUM));
rgblight_set_layer_state(SYM, layer_state_cmp(state, SYM));
rgblight_set_layer_state(FUN, layer_state_cmp(state, FUN));
rgblight_set_layer_state(BUTTON, layer_state_cmp(state, BUTTON));
rgblight_set_layer_state(_NUM, layer_state_cmp(state, _NUM));
rgblight_set_layer_state(_SYM, layer_state_cmp(state, _SYM));
rgblight_set_layer_state(_NAV, layer_state_cmp(state, _NAV));
rgblight_set_layer_state(_FN, layer_state_cmp(state, _FN));
return state;
}

View file

@ -1,6 +1,8 @@
# Christoph Cullmann's Layout
Derived from the Miryoku layout.
32 key layout
Derived from the standard Planck layout and ideas from the Miryoku layout.
https://github.com/manna-harbour/miryoku

View file

@ -1,19 +1,3 @@
# configure miryoku
MIRYOKU_ALPHAS=QWERTY
MIRYOKU_EXTRA=QWERTY
MIRYOKU_TAP=QWERTY
MIRYOKU_NAV=INVERTEDT
# include miryoku defaults
MOUSEKEY_ENABLE = yes # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
AUTO_SHIFT_ENABLE = yes # Auto Shift
include users/manna-harbour_miryoku/custom_rules.mk
include users/manna-harbour_miryoku/post_rules.mk
# add achordion to improve home row modifiers
SRC += achordion.c
# properly optimize
LTO_ENABLE = yes
@ -21,7 +5,13 @@ LTO_ENABLE = yes
COMMAND_ENABLE = no
CONSOLE_ENABLE = no
# we have some real mouse
MOUSEKEY_ENABLE = no
# more features we not use
SPACE_CADET_ENABLE = no
GRAVE_ESC_ENABLE = no
MUSIC_ENABLE = no
# add achordion to improve home row modifiers
SRC += achordion.c