Skip to content

Commit

Permalink
Merge branch 'tester'
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseleite committed Aug 20, 2024
2 parents c464f43 + 200a5db commit 20876c3
Show file tree
Hide file tree
Showing 3 changed files with 221 additions and 0 deletions.
27 changes: 27 additions & 0 deletions keyboards/lily58/keymaps/tester/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#pragma once

// Set master half
#define MASTER_LEFT

// Mod tap config
#define TAPPING_TERM 150
// #define TAPPING_TERM_PER_KEY
#define TAPPING_FORCE_HOLD
// #define PERMISSIVE_HOLD
#define HOLD_ON_OTHER_KEY_PRESS

// Sugar to automatically prefix `KC_` onto every keycode for cleaner keymaps
#define LAYOUT_KC( \
L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \
L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \
L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \
L30, L31, L32, L33, L34, L35, L45, R40, R30, R31, R32, R33, R34, R35, \
L41, L42, L43, L44, R41, R42, R43, R44 \
) \
LAYOUT( \
KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \
KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \
KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \
KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L45, KC_##R40, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \
KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##R41, KC_##R42, KC_##R43, KC_##R44 \
)
178 changes: 178 additions & 0 deletions keyboards/lily58/keymaps/tester/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,178 @@
#include QMK_KEYBOARD_H

// -----------------------------------------------------------------------------
// Layer definitions
// ------------------------------------------------------------------------------

enum layer_number {
_DEFAULT = 0,
_WINDOWS,
_LOWER,
_RAISE,
_MASH,
};


// -----------------------------------------------------------------------------
// Keycode Aliases
// ------------------------------------------------------------------------------

#define KC_ KC_TRNS // Blank keys will inherit from previous layer
#define KC_xx KC_NO // Completely disable key with `xx`
#define KC_DFLT DF(_DEFAULT) // Switch to default layer
#define KC_WIN DF(_WINDOWS) // Switch to game layer
#define KC_LWRT LT(_LOWER, KC_F13) // Hold for lower layer, tap for app launcher modal
#define KC_CMDO MT(MOD_LGUI, KC_F14) // Hold for cmd, tap for macros modal
#define KC_RAIS MO(_RAISE) // Raise layer
#define KC_RAI0 LT(_RAISE, KC_P0) // Hold to raise, tap for numpad 0
#define KC_CESC LCTL_T(KC_ESC) // Hold for ctrl, tap for esc
#define KC_OTAB LOPT_T(KC_TAB) // Hold for option, tap for tab
#define KC_LSPO SC_LSPO // Left space cadet shift, tap for opening paren
#define KC_RSPC SC_RSPC // Right space cadet shift, tap for closing paren
#define KC_SPOT LCMD(KC_SPC) // Spotlight search
#define KC_SPCL LCTL(KC_LEFT) // Mission control space left
#define KC_SPCR LCTL(KC_RGHT) // Mission control space right
#define KC_BROL LAG(KC_LEFT) // Browser tab left
#define KC_BROR LAG(KC_RGHT) // Browser tab right
#define KC_ZMIN LCMD(KC_EQL) // Zoom in
#define KC_ZMOT LCMD(KC_MINS) // Zoom out
#define KC_ZMRS LCMD(KC_0) // Zoom reset


// -----------------------------------------------------------------------------
// Layer Keymaps
// ------------------------------------------------------------------------------

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_DEFAULT] = LAYOUT_KC(
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
OTAB , Q , W , E , R , T , Y , U , I , O , P , BSLS ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
CESC , A , S , D , F , G , H , J , K , L , SCLN , QUOT ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
LSPO , Z , X , C , V , B , LBRC , RBRC , N , M , COMM , DOT , SLSH , RSPC ,
// +------+------+------+------+------+------+------/ \------+------+------+------+------+------+------+
LALT , CMDO , LWRT , SPC , ENT , RAIS , BSPC , LWIN
// +------+------+------+------/ \------+------+------+------+
),

[_WINDOWS] = LAYOUT_KC(
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , DEL ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
TAB , , , , , , , , , , , ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
LCTL , , , , , , , , , , , ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
, , , , , , , , , , , , , ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
LALT , LCTL , , , , , , LWIN
// +------+------+------+------/ \------+------+------+------+
),

[_LOWER] = LAYOUT_KC(
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
TILD , EXLM , AT , HASH , DLR , PERC , PIPE , P7 , P8 , P9 , UNDS , PLUS ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
GRV , CIRC , AMPR , ASTR , COLN , LABK , RABK , P4 , P5 , P6 , MINS , EQL ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
LCBR , BSLS , DOT , COMM , QUES , LBRC , , , RBRC , P1 , P2 , P3 , SLSH , RCBR ,
// +------+------+------+------+------+------+------/ \------+------+------+------+------+------+------+
, , , , , RAI0 , ,
// +------+------+------+------/ \------+------+------+------+
),

[_RAISE] = LAYOUT_KC(
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
, xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , xx ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
, F1 , F2 , F3 , F4 , F5 , HOME , PGDN , PGUP , END , xx , xx ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
, F6 , F7 , F8 , F9 , F10 , LEFT , DOWN , UP , RGHT , xx , xx ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
, F11 , F12 , xx , xx , xx , xx , xx , MPRV , VOLD , VOLU , MNXT , MUTE , MPLY ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
, , , SPOT , , , ,
// +------+------+------+------/ \------+------+------+------+
),

[_MASH] = LAYOUT_KC(
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
DFLT , xx , xx , xx , xx , xx , xx , xx , xx , xx , xx , WIN ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
xx , xx , xx , xx , xx , xx , SPCL , xx , xx , SPCR , xx , xx ,
// +------+------+------+------+------+------+ +------+------+------+------+------+------+
xx , xx , xx , xx , xx , xx , BROL , xx , xx , BROR , xx , xx ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
xx , xx , xx , xx , xx , xx , xx , xx , ZMRS , ZMOT , ZMIN , xx , xx , xx ,
// +------+------+------+------+------+------+------+ +------+------+------+------+------+------+------+
, , , , , , ,
// +------+------+------+------/ \------+------+------+------+
),

};


// -----------------------------------------------------------------------------
// Handle layer changes
// ------------------------------------------------------------------------------

layer_state_t layer_state_set_user(layer_state_t state) {
return update_tri_layer_state(state, _LOWER, _RAISE, _MASH);
}


// -----------------------------------------------------------------------------
// Setup shift backspace to forward delete
// ------------------------------------------------------------------------------

const key_override_t delete_key_override = ko_make_basic(MOD_MASK_SHIFT, KC_BSPC, KC_DEL);


// -----------------------------------------------------------------------------
// Register global key overrides
// ------------------------------------------------------------------------------

const key_override_t **key_overrides = (const key_override_t *[]){
&delete_key_override,
NULL
};


// -----------------------------------------------------------------------------
// Handle combos
// ------------------------------------------------------------------------------

const uint16_t PROGMEM hyper[] = {KC_D, KC_F, COMBO_END};
const uint16_t PROGMEM big_hyper[] = {KC_S, KC_D, KC_F, COMBO_END};

combo_t key_combos[] = {
COMBO(hyper, LCMD(LOPT(KC_LCTL))),
COMBO(big_hyper, LSFT(LCMD(LOPT(KC_LCTL)))),
};


// -----------------------------------------------------------------------------
// Handle user keycodes
// ------------------------------------------------------------------------------

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {

// Fix rolling between space cadet shift parens when quickly typing `()`
case KC_RSPC:
if (record->event.pressed && get_mods() & MOD_BIT(KC_LSFT)) {
tap_code16(KC_LPRN);
clear_mods();
return true;
}
break;
}

return true;
}
16 changes: 16 additions & 0 deletions keyboards/lily58/keymaps/tester/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
BOOTLOADER = atmel-dfu # Required for Elite-C microcontrollers
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = no # Audio control and System control
CONSOLE_ENABLE = yes # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # N-key rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
AUDIO_ENABLE = no # Audio output
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight
SWAP_HANDS_ENABLE = no # Enable one-hand typing
OLED_ENABLE = no # OLED display
KEY_OVERRIDE_ENABLE = yes # Enable key overrides feature
EXTRAKEY_ENABLE = yes # Enable media keys, etc.
COMBO_ENABLE = yes # Enable combos
# TAP_DANCE_ENABLE = yes # Enable tap dance

0 comments on commit 20876c3

Please sign in to comment.