update planck config, too
This commit is contained in:
parent
a20c78e2cd
commit
d0812ada0b
|
@ -16,28 +16,9 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
//
|
// we don't have any lock switches
|
||||||
// improve home row modifiers via achoridion
|
#undef LOCKING_SUPPORT_ENABLE
|
||||||
//
|
#undef LOCKING_RESYNC_ENABLE
|
||||||
|
|
||||||
// settings for home row modifiers
|
|
||||||
// details see https://precondition.github.io/home-row-mods
|
|
||||||
|
|
||||||
// the default of 200
|
|
||||||
#define TAPPING_TERM 200
|
|
||||||
|
|
||||||
// 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 QUICK_TAP_TERM 0
|
|
||||||
|
|
||||||
// try to be more permissive with holds, allows to trigger modifiers faster
|
|
||||||
// achordion will avoid the worst
|
|
||||||
#define PERMISSIVE_HOLD
|
|
||||||
|
|
||||||
// caps word is great for defines
|
|
||||||
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// audio configuration
|
// audio configuration
|
||||||
|
|
126
planck/keymap.c
126
planck/keymap.c
|
@ -16,52 +16,6 @@
|
||||||
|
|
||||||
#include QMK_KEYBOARD_H
|
#include QMK_KEYBOARD_H
|
||||||
|
|
||||||
//
|
|
||||||
// improve home row modifiers via achordion
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "achordion.h"
|
|
||||||
|
|
||||||
bool process_record_user(uint16_t keycode, keyrecord_t* record)
|
|
||||||
{
|
|
||||||
if (!process_achordion(keycode, record)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void matrix_scan_user(void)
|
|
||||||
{
|
|
||||||
achordion_task();
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool planck_bottom_row(keypos_t pos)
|
|
||||||
{
|
|
||||||
return pos.row % (MATRIX_ROWS / 2) == 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
// works only for rows 0-2 or 4-6
|
|
||||||
static bool planck_on_left_hand(keypos_t pos)
|
|
||||||
{
|
|
||||||
// planck is like a split keyboard, beside for the last row
|
|
||||||
return pos.row < MATRIX_ROWS / 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool achordion_chord(uint16_t tap_hold_keycode,
|
|
||||||
keyrecord_t* tap_hold_record,
|
|
||||||
uint16_t other_keycode,
|
|
||||||
keyrecord_t* other_record)
|
|
||||||
{
|
|
||||||
// last row is special for the planck, just allow there everything
|
|
||||||
if (planck_bottom_row(tap_hold_record->event.key) || planck_bottom_row(other_record->event.key)) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// now both keys are in rows 0-2 or 4-6, there we can check the left hand with the simple helper
|
|
||||||
return planck_on_left_hand(tap_hold_record->event.key) != planck_on_left_hand(other_record->event.key);
|
|
||||||
}
|
|
||||||
|
|
||||||
// layout helper macro, we just use 34 keys
|
// layout helper macro, we just use 34 keys
|
||||||
#define LAYOUT_cullmann(\
|
#define LAYOUT_cullmann(\
|
||||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\
|
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09,\
|
||||||
|
@ -78,49 +32,49 @@ KC_NO, KC_NO, KC_NO, K30, K31, KC_NO, KC_NO, K32, K33, KC_NO, KC_NO, KC_
|
||||||
|
|
||||||
// our layers, used as index in layers and rgb lights
|
// our layers, used as index in layers and rgb lights
|
||||||
enum planck_layers {
|
enum planck_layers {
|
||||||
_QWERTY,
|
L_CANARY,
|
||||||
_SYM,
|
L_EXT,
|
||||||
_NUM,
|
L_SYM,
|
||||||
_FN,
|
L_NUM,
|
||||||
_NAV
|
L_FUN,
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||||
|
|
||||||
[_QWERTY] = LAYOUT_cullmann(
|
[L_CANARY] = LAYOUT_cullmann(
|
||||||
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT,
|
KC_W, KC_L, KC_Y, KC_P, KC_B, KC_Z, KC_F, KC_O, KC_U, KC_QUOT,
|
||||||
LT(_NUM, KC_C), LALT_T(KC_R), LCTL_T(KC_S), LT(_SYM, KC_T), KC_G, KC_M, LT(_FN, KC_N), RCTL_T(KC_E), LALT_T(KC_I), LT(_NAV, KC_A),
|
KC_C, KC_R, KC_S, KC_T, KC_G, KC_M, KC_N, KC_E, KC_I, KC_A,
|
||||||
LSFT_T(KC_Q), KC_J, LGUI_T(KC_V), RALT_T(KC_D), KC_K, KC_X, RALT_T(KC_H), RGUI_T(KC_SLSH), KC_COMM, RSFT_T(KC_DOT),
|
KC_Q, KC_J, KC_V, KC_D, KC_K, KC_X, KC_H, KC_SLSH, KC_COMM, KC_DOT,
|
||||||
KC_TAB, KC_SPC, KC_ENT, KC_BSPC
|
MO(L_EXT), KC_SPC, KC_RSFT, MO(L_SYM)
|
||||||
),
|
),
|
||||||
|
|
||||||
[_SYM] = LAYOUT_cullmann(
|
[L_EXT] = LAYOUT_cullmann(
|
||||||
XXXXXXX, C(KC_X), C(KC_C), C(KC_V), XXXXXXX, KC_LCBR, KC_AMPR, KC_ASTR, KC_LPRN, KC_RCBR,
|
KC_ESC, LALT(KC_LEFT), LCTL(KC_F), LALT(KC_RGHT), KC_INS, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_CAPS,
|
||||||
KC_LSFT, KC_LALT, KC_LCTL, XXXXXXX, XXXXXXX, KC_PLUS, KC_DLR, KC_PERC, KC_CIRC, KC_COLN,
|
OSM(MOD_LALT), OSM(MOD_LGUI), OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_RALT), KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL,
|
||||||
XXXXXXX, XXXXXXX, KC_LGUI, KC_RALT, XXXXXXX, KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_TILD,
|
LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), KC_LGUI, LCTL(KC_V), KC_ENT, KC_BSPC, KC_TAB, KC_APP, KC_PSCR,
|
||||||
KC_TAB, KC_SPC, KC_UNDS, KC_RPRN
|
KC_TRNS, XXXXXXX, KC_ENT, MO(L_FUN)
|
||||||
),
|
),
|
||||||
|
|
||||||
[_NUM] = LAYOUT_cullmann(
|
[L_SYM] = LAYOUT_cullmann(
|
||||||
XXXXXXX, C(KC_X), C(KC_C), C(KC_V), XXXXXXX, KC_LBRC, KC_7, KC_8, KC_9, KC_RBRC,
|
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_EQL, KC_GRV, KC_COLN, KC_SCLN, KC_PLUS,
|
||||||
XXXXXXX, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, KC_EQL, KC_4, KC_5, KC_6, KC_SCLN,
|
OSM(MOD_LALT), OSM(MOD_LGUI), OSM(MOD_LSFT), OSM(MOD_LCTL), KC_CIRC, KC_ASTR, KC_LPRN, KC_LCBR, KC_LBRC, KC_MINS,
|
||||||
XXXXXXX, XXXXXXX, KC_LGUI, KC_RALT, XXXXXXX, KC_BSLS, KC_1, KC_2, KC_3, KC_GRV,
|
KC_NUBS, LSFT(KC_NUBS), KC_NUHS, LSFT(KC_NUHS), KC_AMPR, KC_TILD, KC_RPRN, KC_RCBR, KC_RBRC, KC_UNDS,
|
||||||
KC_TAB, KC_SPC, KC_MINS, KC_0
|
MO(L_FUN), MO(L_NUM), KC_ENT, KC_TRNS
|
||||||
),
|
),
|
||||||
|
|
||||||
[_FN] = LAYOUT_cullmann(
|
[L_NUM] = LAYOUT_cullmann(
|
||||||
KC_F12, KC_F7, KC_F8, KC_F9, KC_PSCR, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NUM, KC_EQL, KC_7, KC_8, KC_9, KC_PLUS,
|
||||||
KC_F11, KC_F4, KC_F5, KC_F6, KC_DEL, XXXXXXX, XXXXXXX, KC_RCTL, KC_LALT, KC_RSFT,
|
OSM(MOD_LALT), OSM(MOD_LGUI), OSM(MOD_LSFT), OSM(MOD_LCTL), OSM(MOD_RALT), KC_ASTR, KC_4, KC_5, KC_6, KC_MINS,
|
||||||
KC_F10, KC_F1, KC_F2, KC_F3, KC_INS, XXXXXXX, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX,
|
XXXXXXX, KC_APP, KC_TAB, KC_BSPC, KC_ENT, KC_0, KC_1, KC_2, KC_3, KC_SLSH,
|
||||||
KC_TAB, KC_ESC, KC_ENT, KC_BSPC
|
MO(L_FUN), MO(L_NUM), KC_ENT, KC_TRNS
|
||||||
),
|
),
|
||||||
|
|
||||||
[_NAV] = LAYOUT_cullmann(
|
[L_FUN] = LAYOUT_cullmann(
|
||||||
XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
KC_MSTP, KC_MPRV, KC_MPLY, KC_MNXT, KC_BRIU, KC_F12, KC_F7, KC_F8, KC_F9, QK_BOOT,
|
||||||
KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, XXXXXXX, KC_RSFT, KC_RCTL, KC_LALT, XXXXXXX,
|
OSM(MOD_LALT), OSM(MOD_LGUI), OSM(MOD_LSFT), OSM(MOD_LCTL), KC_BRID, KC_F11, KC_F4, KC_F5, KC_F6, XXXXXXX,
|
||||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RALT, KC_RGUI, XXXXXXX, XXXXXXX,
|
KC_MUTE, KC_VOLD, RCS(KC_C), KC_VOLU, RCS(KC_V), KC_F10, KC_F1, KC_F2, KC_F3, XXXXXXX,
|
||||||
KC_TAB, KC_ESC, KC_ENT, KC_BSPC
|
KC_TRNS, XXXXXXX, KC_ENT, KC_TRNS
|
||||||
)
|
),
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -153,11 +107,11 @@ const rgblight_segment_t PROGMEM nav_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||||
);
|
);
|
||||||
|
|
||||||
const rgblight_segment_t * const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
const rgblight_segment_t * const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||||
[_QWERTY] = qwerty_layer,
|
[L_CANARY] = qwerty_layer,
|
||||||
[_SYM] = sym_layer,
|
[L_EXT] = sym_layer,
|
||||||
[_NUM] = num_layer,
|
[L_SYM] = num_layer,
|
||||||
[_FN] = fn_layer,
|
[L_NUM] = fn_layer,
|
||||||
[_NAV] = nav_layer
|
[L_FUN] = nav_layer
|
||||||
);
|
);
|
||||||
|
|
||||||
void keyboard_post_init_user(void) {
|
void keyboard_post_init_user(void) {
|
||||||
|
@ -167,9 +121,9 @@ void keyboard_post_init_user(void) {
|
||||||
|
|
||||||
layer_state_t layer_state_set_user(layer_state_t state)
|
layer_state_t layer_state_set_user(layer_state_t state)
|
||||||
{
|
{
|
||||||
rgblight_set_layer_state(_SYM, layer_state_cmp(state, _SYM));
|
rgblight_set_layer_state(L_EXT, layer_state_cmp(state, L_EXT));
|
||||||
rgblight_set_layer_state(_NUM, layer_state_cmp(state, _NUM));
|
rgblight_set_layer_state(L_SYM, layer_state_cmp(state, L_SYM));
|
||||||
rgblight_set_layer_state(_FN, layer_state_cmp(state, _FN));
|
rgblight_set_layer_state(L_NUM, layer_state_cmp(state, L_NUM));
|
||||||
rgblight_set_layer_state(_NAV, layer_state_cmp(state, _NAV));
|
rgblight_set_layer_state(L_FUN, layer_state_cmp(state, L_FUN));
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,19 +5,5 @@ LTO_ENABLE = yes
|
||||||
COMMAND_ENABLE = no
|
COMMAND_ENABLE = no
|
||||||
CONSOLE_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
|
|
||||||
|
|
||||||
# caps word is great for defines
|
|
||||||
CAPS_WORD_ENABLE = yes
|
|
||||||
|
|
||||||
# add achordion to improve home row modifiers
|
|
||||||
SRC += achordion.c
|
|
||||||
|
|
||||||
# per key debounce: https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md
|
# per key debounce: https://github.com/qmk/qmk_firmware/blob/master/docs/feature_debounce_type.md
|
||||||
DEBOUNCE_TYPE = sym_defer_pk
|
DEBOUNCE_TYPE = sym_defer_pk
|
||||||
|
|
Loading…
Reference in a new issue