Lotus 58, Vial keymap (#591)

* 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>
This commit is contained in:
Markus Knutsson 2023-11-12 10:35:39 +01:00 committed by GitHub
parent 144e43d900
commit 966f80152e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 570 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -0,0 +1,420 @@
{
"name": "Lotus 58 Glow VIAL",
"author": "Markus Knutsson",
"lighting": "qmk_rgblight",
"matrix": {
"rows": 10,
"cols": 6
},
"layouts": {
"labels":
[
[
"Left Encoder",
"Top Placement",
"Bottom Placement",
"No Encoder"
],
[
"Right Encoder",
"Top Placement",
"Bottom Placement",
"No Encoder"
]
],
"keymap":
[
[
{
"y": 0.25,
"x": 3
},
"0,3",
{
"x": 9.25
},
"5,3"
],
[
{
"y": -0.87,
"x": 2
},
"0,2",
{
"x": 1
},
"0,4",
{
"x": 7.25
},
"5,4",
{
"x": 1
},
"5,2"
],
[
{
"y": -0.88,
"x": 5
},
"0,5"
],
[
{
"y": -1,
"x": 11.25
},
"5,5"
],
[
{
"y": -0.87,
"x": 1
},
"0,1",
{
"x": 13.25
},
"5,1"
],
[
{
"y": -0.7499999999999999
},
"0,0",
{
"x": 15.25
},
"5,0"
],
[
{
"y": -0.8799999999999999,
"x": 6
},
"4,0\n\n\n0,0",
{
"x": -1,
"d": true
},
"4,0\n\n\n0,1",
{
"x": 0.25
},
"0,1\n\n\n0,0\n\n\n\n\n\ne",
{
"x": -1,
"d": true
},
"0,1\n\n\n0,2\n\n\n\n\n\ne",
{
"x": 0.75
},
"1,1\n\n\n1,0\n\n\n\n\n\ne",
{
"x": -1,
"d": true
},
"1,1\n\n\n1,0\n\n\n\n\n\ne",
{
"x": 0.25,
"d": true
},
"9,0\n\n\n1,1",
{
"x": -1
},
"9,0\n\n\n1,0"
],
[
{
"y": -0.75,
"x": 3
},
"1,3",
{
"x": 9.25
},
"6,3"
],
[
{
"y": -0.8700000000000001,
"x": 2
},
"1,2",
{
"x": 1
},
"1,4",
{
"x": 7.25
},
"6,4",
{
"x": 1
},
"6,2"
],
[
{
"y": -0.8799999999999999,
"x": 5
},
"1,5",
{
"x": 5.25
},
"6,5"
],
[
{
"y": -0.8700000000000001,
"x": 1
},
"1,1",
{
"x": 13.25
},
"6,1"
],
[
{
"y": -0.75
},
"1,0",
{
"x": 15.25
},
"6,0"
],
[
{
"y": -0.8799999999999999,
"x": 7.25
},
"0,1\n\n\n0,1\n\n\n\n\n\ne",
{
"x": -1
},
"0,0\n\n\n0,0\n\n\n\n\n\ne",
{
"x": -1,
"d": true
},
"0,1\n\n\n0,2\n\n\n\n\n\ne",
{
"x": 0.75
},
"1,0\n\n\n1,0\n\n\n\n\n\ne",
{
"x": -1
},
"1,1\n\n\n1,1\n\n\n\n\n\ne",
{
"x": -1,
"d": true
},
"1,0\n\n\n1,2\n\n\n\n\n\ne"
],
[
{
"y": -0.75,
"x": 3
},
"2,3",
{
"x": 9.25
},
"7,3"
],
[
{
"y": -0.8700000000000001,
"x": 2
},
"2,2",
{
"x": 1,
"n": true
},
"2,4",
{
"x": 7.25,
"n": true
},
"7,4",
{
"x": 1
},
"7,2"
],
[
{
"y": -0.8799999999999999,
"x": 5
},
"2,5",
{
"x": 5.25
},
"7,5"
],
[
{
"y": -0.8700000000000001,
"x": 1
},
"2,1",
{
"x": 13.25
},
"7,1"
],
[
{
"y": -0.8799999999999999,
"x": 6
},
"4,5",
{
"x": 3.25
},
"9,5"
],
[
{
"y": -0.8700000000000001
},
"2,0",
{
"x": 15.25
},
"7,0"
],
[
{
"y": -0.8799999999999999,
"x": 7.25
},
"0,0\n\n\n0,1\n\n\n\n\n\ne",
{
"x": 0.75
},
"1,0\n\n\n1,1\n\n\n\n\n\ne"
],
[
{
"y": -0.75,
"x": 3
},
"3,3",
{
"x": 9.25
},
"8,3"
],
[
{
"y": -0.8700000000000001,
"x": 2
},
"3,2",
{
"x": 1
},
"3,4",
{
"x": 7.25
},
"8,4",
{
"x": 1
},
"8,2"
],
[
{
"y": -0.8799999999999999,
"x": 5
},
"3,5",
{
"x": 5.25
},
"8,5"
],
[
{
"y": -0.8700000000000001,
"x": 1
},
"3,1",
{
"x": 13.25
},
"8,1"
],
[
{
"y": -0.75
},
"3,0",
{
"x": 15.25
},
"8,0"
],
[
{
"y": -0.5,
"x": 2.75
},
"4,1",
"4,2",
{
"x": 7.75
},
"9,2",
"9,1"
],
[
{
"y": -0.8799999999999999,
"x": 4.75
},
"4,3",
{
"x": 5.75
},
"9,3"
],
[
{
"r": 30,
"y": -5.5,
"x": 7.5,
"h": 1.5
},
"4,4"
],
[
{
"r": -30,
"y": 7.630000000000001,
"x": 6.44,
"h": 1.5
},
"9,4"
]
]
}
}

View file

@ -6,7 +6,7 @@
#ifdef OLED_ENABLE
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
return OLED_ROTATION_90;
return OLED_ROTATION_270;
}
void render_logo(void) {