Skip to content

Commit

Permalink
my lily58 keymap qmk#1
Browse files Browse the repository at this point in the history
  • Loading branch information
jbillon committed Aug 15, 2022
1 parent a54ccb4 commit 6363c57
Show file tree
Hide file tree
Showing 3 changed files with 215 additions and 0 deletions.
46 changes: 46 additions & 0 deletions keyboards/lily58/keymaps/jubi/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/*
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

#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 100

#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17

// Underglow
/*
#undef RGBLED_NUM
#define RGBLED_NUM 14 // Number of LEDs
#define RGBLIGHT_ANIMATIONS
#define RGBLIGHT_SLEEP
*/
149 changes: 149 additions & 0 deletions keyboards/lily58/keymaps/jubi/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
#include QMK_KEYBOARD_H

enum layer_number {
_QWERTY = 0,
_LOWER,
_RAISE,
_ADJUST,
};

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

/* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | = |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* |LShift| A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| RAISE | | XXX |------+------+------+------+------+------|
* |LCTRL | Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ |
* `-----------------------------------------/ / \ \-----------------------------------------'
* |RAISE | LAlt |LGUI | /Space / \Enter \ |RAISE |BackSP| ESC |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/

[_QWERTY] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, 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_EQL,
KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_RAISE), KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
TG(_RAISE), KC_LALT, KC_LGUI, KC_SPC, KC_ENT, MO(_RAISE), KC_BSPC, KC_ESC
),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | |-------. ,-------| | | | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* |RAISE | LAlt |LGUI | /Space / \Enter \ |RAISE |BackSP| ESC |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/
[_LOWER] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
/* RAISE
* ,-----------------------------------------. ,-----------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | ` | F11 | F12 | | | Vup | | PGUP | HOME | Up | END | { | } |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | Prev |Play/P| Next | Vdo |-------. ,-------| PGDO | Left | Down | Right| [ | ] |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | CAPS | | | | Mute |-------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* |RAISE | LAlt |LGUI | /Space / \Enter \ |RAISE | DEL | ESC |
* | | | |/ / \ \ | | | |
* `----------------------------' '------''--------------------'
*/

[_RAISE] = LAYOUT(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, KC_F11, KC_F12, _______, _______, KC_KB_VOLUME_UP, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_LCBR, KC_RCBR,
_______, _______, KC_MRWD, KC_MPLY, KC_MFFD, KC_KB_VOLUME_DOWN, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_LBRC, KC_RBRC,
_______, KC_CAPS, _______, _______, _______, KC_KB_MUTE, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_DEL, _______
),
/* ADJUST
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | |-------. ,-------| | |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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
_______, _______, _______, _______, _______, _______, _______, _______
)
};

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

//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_180; // flips the display 180 degrees if offhand
return rotation;
}

// When you add source files to SRC in rules.mk, you can use functions.
const char *read_layer_state(void);
const char *read_logo(void);
void set_keylog(uint16_t keycode, keyrecord_t *record);
const char *read_keylog(void);
const char *read_keylogs(void);

// const char *read_mode_icon(bool swap);
// const char *read_host_led_state(void);
// void set_timelog(void);
// const char *read_timelog(void);

bool oled_task_user(void) {
if (is_keyboard_master()) {
// If you want to change the display of OLED, you need to change here
oled_write_ln(read_layer_state(), false);
oled_write_ln(read_keylog(), false);
oled_write_ln(read_keylogs(), false);
//oled_write_ln(read_mode_icon(keymap_config.swap_lalt_lgui), false);
//oled_write_ln(read_host_led_state(), false);
//oled_write_ln(read_timelog(), false);
} else {
oled_write(read_logo(), false);
}
return false;
}
#endif // OLED_ENABLE

bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
#ifdef OLED_ENABLE
set_keylog(keycode, record);
#endif
// set_timelog();
}
return true;
}
20 changes: 20 additions & 0 deletions keyboards/lily58/keymaps/jubi/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = yes # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no
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= yes # OLED display

# If you want to change the display of OLED, you need to change here
SRC += ./lib/rgb_state_reader.c \
./lib/layer_state_reader.c \
./lib/logo_reader.c \
./lib/keylogger.c \
# ./lib/mode_icon_reader.c \
# ./lib/host_led_state_reader.c \
# ./lib/timelogger.c \

0 comments on commit 6363c57

Please sign in to comment.