Skip to content

Commit

Permalink
[Keyboard] Add Lemon40 keyboard (qmk#17357)
Browse files Browse the repository at this point in the history
  • Loading branch information
HorrorTroll authored and San0ix committed Jun 17, 2022
1 parent 321a880 commit ca5f1dd
Show file tree
Hide file tree
Showing 13 changed files with 892 additions and 0 deletions.
68 changes: 68 additions & 0 deletions keyboards/horrortroll/lemon40/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* 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 "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0x7516
#define PRODUCT_ID 0x2434
#define DEVICE_VER 0x0001
#define MANUFACTURER HorrorTroll
#define PRODUCT Lemon40

/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 7

/* key matrix pins */
#define MATRIX_ROW_PINS { D7, E6, B4, B5, D4, C6, D2, D3 }
#define MATRIX_COL_PINS { F5, F6, B1, B3, B2, B6, F7 }

#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

/* Forcing to use NKRO instead 6KRO */
#define FORCE_NKRO

/* Larger keys per scan */
#define QMK_KEYS_PER_SCAN 12

/* RGB light config */
#ifdef RGBLIGHT_ENABLE

/* RGB light pin */
#define RGB_DI_PIN F4
#define RGBLED_NUM 15

/* RGB light effect */
#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_ALTERNATING
#define RGBLIGHT_EFFECT_TWINKLE
#endif
61 changes: 61 additions & 0 deletions keyboards/horrortroll/lemon40/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"keyboard_name": "Lemon40",
"url": "",
"maintainer": "HorrorTroll",
"layouts": {
"LAYOUT": {
"layout": [
{"label":"Tab", "x":0, "y":0, "w":1.5},
{"label":"Q", "x":1.5, "y":0},
{"label":"W", "x":2.5, "y":0},
{"label":"E", "x":3.5, "y":0},
{"label":"R", "x":4.5, "y":0},
{"label":"T", "x":5.5, "y":0},
{"label":"Y", "x":8.25, "y":0},
{"label":"U", "x":9.25, "y":0},
{"label":"I", "x":10.25, "y":0},
{"label":"O", "x":11.25, "y":0},
{"label":"P", "x":12.25, "y":0},
{"label":"`~", "x":13.25, "y":0},
{"label":"Backspace", "x":14.25, "y":0, "w":1.25},

{"label":"Caps Lock", "x":0, "y":1, "w":1.75},
{"label":"A", "x":1.75, "y":1},
{"label":"S", "x":2.75, "y":1},
{"label":"D", "x":3.75, "y":1},
{"label":"F", "x":4.75, "y":1},
{"label":"G", "x":5.75, "y":1},
{"label":"H", "x":8.5, "y":1},
{"label":"J", "x":9.5, "y":1},
{"label":"K", "x":10.5, "y":1},
{"label":"L", "x":11.5, "y":1},
{"label":"\\|", "x":12.5, "y":1},
{"label":"Enter", "x":13.5, "y":1, "w":2},

{"label":"Shift", "x":0, "y":2, "w":2.25},
{"label":"Z", "x":2.25, "y":2},
{"label":"X", "x":3.25, "y":2},
{"label":"C", "x":4.25, "y":2},
{"label":"V", "x":5.25, "y":2},
{"label":"B", "x":6.25, "y":2},
{"label":"N", "x":8, "y":2},
{"label":"M", "x":9, "y":2},
{"label":",<", "x":10, "y":2},
{"label":".>", "x":11, "y":2},
{"label":"/?", "x":12.25, "y":2},
{"label":"\u2191", "x":13.25, "y":2},
{"label":"Shift", "x":14.25, "y":2, "w":1.25},

{"label":"Ctrl", "x":0, "y":3, "w":1.25},
{"label":"Win", "x":1.25, "y":3, "w":1.25},
{"label":"Alt", "x":3.25, "y":3, "w":1.25},
{"label":"Space", "x":4.5, "y":3, "w":2.75},
{"label":"Space", "x":8, "y":3, "w":2.25},
{"label":"Fn", "x":10.25, "y":3, "w":1.25},
{"label":"\u2190", "x":12.25, "y":3},
{"label":"\u2193", "x":13.25, "y":3},
{"label":"\u2192", "x":14.25, "y":3}
]
}
}
}
99 changes: 99 additions & 0 deletions keyboards/horrortroll/lemon40/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* 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

