Merge remote-tracking branch 'qmk/master' into merge-2022-07-11
This commit is contained in:
commit
fde0c10bae
7121 changed files with 170388 additions and 28118 deletions
|
|
@ -25,13 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define SERIAL_USE_MULTI_TRANSACTION
|
||||
#endif
|
||||
|
||||
#if !defined(NO_ACTION_MACRO)
|
||||
#define NO_ACTION_MACRO
|
||||
#endif
|
||||
#if !defined(NO_ACTION_FUNCTION)
|
||||
#define NO_ACTION_FUNCTION
|
||||
#endif
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
// Use the lily version to get the Lily58 logo instead of the qmk logo
|
||||
|
|
|
|||
55
keyboards/lily58/glow_enc/config.h
Normal file
55
keyboards/lily58/glow_enc/config.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
Copyright 2017 F_YUUCHI
|
||||
Copyright 2020 Ben Roesner (keycapsss.com)
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFC51
|
||||
#define PRODUCT_ID 0x0059
|
||||
#define DEVICE_VER 0x0100
|
||||
#define MANUFACTURER ORVISEVANS+
|
||||
#define PRODUCT Lily58GlowEnc
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#define MATRIX_ROWS 10
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCE 5
|
||||
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
|
||||
#define RGB_DI_PIN F4
|
||||
|
||||
#define RGBLED_NUM 72 // Number of LEDs
|
||||
|
||||
#define RGBLED_SPLIT { 36, 36 }
|
||||
#define RGBLIGHT_SPLIT
|
||||
#define RGBLIGHT_LIMIT_VAL 120
|
||||
|
||||
#define ENCODERS_PAD_A { F5 }
|
||||
#define ENCODERS_PAD_B { D4 }
|
||||
#define ENCODERS_PAD_A_RIGHT { D4 }
|
||||
#define ENCODERS_PAD_B_RIGHT { F5 }
|
||||
16
keyboards/lily58/glow_enc/glow_enc.c
Normal file
16
keyboards/lily58/glow_enc/glow_enc.c
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
Copyright 2020 Ben Roesner (keycapsss.com)
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "lily58.h"
|
||||
|
||||
66
keyboards/lily58/glow_enc/glow_enc.h
Normal file
66
keyboards/lily58/glow_enc/glow_enc.h
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/* Copyright 2022 Liashenko Volodymyr (@LVladymyr)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "lily58.h"
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
#ifndef FLIP_HALF
|
||||
#define LAYOUT( \
|
||||
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 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ L30, L31, L32, L33, L34, L35 }, \
|
||||
{ KC_NO, L41, L42, L43, L44, L45 }, \
|
||||
{ R05, R04, R03, R02, R01, R00 }, \
|
||||
{ R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R25, R24, R23, R22, R21, R20 }, \
|
||||
{ R35, R34, R33, R32, R31, R30 }, \
|
||||
{ KC_NO, R44, R43, R42, R41, R40 } \
|
||||
}
|
||||
#else
|
||||
// Keymap with right side flipped
|
||||
// (TRRS jack on both halves are to the right)
|
||||
#define LAYOUT( \
|
||||
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, R30, R31, R32, R33, R34, R35, R45, \
|
||||
L41, L42, L43, L44, R41, R42, R43, R44 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ L30, L31, L32, L33, L34, L35 }, \
|
||||
{ KC_NO, L41, L42, L43, L44, L45 }, \
|
||||
{ R00, R01, R02, R03, R04, R05 }, \
|
||||
{ R10, R11, R12, R13, R14, R15 }, \
|
||||
{ R20, R21, R22, R23, R24, R25 }, \
|
||||
{ R30, R31, R32, R33, R34, R35 }, \
|
||||
{ KC_NO, R41, R42, R43, R44, R45 } \
|
||||
}
|
||||
#endif
|
||||
16
keyboards/lily58/glow_enc/info.json
Normal file
16
keyboards/lily58/glow_enc/info.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"keyboard_name": "Lily58",
|
||||
"url": "https://keycapsss.com",
|
||||
"maintainer": "BenRoe",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"x":0, "y":0.5}, {"x":1, "y":0.375}, {"x":2, "y":0.125}, {"x":3, "y":0}, {"x":4, "y":0.125}, {"x":5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.5},
|
||||
{"x":0, "y":1.5}, {"x":1, "y":1.375}, {"x":2, "y":1.125}, {"x":3, "y":1}, {"x":4, "y":1.125}, {"x":5, "y":1.25}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.5},
|
||||
{"x":0, "y":2.5}, {"x":1, "y":2.375}, {"x":2, "y":2.125}, {"x":3, "y":2}, {"x":4, "y":2.125}, {"x":5, "y":2.25}, {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.5},
|
||||
{"x":0, "y":3.5}, {"x":1, "y":3.375}, {"x":2, "y":3.125}, {"x":3, "y":3}, {"x":4, "y":3.125}, {"x":5, "y":3.25}, {"x":6, "y":2.75}, {"x":9.5, "y":2.75}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.5},
|
||||
{"x":2.5, "y":4.125}, {"x":3.5, "y":4.15}, {"x":4.5, "y":4.25}, {"x":6, "y":4.25, "h":1.5}, {"x":9.5, "y":4.25, "h":1.5}, {"x":11, "y":4.25}, {"x":12, "y":4.15}, {"x":13, "y":4.15}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
8
keyboards/lily58/glow_enc/rules.mk
Normal file
8
keyboards/lily58/glow_enc/rules.mk
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
ENCODER_ENABLE = yes # ENables the use of one or more encoders
|
||||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB light
|
||||
LTO_ENABLE = yes # significantly reduce the compiled size, but disable the legacy TMK Macros and Functions features
|
||||
BOOTMAGIC_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no # Per key rgb leds
|
||||
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
|
|
@ -15,3 +15,8 @@
|
|||
# define RGBLIGHT_VAL_STEP 5
|
||||
# define RGBLIGHT_LIMIT_VAL 120
|
||||
#endif
|
||||
|
||||
// comment out unnecessary layouts
|
||||
#define ENABLE_QWERTY
|
||||
#define ENABLE_COLEMAK
|
||||
#define ENABLE_DVORAK
|
||||
|
|
|
|||
|
|
@ -16,26 +16,32 @@
|
|||
#define LAYOUT_lily58_base_wrapper(...) LAYOUT_lily58_base(__VA_ARGS__)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
#if defined(ENABLE_QWERTY)
|
||||
[_QWERTY] = LAYOUT_lily58_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________QWERTY_L1_________________, _________________QWERTY_R1_________________,
|
||||
_________________QWERTY_L2_________________, _________________QWERTY_R2_________________,
|
||||
_________________QWERTY_L3_________________, _________________QWERTY_R3_________________
|
||||
),
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_COLEMAK)
|
||||
[_COLEMAK] = LAYOUT_lily58_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________COLEMAK_L1________________, _________________COLEMAK_R1________________,
|
||||
_________________COLEMAK_L2________________, _________________COLEMAK_R2________________,
|
||||
_________________COLEMAK_L3________________, _________________COLEMAK_R3________________
|
||||
),
|
||||
#endif
|
||||
|
||||
#if defined(ENABLE_DVORAK)
|
||||
[_DVORAK] = LAYOUT_lily58_base_wrapper(
|
||||
________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________,
|
||||
_________________DVORAK_L1_________________, _________________DVORAK_R1_________________,
|
||||
_________________DVORAK_L2_________________, _________________DVORAK_R2_________________,
|
||||
_________________DVORAK_L3_________________, _________________DVORAK_R3_________________
|
||||
),
|
||||
#endif
|
||||
|
||||
[_MODS] = LAYOUT_wrapper(
|
||||
_______, ___________________BLANK___________________, ___________________BLANK___________________, _______,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// Copyright 2019 Manna Harbour
|
||||
// https://github.com/manna-harbour/miryoku
|
||||
// generated -*- buffer-read-only: t -*-
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
// Copyright 2019 Manna Harbour
|
||||
// https://github.com/manna-harbour/miryoku
|
||||
// generated -*- buffer-read-only: t -*-
|
||||
|
||||
// This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
|
|
|||
49
keyboards/lily58/keymaps/niolang/config.h
Normal file
49
keyboards/lily58/keymaps/niolang/config.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 Jack Humbert
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
/* Select hand configuration */
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
/* Necessary because of use fo tap dance for ç (leads to un wanted modifications after typing c if not) */
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
|
||||
/* RGB light */
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
# define RGBLIGHT_HUE_STEP 5 // number of steps to cycle through the hue by
|
||||
# define RGBLIGHT_SAT_STEP 10 // number of steps to increment the saturation by
|
||||
# define RGBLIGHT_VAL_STEP 10 // number of steps to increment the brightness by
|
||||
# define RGBLIGHT_SLEEP // the RGB lighting will be switched off when the host goes to sleep
|
||||
# define RGBLIGHT_LAYERS //
|
||||
# define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
|
||||
#endif
|
||||
359
keyboards/lily58/keymaps/niolang/keymap.c
Normal file
359
keyboards/lily58/keymaps/niolang/keymap.c
Normal file
|
|
@ -0,0 +1,359 @@
|
|||
/* Copyright 2017 F_YUUCHI
|
||||
* Copyright 2020 Drashna Jaelre <@drashna>
|
||||
* Copyright 2020 Ben Roesner (keycapsss.com)
|
||||
* Copyright 2022 Niolang
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_bepo.h"
|
||||
|
||||
|
||||
enum layers {
|
||||
_BEPO,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
#define RAISE MO(_RAISE)
|
||||
#define LOWER MO(_LOWER)
|
||||
|
||||
//Modification of cut/copy/paste by their combination, works in more cases
|
||||
#define KC_COPY LCTL(KC_H)
|
||||
#define KC_CUT LCTL(KC_C)
|
||||
#define KC_PSTE2 LCTL(KC_U)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BÉPO
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* |ESC/VM| " 1 | « 2 | » 3 | ( 4 | ) 5 | | @ 6 | + 7 | - 8 | / 9 | * 0 | W |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | B | | É | P & | O œ | È | | !^ | V | D | L | J | Z |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |LCTRL | A | Uù | I¨ | E€ | ,;' |-------. ,-------| C/ç | Tᵉ | S | R | N | M |
|
||||
* |------+------+------+------+------+------|CtPtScn| |SUPPR |------+------+------+------+------+------|
|
||||
* |LShift| À \ | Y { | X } | .:… | K ~ |-------| |-------| ’? | Q | G | H | F |RShift|
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| AltGr|
|
||||
* | | | |/ / \ \ | | | |
|
||||
* `----------------------------' '------''--------------------'
|
||||
*/
|
||||
|
||||
[_BEPO] = LAYOUT(
|
||||
MT(KC_CAPS, KC_ESC), BP_DQUO, BP_LDAQ, BP_RDAQ, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_W,
|
||||
KC_TAB, BP_B, BP_EACU, BP_P, BP_O, BP_EGRV, BP_DCIR, BP_V, BP_D, BP_L, BP_J, BP_Z,
|
||||
KC_LCTRL, BP_A, BP_U, BP_I, BP_E, BP_COMM, MT(BP_CCED, BP_C), BP_T, BP_S, BP_R, BP_N, BP_M,
|
||||
KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, LSFT(KC_PSCR), KC_DEL, BP_QUOT, BP_Q, BP_G, BP_H, BP_F, KC_RSFT,
|
||||
KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_ENT, RAISE, KC_BSPC, KC_RALT
|
||||
),
|
||||
/* LOWER
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | + | 7 | 8 | 9 | = | # |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | F7 | F8 | F9 | F10 | F11 | F12 | | - | 4 | 5 | 6 | % | ^ |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* |LCTRL | c+c | c+v | Up | home | end |-------. ,-------| / | 1 | 2 | 3 | < | > |
|
||||
* |------+------+------+------+------+------|TGHi/Lo| |SUPPR |------+------+------+------+------+------|
|
||||
* |LShift| c+x | Left | Down | Right| pscr |-------| |-------| * | 0 | . | , | ( | ) |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| AltGr|
|
||||
* | | | |/ / \ \ | | | |
|
||||
* `----------------------------' '------''--------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PPLS, KC_P7, KC_P8, KC_P9, BP_EQL, BP_HASH,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PMNS, KC_P4, KC_P5, KC_P6, BP_PERC, BP_RABK,
|
||||
_______, KC_COPY, KC_PSTE2, KC_UP, KC_HOME, KC_END, KC_PSLS, KC_P1, KC_P2, KC_P3, BP_LABK, BP_RABK,
|
||||
_______, KC_CUT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR,TG(_RAISE), _______, KC_PAST, KC_P0, KC_PDOT, KC_PCMM, BP_LPRN, BP_RPRN,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
[_RAISE] = LAYOUT(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PPLS, KC_P7, KC_P8, KC_P9, BP_EQL, BP_HASH,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PMNS, KC_P4, KC_P5, KC_P6, BP_PERC, BP_CIRC,
|
||||
_______, KC_COPY, KC_PSTE2, KC_UP, KC_HOME, KC_END, KC_PSLS, KC_P1, KC_P2, KC_P3, BP_LABK, BP_RABK,
|
||||
_______, KC_CUT, KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR,TG(_LOWER), _______, KC_PAST, KC_P0, KC_PDOT, KC_PCMM, BP_LPRN, BP_RPRN,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* ADJUST
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | | | | | | | | ScLck| Ins | Pause| | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | | | NUML | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ |
|
||||
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
|
||||
* | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* | LAlt | LGUI |LOWER | /Space / \Enter \ |RAISE |BackSP| RGUI |
|
||||
* | | | |/ / \ \ | | | |
|
||||
* `----------------------------' '------''--------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT(
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, KC_INS, KC_PAUSE, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
state = update_tri_layer_state(state, _RAISE, _LOWER, _ADJUST);
|
||||
return state;
|
||||
}
|
||||
|
||||
//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_keyboard_master()) {
|
||||
return OLED_ROTATION_270;
|
||||
} else {
|
||||
return OLED_ROTATION_0;
|
||||
}
|
||||
}
|
||||
|
||||
void render_lily58_logo(void) {
|
||||
static const char PROGMEM lily58_logo[] = {
|
||||
// 'logo', 128x32px
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xc0, 0x40, 0x40, 0xc0, 0x80, 0x80, 0x80, 0x00, 0x00,
|
||||
0x80, 0xe0, 0x70, 0x3c, 0x0e, 0x06, 0x0e, 0x3c, 0x70, 0xe0, 0x80, 0x00, 0x00, 0xc0, 0xc0, 0x00,
|
||||
0xc0, 0xc0, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x80,
|
||||
0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x80, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0xc0, 0x80, 0x80, 0x80, 0x81, 0x83, 0x83,
|
||||
0x07, 0x07, 0x0c, 0x18, 0x70, 0xe0, 0x80, 0x00, 0x00, 0x01, 0xff, 0xfc, 0x80, 0xb6, 0xb6, 0x80,
|
||||
0xb0, 0xb0, 0x00, 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf1, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0x00, 0x00, 0x00, 0x30, 0xf0, 0xf0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0xf0,
|
||||
0x30, 0x00, 0x00, 0x7f, 0xff, 0xff, 0xe1, 0x71, 0x71, 0xf1, 0xf1, 0xe1, 0xc1, 0x81, 0x00, 0x00,
|
||||
0x00, 0x00, 0x0c, 0x3f, 0xff, 0xf3, 0xe1, 0xc1, 0xc1, 0x81, 0x81, 0xc3, 0xff, 0x7f, 0x1c, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x20, 0x70, 0x78, 0xdc, 0xcc, 0x86, 0x06, 0x03, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x03, 0x02, 0x06, 0x84, 0xe1, 0xfb, 0x38, 0x1c, 0x0c, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x03, 0x03, 0x06, 0x86, 0xcc, 0xdc, 0x78, 0x70, 0x20, 0x00, 0xff, 0xff, 0x80, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1f, 0x7e, 0xf8, 0xe0, 0xf0, 0x7e, 0x1f, 0x03, 0x00,
|
||||
0x00, 0x00, 0x00, 0xe0, 0xe0, 0xc0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xe1, 0xff, 0x7f, 0x3f, 0x00,
|
||||
0x00, 0x00, 0x3e, 0xff, 0xff, 0xc1, 0xc0, 0x80, 0x81, 0x81, 0xc3, 0xc3, 0xff, 0xfe, 0x3c, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x06, 0x06, 0x06, 0x04, 0x04, 0x04, 0x04, 0x06,
|
||||
0x06, 0x02, 0x03, 0x01, 0x01, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x06, 0x04, 0x04, 0x04, 0x04,
|
||||
0x06, 0x06, 0x06, 0x03, 0x03, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x01, 0x01, 0x00, 0x00, 0x60, 0x60, 0x70, 0x38, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00
|
||||
};
|
||||
oled_write_raw_P(lily58_logo, sizeof(lily58_logo));
|
||||
}
|
||||
|
||||
|
||||
# define KEYLOG_LEN 6
|
||||
char keylog_str[KEYLOG_LEN] = {};
|
||||
uint8_t keylogs_str_idx = 0;
|
||||
uint16_t log_timer = 0;
|
||||
|
||||
const char code_to_name[60] = {
|
||||
' ', ' ', ' ', ' ', 'a', 'k', 'x', 'i', 'p', 'e',
|
||||
',', 'c', 'd', 't', 's', 'r', 'q', ' ', 'l', 'j',
|
||||
'b', 'o', 'u', 'e', 'v', '.', 'e', 'y', '^', 'a',
|
||||
' ', ' ', ' ', '(', ')', '@', '+', '-', '/', '*',
|
||||
'R', 'E', 'B', 'T', '_', '-', '=', '[', ']', '\\',
|
||||
'#', ';', '\'', '`', ',', '.', '/', ' ', ' ', ' '};
|
||||
|
||||
void add_keylog(uint16_t keycode) {
|
||||
if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) {
|
||||
keycode = keycode & 0xFF;
|
||||
}
|
||||
|
||||
for (uint8_t i = KEYLOG_LEN - 1; i > 0; i--) {
|
||||
keylog_str[i] = keylog_str[i - 1];
|
||||
}
|
||||
if (keycode < 60) {
|
||||
keylog_str[0] = code_to_name[keycode];
|
||||
}
|
||||
keylog_str[KEYLOG_LEN - 1] = 0;
|
||||
|
||||
log_timer = timer_read();
|
||||
}
|
||||
|
||||
void update_log(void) {
|
||||
if (timer_elapsed(log_timer) > 750) {
|
||||
add_keylog(0);
|
||||
}
|
||||
}
|
||||
|
||||
void render_keylogger_status(void) {
|
||||
oled_write_P(PSTR("KLogr"), false);
|
||||
oled_write(keylog_str, false);
|
||||
}
|
||||
|
||||
void render_default_layer_state(void) {
|
||||
oled_write_P(PSTR("Layer"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _BEPO:
|
||||
oled_write_P(PSTR("BEPO"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_ln_P(PSTR("LOW"), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("HIGH"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_ln_P(PSTR("ADJ"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
}
|
||||
|
||||
void render_keylock_status(led_t led_state) {
|
||||
oled_write_ln_P(PSTR("Lock"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("N"), led_state.num_lock);
|
||||
oled_write_P(PSTR("C"), led_state.caps_lock);
|
||||
oled_write_ln_P(PSTR("S"), led_state.scroll_lock);
|
||||
}
|
||||
|
||||
void render_mod_status(uint8_t modifiers) {
|
||||
oled_write_ln_P(PSTR("Mods"), false);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_write_P(PSTR("S"), (modifiers & MOD_MASK_SHIFT));
|
||||
oled_write_P(PSTR("C"), (modifiers & MOD_MASK_CTRL));
|
||||
oled_write_P(PSTR("A"), (modifiers & MOD_MASK_ALT));
|
||||
oled_write_P(PSTR("G"), (modifiers & MOD_MASK_GUI));
|
||||
}
|
||||
|
||||
void render_status_main(void) {
|
||||
// Show keyboard layout
|
||||
render_default_layer_state();
|
||||
// Add a empty line
|
||||
oled_write_P(PSTR("-----"), false);
|
||||
// Show host keyboard led status
|
||||
render_keylock_status(host_keyboard_led_state());
|
||||
// Add a empty line
|
||||
oled_write_P(PSTR("-----"), false);
|
||||
// Show modifier status
|
||||
render_mod_status(get_mods());
|
||||
// Add a empty line
|
||||
oled_write_P(PSTR("-----"), false);
|
||||
render_keylogger_status();
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
update_log();
|
||||
if (is_keyboard_master()) {
|
||||
render_status_main(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_lily58_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
if (record->event.pressed) {
|
||||
add_keylog(keycode);
|
||||
}
|
||||
//return true;
|
||||
|
||||
//intercepting hold/tap to change hold function
|
||||
switch (keycode) {
|
||||
case MT(KC_CAPS, KC_ESC):
|
||||
if (!record->tap.count && record->event.pressed) {
|
||||
tap_code(KC_CAPS); // Intercept hold function to send Caps Lock
|
||||
return false;
|
||||
}
|
||||
return true; // Return true for normal processing of tap keycode
|
||||
case MT(BP_CCED, BP_C):
|
||||
if (!record->tap.count && record->event.pressed) {
|
||||
tap_code(BP_CCED); // Intercept hold function to send ç
|
||||
return false;
|
||||
}
|
||||
return true; // Return true for normal processing of tap keycode
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
|
||||
|
||||
// Rotary encoder related code
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { // Encoder on master side
|
||||
if(IS_LAYER_ON(_RAISE)) { // on Raise layer
|
||||
// Cursor control
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLD);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (index == 1) { // Encoder on slave side
|
||||
if(IS_LAYER_ON(_LOWER)) { // on Lower layer
|
||||
//
|
||||
if (clockwise) {
|
||||
tap_code(KC_RIGHT);
|
||||
} else {
|
||||
tap_code(KC_LEFT);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (clockwise) {
|
||||
tap_code(KC_DOWN);
|
||||
} else {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
//layer led modification
|
||||
// Light LEDs 6 to 9 and 12 to 15 red when caps lock is active. Hard to ignore!
|
||||
const rgblight_segment_t PROGMEM my_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 6, HSV_RED}, // Light 6 LEDs, starting with LED 0
|
||||
{35, 6, HSV_RED} // Light 6 LEDs, starting with LED 35
|
||||
);
|
||||
// Now define the array of layers. Later layers take precedence
|
||||
const rgblight_segment_t* const PROGMEM my_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
my_capslock_layer
|
||||
);
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = my_rgb_layers;
|
||||
}
|
||||
bool led_update_user(led_t led_state) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
return true;
|
||||
}
|
||||
2
keyboards/lily58/keymaps/niolang/rules.mk
Normal file
2
keyboards/lily58/keymaps/niolang/rules.mk
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
EXTRAKEY_ENABLE = yes
|
||||
OLED_ENABLE = yes
|
||||
|
|
@ -4,4 +4,6 @@
|
|||
#include "rev1.h"
|
||||
#elif KEYBOARD_lily58_light
|
||||
#include "light.h"
|
||||
#elif KEYBOARD_lily58_glow_enc
|
||||
#include "glow_enc.h"
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -68,5 +68,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue