Skip to content

Commit

Permalink
Lotus 58, Vial keymap (#591)
Browse files Browse the repository at this point in the history
* adding vial id

* Update Vial keymap

Replacing key-codes to match latest QMK iteration, some options are moved to .JSON

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* Simplified OLED, cleaned up keymap

Simplified OLED, cleaned up keymap

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* Update keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>

* conditional

---------

Co-authored-by: Less/Rikki <86894501+lesshonor@users.noreply.github.com>
  • Loading branch information
TweetyDaBird and lesshonor authored Nov 12, 2023
1 parent 144e43d commit 966f801
Show file tree
Hide file tree
Showing 5 changed files with 570 additions and 1 deletion.
22 changes: 22 additions & 0 deletions keyboards/tweetydabird/lotus58/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2022 Markus Knutsson (@TweetyDaBird)
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define VIAL_KEYBOARD_UID {0x5F, 0xEC, 0xD8, 0x46, 0x91, 0x40, 0x1B, 0x09}

#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
#define VIAL_UNLOCK_COMBO_COLS {0, 5}

// Static glow is ALWAYS on with RGBLIGHT
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_RAINBOW_MOOD

#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE
#define LAYER_STATE_8BIT

// VIAL specific reduce memory
#define VIAL_COMBO_ENTRIES 4
#define VIAL_TAP_DANCE_ENTRIES 4
#define VIAL_KEY_OVERRIDE_ENTRIES 4
106 changes: 106 additions & 0 deletions keyboards/tweetydabird/lotus58/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
// Copyright 2022 Markus Knutsson (@TweetyDaBird)
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
#define ____ KC_TRNS

#ifdef AUTO_SHIFT_ENABLE

void keyboard_post_init_user(void) {
autoshift_disable();
}
#endif

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

[0] = LAYOUT(
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
KC_NUHS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
LCTL_T(KC_LEFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_DOWN, KC_UP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCTL_T(KC_RIGHT),
KC_DEL, TG(1), LALT_T(KC_LGUI), LSFT_T(KC_SPACE), RSFT_T(KC_ENTER), RALT_T(KC_APP), TG(2), KC_BSPC
),

[1] = LAYOUT(
____, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, ____, ____, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, KC_PGDN, KC_PGUP, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____
),

[2] = LAYOUT(
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____,
____, ____, ____, ____, ____, ____, ____, ____
),

[3] = LAYOUT(
QK_BOOT, ____, ____, ____, NK_TOGG, AC_TOGG, ____, ____, ____, ____, ____, RGB_VAI, RGB_VAD, RGB_TOG,
QK_RBT, ____, ____, ____, ____, ____, ____, ____, ____, RGB_HUI, RGB_HUD, RGB_M_P,
____, ____, ____, ____, ____, ____, ____, ____, ____, RGB_SAI, RGB_SAD, RGB_M_B,
____, ____, ____, ____, ____, ____, ____, ____, ____, ____, ____, RGB_SPI, RGB_SPD, RGB_M_R,
____, ____, ____, ____, ____, ____, ____, ____
),
};

#if defined(ENCODER_MAP_ENABLE)
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
[1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) },
[3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }
};
#endif

#ifdef OLED_ENABLE

static void print_status_narrow(void) {
// Create OLED content
oled_advance_page(true);
oled_write_P(PSTR("Lotus -58-"), false);
oled_advance_page(true);

// Print current layer
oled_write_P(PSTR("Layer"), false);
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("-Base\n"), false);
break;
case 1:
oled_write_P(PSTR("-Func\n"), false);
break;
case 2:
oled_write_P(PSTR("-Num \n"), false);
break;
case 3:
oled_write_P(PSTR("-Sys \n"), false);
break;
default:
oled_write_P(PSTR("Undef"), false);
}

// Display capslock
oled_advance_page(true);
led_t led_usb_state = host_keyboard_led_state();
oled_write_ln_P(PSTR("Caps- lock"), led_usb_state.caps_lock);

#ifdef AUTO_SHIFT_ENABLE

bool autoshift = get_autoshift_state();
oled_advance_page(true);
oled_write_P(PSTR("Auto-Shift"), autoshift);
oled_advance_page(true);

#endif

}

bool oled_task_user(void) {
print_status_narrow();
return false;
}

#endif
21 changes: 21 additions & 0 deletions keyboards/tweetydabird/lotus58/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2022 Markus Knutsson (@TweetyDaBird)
# SPDX-License-Identifier: GPL-2.0-or-later

# Needed for VIAL compatability (all are needed)
VIA_ENABLE = yes
VIAL_ENABLE = yes
ENCODER_MAP_ENABLE = yes

# Reduce size on atmega32u4
ifeq ($(strip $(MCU)), atmega32u4)
TAP_DANCE_ENABLE = no
QMK_SETTINGS = no
KEY_OVERRIDE_ENABLE = no
COMBO_ENABLE = no

# Reduce size even more for non-nanoboot bootloaders
ifneq ($(strip $(BOOTLOADER_SIZE)), 512)
MAGIC_ENABLE = no
MOUSEKEY_ENABLE = no
endif
endif
Loading

0 comments on commit 966f801

Please sign in to comment.