// Each layer gets a name for readability, which is then used in the keymap matrix below.
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
// Layer names don't all need to be of the same length, obviously, and you can also skip them
// entirely and just use numbers.

enum layer_names {
_BASE,
_FN,
_FN1
};

// enum layer_keycodes { };

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

/*
┌─────┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬────┐
│ Tab │ q │ w │ e │ r │ t │ │ y │ u │ i │ o │ p │ ` │Bksp│
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤
│ Caps │ a │ s │ d │ f │ g │ │ h │ j │ k │ l │ \ │ Enter │
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬┬┴──┬┴──┬────┤
│ LShift │ z │ x │ c │ v │ b │ │ n │ m │ , │ . ││ / │ ↑ │RSft│
└┬────┬──┴─┬─┼───┴┬──┴───┴───┤ ├───┴───┴┬──┴─┬─┘├───┼───┼───┬┘
│LCrl│GUI │ │LAlt│ Space │ │ Space │ Fn │ │ ← │ ↓ │ → │
└────┴────┘ └────┴──────────┘ └────────┴────┘ └───┴───┴───┘
┌─────┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬────┐
│ │ Q │ W │ E │ R │ T │ │ Y │ U │ I │ O │ P │ ~ │ │
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤
│ Caps │ A │ S │ D │ F │ G │ │ H │ J │ K │ L │ | │ │
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬┬┴──┬┴──┬────┤
│ LShift │ Z │ X │ C │ V │ B │ │ N │ M │ < │ > ││ ? │ │RSft│
└┬────┬──┴─┬─┼───┴┬──┴───┴───┤ ├───┴───┴┬──┴─┬─┘├───┼───┼───┬┘
│ │ │ │ │ │ │ │ │ │ │ │ │
└────┴────┘ └────┴──────────┘ └────────┴────┘ └───┴───┴───┘
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 */
[_BASE] = LAYOUT(
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_GRV, KC_BSPC,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSLS, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_RIGHT
),

/*
┌─────┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬────┐
│ Esc │ 1 │ 2 │ 3 │ 4 │ 5 │ │ 6 │ 7 │ 8 │ 9 │ 0 │ │ Del│
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤
│Reset │ │ │End│ │ │ │Hom│ │Ins│ │PSc│ Fn1 │
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬┬┴──┬┴──┬────┤
│ │ │ │Cal│ │ │ │ │Mut│VoD│VoU││ │PgU│ │
└┬────┬──┴─┬─┼───┴┬──┴───┴───┤ ├───┴───┴┬──┴─┬─┘├───┼───┼───┬┘
│ │ │ │ │ │ │ │ │ │ │PgD│ │
└────┴────┘ └────┴──────────┘ └────────┴────┘ └───┴───┴───┘
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 */
[_FN] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, KC_DEL,
QK_BOOT, _______, _______, KC_END, _______, _______, KC_HOME, _______, KC_INS, _______, KC_PSCR, MO(_FN1),
_______, _______, _______, KC_CALC, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_PGUP, _______,
_______, _______, _______, _______, _______, _______, _______, KC_PGDN, _______
),

/*
┌─────┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬────┐
│ │ │ │ │ │ │ │ │ │ │ │Mod│Rod│ Tog│
├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴────┤
│ │ │ │ │ │ │ │ │ │ │ │ │ │
├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬┬┴──┬┴──┬────┤
│ │ │ │ │ │ │ │ │ │ │ ││Sad│Vai│ Sai│
└┬────┬──┴─┬─┼───┴┬──┴───┴───┤ ├───┴───┴┬──┴─┬─┘├───┼───┼───┬┘
│ │ │ │ │ │ │ │ │ │Hud│Vad│Hui│
└────┴────┘ └────┴──────────┘ └────────┴────┘ └───┴───┴───┘
*/
/* Row: 0 1 2 3 4 5 6 7 8 9 10 11 12 */
[_FN1] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_RMOD, RGB_TOG,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_VAI, RGB_SAI,
_______, _______, _______, _______, _______, _______, RGB_HUD, RGB_VAD, RGB_HUI
),
};
21 changes: 21 additions & 0 deletions keyboards/horrortroll/lemon40/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
*
* 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

/* Additional thing to reduce compiled size */
#define DYNAMIC_KEYMAP_LAYER_COUNT 3
#define NO_ACTION_ONESHOT
Loading

0 comments on commit ca5f1dd

Please sign in to comment.