mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-25 09:56:54 +06:00
[Keyboard] Lime by HellTM (#14710)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
This commit is contained in:
parent
48eddeeea4
commit
c48e9f9e77
20
keyboards/lime/config.h
Normal file
20
keyboards/lime/config.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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"
|
||||
|
22
keyboards/lime/keymaps/default/config.h
Normal file
22
keyboards/lime/keymaps/default/config.h
Normal file
|
@ -0,0 +1,22 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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
|
||||
|
||||
#define OLED_TIMEOUT 120000
|
||||
#define OLED_BRIGHTNESS 120
|
||||
#define OLED_FONT_H "keyboards/lime/lib/glcdfont.c"
|
713
keyboards/lime/keymaps/default/keymap.c
Normal file
713
keyboards/lime/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,713 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifdef JOYSTICK_ENABLE
|
||||
# include "joystick.h"
|
||||
# include "analog.h"
|
||||
#endif
|
||||
|
||||
enum lime_layers {
|
||||
/* _M_XYZ = Mac Os, _W_XYZ = Win/Linux */
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_QWERTY = SAFE_RANGE,
|
||||
KC_COLEMAK,
|
||||
KC_LOWER,
|
||||
KC_RAISE,
|
||||
KC_ADJUST,
|
||||
KC_PRVWD,
|
||||
KC_NXTWD,
|
||||
KC_LSTRT,
|
||||
KC_LEND,
|
||||
KC_DLINE,
|
||||
KC_BSPC_DEL,
|
||||
KC_THUMB_SWAP,
|
||||
KC_THUMB_LEFT,
|
||||
KC_THUMB_RIGHT,
|
||||
KC_JOYSTICK_DEBUG,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* QWERTY
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | ` |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Caps | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------| | | Mute |------+------+------+------+------+------|
|
||||
* |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / | \ |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* |Lower | LGUI | LAlt | DEL | LCTR | /Enter / \Space \ |Raise | [ | ] | - | = |
|
||||
* | | | | | |/ / \ \ | | | | | |
|
||||
* `----------------------------------------' '------''----------------------------------'
|
||||
*/
|
||||
|
||||
[_QWERTY] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC_DEL,
|
||||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, KC_MUTE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
|
||||
KC_LOWER, KC_LGUI,KC_LALT,KC_DEL, KC_LCTRL, KC_THUMB_LEFT, KC_THUMB_RIGHT, KC_RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL
|
||||
),
|
||||
|
||||
/*
|
||||
* COLEMAK
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BS |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | ` |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Caps | A | R | S | T | D |-------. ,-------| H | N | E | I | O | ' |
|
||||
* |------+------+------+------+------+------| | | Mute |------+------+------+------+------+------|
|
||||
* |LShift| Z | X | C | V | B |-------| |-------| K | M | , | . | / | \ |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* |Lower | LGUI | LAlt | DEL | LCTR | /Enter / \Space \ |Raise | [ | ] | - | = |
|
||||
* | | | | | |/ / \ \ | | | | | |
|
||||
* `----------------------------------------' '------''----------------------------------'
|
||||
*/
|
||||
|
||||
[_COLEMAK] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_GRV,
|
||||
KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, XXXXXXX, KC_MUTE, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_BSLS,
|
||||
KC_LOWER, KC_LGUI,KC_LALT,KC_DEL, KC_LCTRL, KC_THUMB_LEFT, KC_THUMB_RIGHT, KC_RAISE, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL
|
||||
),
|
||||
|
||||
/* RAISE
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | Ins | Pscr | Menu | | | | | PWrd | Up | NWrd | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Caps | LAt | LCtl |LShift| | |-------. ,-------| | Left | Down | Rigth| | |
|
||||
* |------+------+------+------+------+------| | | Mute |------+------+------+------+------+------|
|
||||
* |LShift| | | | | |-------| |-------| | LStr | DLine| LEnd | | |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* |Lower | LGUI | LAlt | DEL | LCTR | /Enter / \Space \ |Raise | | | | |
|
||||
* | | | | | |/ / \ \ | | | | | |
|
||||
* `----------------------------------------' '------''----------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT(
|
||||
_______, _______ , _______ , _______ , _______ , _______, _______, _______ , _______ , _______ , _______ , _______,
|
||||
_______, KC_INS, KC_PSCR, KC_APP, XXXXXXX, XXXXXXX, KC_PGUP, KC_PRVWD, KC_UP, KC_NXTWD, XXXXXXX, XXXXXXX,
|
||||
_______, KC_LALT, KC_LCTL, KC_LSFT, XXXXXXX, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX,
|
||||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, KC_LSTRT, KC_DLINE, KC_LEND, XXXXXXX, XXXXXXX,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
/* LOWER
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | Esc | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | F12 |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Caps | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | | |
|
||||
* |------+------+------+------+------+------| | | Mute |------+------+------+------+------+------|
|
||||
* |LShift| = | - | + | { | } |-------| |-------| [ | ] | ; | : | \ | ` |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* |Lower | LGUI | LAlt | DEL | LCTR | /Enter / \Space \ |Raise | | | | |
|
||||
* | | | | | |/ / \ \ | | | | | |
|
||||
* `----------------------------------------' '------''----------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F12,
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE,
|
||||
_______, KC_EQL, KC_MINS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, KC_LBRC, KC_RBRC, KC_SCLN, KC_COLN, KC_BSLS, KC_GRV,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
/* ADJUST
|
||||
* ,-----------------------------------------. ,-----------------------------------------.
|
||||
* | RESET| | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | |QWERTY| | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | |JDEBUG| | |-------. ,-------| | VOLDO| MUTE | VOLUP| | |
|
||||
* |------+------+------+------+------+------| | | Mute |------+------+------+------+------+------|
|
||||
* | | | |COLEMA| | |-------| |-------| | PREV | PLAY | NEXT | | |
|
||||
* `-----------------------------------------/ / \ \-----------------------------------------'
|
||||
* |Lower |MACWIN| | | | / Swap / \ \ |Raise | | | | |
|
||||
* | | | | | |/ / \ \ | | | | | |
|
||||
* `----------------------------------------' '------''----------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT(
|
||||
RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, KC_QWERTY, XXXXXXX, XXXXXXX, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_JOYSTICK_DEBUG,XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_COLEMAK, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX,
|
||||
_______, CG_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, KC_THUMB_SWAP, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef JOYSTICK_ENABLE
|
||||
/* Joystick pins */
|
||||
# ifndef JOYSTICK_X_PIN
|
||||
# define JOYSTICK_X_PIN F5
|
||||
# define JOYSTICK_Y_PIN F4
|
||||
# endif
|
||||
|
||||
/* Joystick + Encoder fix */
|
||||
void keyboard_post_init_kb(void) {
|
||||
if (is_keyboard_master()) {
|
||||
writePinLow(JOYSTICK_X_PIN);
|
||||
writePinLow(JOYSTICK_Y_PIN);
|
||||
}
|
||||
}
|
||||
|
||||
/* Joystick axes settings */
|
||||
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
|
||||
[0] = JOYSTICK_AXIS_IN(JOYSTICK_X_PIN, 268, 514, 813),
|
||||
[1] = JOYSTICK_AXIS_IN(JOYSTICK_Y_PIN, 865, 519, 260)
|
||||
};
|
||||
#endif
|
||||
|
||||
/* Joystick Debug */
|
||||
bool joystick_debug = false;
|
||||
|
||||
/* Space Enter swap */
|
||||
bool swap_space_enter = false;
|
||||
|
||||
/* Smart Backspace Delete */
|
||||
bool shift_held = false;
|
||||
static uint16_t held_shift = 0;
|
||||
|
||||
/* keyboard pet jump status variables */
|
||||
bool isJumping = false;
|
||||
bool showedJump = true;
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
/* Keyboard logo (from gdlcfont.c) */
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM lime_logo[] = {
|
||||
0x80, 0x81, 0x82, 0x83, 0x84,
|
||||
0xA0, 0xA1, 0xA2, 0xA3, 0xA4,
|
||||
0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0
|
||||
};
|
||||
|
||||
oled_write_P(lime_logo, false);
|
||||
}
|
||||
|
||||
/* Keyboard Pet settings */
|
||||
#define MIN_WALK_SPEED 10
|
||||
#define MIN_RUN_SPEED 50
|
||||
#define ANIM_FRAME_DURATION 200 // how long each frame lasts in ms
|
||||
#define ANIM_SIZE 96 // number of bytes per image
|
||||
|
||||
/* Keyboard Pet status variables */
|
||||
led_t led_usb_state;
|
||||
uint8_t current_wpm = 0;
|
||||
uint8_t current_frame = 0;
|
||||
uint32_t anim_timer = 0;
|
||||
uint32_t anim_sleep = 0;
|
||||
|
||||
/* Keyboard Pet logic */
|
||||
static void render_keyboard_pet(int KEYBOARD_PET_X, int KEYBOARD_PET_Y) {
|
||||
|
||||
/* Sit */
|
||||
static const char PROGMEM sit[2][ANIM_SIZE] = {
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c,
|
||||
0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28,
|
||||
0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c,
|
||||
0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28,
|
||||
0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
||||
/* Walk */
|
||||
static const char PROGMEM walk[2][ANIM_SIZE] = {
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80,
|
||||
0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03,
|
||||
0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e,
|
||||
0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
||||
/* Run */
|
||||
static const char PROGMEM run[2][ANIM_SIZE] = {
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||
0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01,
|
||||
0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
{
|
||||
0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37,
|
||||
0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
||||
/* Bark */
|
||||
static const char PROGMEM bark[2][ANIM_SIZE] = {
|
||||
{
|
||||
0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40,
|
||||
0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02,
|
||||
0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
},
|
||||
{
|
||||
0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40,
|
||||
0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02,
|
||||
0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
||||
/* animation */
|
||||
void animate_keyboard_pet(void) {
|
||||
|
||||
/* jump */
|
||||
if (isJumping || !showedJump) {
|
||||
oled_set_cursor(KEYBOARD_PET_X,KEYBOARD_PET_Y +2);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_set_cursor(KEYBOARD_PET_X,KEYBOARD_PET_Y -1);
|
||||
showedJump = true;
|
||||
} else {
|
||||
oled_set_cursor(KEYBOARD_PET_X,KEYBOARD_PET_Y -1);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_set_cursor(KEYBOARD_PET_X,KEYBOARD_PET_Y);
|
||||
}
|
||||
|
||||
/* switch frame */
|
||||
current_frame = (current_frame + 1) % 2;
|
||||
|
||||
/* current animation status */
|
||||
if(led_usb_state.caps_lock) {
|
||||
oled_write_raw_P(bark[abs(1 - current_frame)], ANIM_SIZE);
|
||||
} else if(current_wpm <= MIN_WALK_SPEED) {
|
||||
oled_write_raw_P(sit[abs(1 - current_frame)], ANIM_SIZE);
|
||||
} else if(current_wpm <= MIN_RUN_SPEED) {
|
||||
oled_write_raw_P(walk[abs(1 - current_frame)], ANIM_SIZE);
|
||||
} else {
|
||||
oled_write_raw_P(run[abs(1 - current_frame)], ANIM_SIZE);
|
||||
}
|
||||
}
|
||||
|
||||
/* animation timer */
|
||||
if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) {
|
||||
anim_timer = timer_read32();
|
||||
if(timer_elapsed32(anim_sleep) < OLED_TIMEOUT) {
|
||||
animate_keyboard_pet();
|
||||
}
|
||||
}
|
||||
|
||||
if (current_wpm > 0) {
|
||||
anim_sleep = timer_read32();
|
||||
} else if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void print_logo_narrow(void) {
|
||||
|
||||
/* Keyboard logo */
|
||||
render_logo();
|
||||
|
||||
/* wpm counter */
|
||||
char wpm_str[5];
|
||||
wpm_str[4] = '\0';
|
||||
wpm_str[3] = '0' + current_wpm % 10;
|
||||
wpm_str[2] = '0' + ( current_wpm /= 10) % 10;
|
||||
wpm_str[1] = '0' + current_wpm / 10;
|
||||
wpm_str[0] = ' ';
|
||||
oled_set_cursor(0,14);
|
||||
oled_write(wpm_str, false);
|
||||
oled_write_P(PSTR(" wpm"), false);
|
||||
}
|
||||
|
||||
static void print_status_narrow(void) {
|
||||
|
||||
/* Print current OS */
|
||||
oled_set_cursor(2,0);
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
oled_write_P(PSTR("\x9E"), false);
|
||||
} else {
|
||||
oled_write_P(PSTR("\x9F"), false);
|
||||
}
|
||||
|
||||
/* Print current layout */
|
||||
oled_set_cursor(0,2);
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("QWRTY"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_P(PSTR("COLMK"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("UNDEF"), false);
|
||||
}
|
||||
|
||||
/* Print current layer */
|
||||
oled_set_cursor(0,4);
|
||||
oled_write_P(PSTR("LAYER"), false);
|
||||
oled_set_cursor(0,5);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Base "), false);
|
||||
break;
|
||||
case _RAISE:
|
||||
oled_write_P(PSTR("Raise"), false);
|
||||
break;
|
||||
case _LOWER:
|
||||
oled_write_P(PSTR("Lower"), false);
|
||||
break;
|
||||
case _ADJUST:
|
||||
oled_write_P(PSTR("Adj "), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Undef"), false);
|
||||
}
|
||||
|
||||
/* caps lock */
|
||||
oled_set_cursor(0,7);
|
||||
oled_write_P(PSTR("CAPS"), false);
|
||||
if (led_usb_state.caps_lock) {
|
||||
oled_write_P(PSTR("\x9A"), false);
|
||||
} else {
|
||||
oled_write_P(PSTR("\x99"), false);
|
||||
}
|
||||
|
||||
/* Space Enter swap */
|
||||
oled_set_cursor(0,9);
|
||||
oled_write_P(PSTR("\x9B"), false);
|
||||
oled_set_cursor(2,9);
|
||||
oled_write_P(PSTR("\x9C"), !swap_space_enter);
|
||||
oled_set_cursor(4,9);
|
||||
oled_write_P(PSTR("\x9D"), swap_space_enter);
|
||||
|
||||
/* Joystick debugging */
|
||||
# ifdef JOYSTICK_ENABLE
|
||||
if (joystick_debug) {
|
||||
oled_set_cursor(0,10);
|
||||
oled_write_P(PSTR("X:"), false);
|
||||
uint16_t val = analogReadPin(JOYSTICK_X_PIN);
|
||||
char val_str[3];
|
||||
itoa(val, val_str, 10);
|
||||
oled_write(val_str, false);
|
||||
oled_set_cursor(0,11);
|
||||
oled_write_P(PSTR("Y:"), false);
|
||||
val = analogReadPin(JOYSTICK_Y_PIN);
|
||||
itoa(val, val_str, 10);
|
||||
oled_write(val_str, false);
|
||||
} else {
|
||||
oled_set_cursor(0,10);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
oled_set_cursor(0,11);
|
||||
oled_write_P(PSTR(" "), false);
|
||||
}
|
||||
# endif
|
||||
|
||||
/* Keyboard Pet Render */
|
||||
render_keyboard_pet(0,13);
|
||||
}
|
||||
|
||||
/* vertical screens orientation fix */
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
|
||||
void oled_task_user(void) {
|
||||
|
||||
/* Keyboard Pet Variables */
|
||||
current_wpm = get_current_wpm();
|
||||
led_usb_state = host_keyboard_led_state();
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
print_status_narrow();
|
||||
} else {
|
||||
print_logo_narrow();
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case KC_COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
case KC_LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case KC_RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case KC_ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
case KC_PRVWD:
|
||||
if (record->event.pressed) {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
register_mods(mod_config(MOD_LALT));
|
||||
register_code(KC_LEFT);
|
||||
} else {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
register_code(KC_LEFT);
|
||||
}
|
||||
} else {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
unregister_mods(mod_config(MOD_LALT));
|
||||
unregister_code(KC_LEFT);
|
||||
} else {
|
||||
unregister_mods(mod_config(MOD_LCTL));
|
||||
unregister_code(KC_LEFT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KC_NXTWD:
|
||||
if (record->event.pressed) {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
register_mods(mod_config(MOD_LALT));
|
||||
register_code(KC_RIGHT);
|
||||
} else {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
register_code(KC_RIGHT);
|
||||
}
|
||||
} else {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
unregister_mods(mod_config(MOD_LALT));
|
||||
unregister_code(KC_RIGHT);
|
||||
} else {
|
||||
unregister_mods(mod_config(MOD_LCTL));
|
||||
unregister_code(KC_RIGHT);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KC_LSTRT:
|
||||
if (record->event.pressed) {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
/* CMD-arrow on Mac, but we have CTL and GUI swapped */
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
register_code(KC_LEFT);
|
||||
} else {
|
||||
register_code(KC_HOME);
|
||||
}
|
||||
} else {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
unregister_mods(mod_config(MOD_LCTL));
|
||||
unregister_code(KC_LEFT);
|
||||
} else {
|
||||
unregister_code(KC_HOME);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KC_LEND:
|
||||
if (record->event.pressed) {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
/* CMD-arrow on Mac, but we have CTL and GUI swapped */
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
register_code(KC_RIGHT);
|
||||
} else {
|
||||
register_code(KC_END);
|
||||
}
|
||||
} else {
|
||||
if (keymap_config.swap_lctl_lgui) {
|
||||
unregister_mods(mod_config(MOD_LCTL));
|
||||
unregister_code(KC_RIGHT);
|
||||
} else {
|
||||
unregister_code(KC_END);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KC_DLINE:
|
||||
if (record->event.pressed) {
|
||||
register_mods(mod_config(MOD_LCTL));
|
||||
register_code(KC_BSPC);
|
||||
} else {
|
||||
unregister_mods(mod_config(MOD_LCTL));
|
||||
unregister_code(KC_BSPC);
|
||||
}
|
||||
break;
|
||||
|
||||
case KC_JOYSTICK_DEBUG:
|
||||
if (record->event.pressed) {
|
||||
joystick_debug = !joystick_debug;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
/* Space Enter swap */
|
||||
case KC_THUMB_SWAP:
|
||||
if (record->event.pressed) {
|
||||
swap_space_enter = !swap_space_enter;
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_THUMB_LEFT:
|
||||
if (record->event.pressed) {
|
||||
if (swap_space_enter) {
|
||||
register_code(KC_SPC);
|
||||
|
||||
/*Keyboard Pet jump*/
|
||||
isJumping = true;
|
||||
showedJump = false;
|
||||
} else {
|
||||
register_code(KC_ENT);
|
||||
}
|
||||
} else {
|
||||
if (swap_space_enter) {
|
||||
unregister_code(KC_SPC);
|
||||
|
||||
/*Keyboard Pet jump reset*/
|
||||
isJumping = false;
|
||||
} else {
|
||||
unregister_code(KC_ENT);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case KC_THUMB_RIGHT:
|
||||
if (record->event.pressed) {
|
||||
if (swap_space_enter) {
|
||||
register_code(KC_ENT);
|
||||
} else {
|
||||
register_code(KC_SPC);
|
||||
isJumping = true;
|
||||
showedJump = false;
|
||||
}
|
||||
} else {
|
||||
if (swap_space_enter) {
|
||||
unregister_code(KC_ENT);
|
||||
} else {
|
||||
unregister_code(KC_SPC);
|
||||
isJumping = false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
/* Smart Backspace Delete */
|
||||
case KC_RSFT:
|
||||
case KC_LSFT:
|
||||
shift_held = record->event.pressed;
|
||||
held_shift = keycode;
|
||||
break;
|
||||
case KC_BSPC_DEL:
|
||||
if (record->event.pressed) {
|
||||
if (shift_held) {
|
||||
unregister_code(held_shift);
|
||||
register_code(KC_DEL);
|
||||
} else {
|
||||
register_code(KC_BSPC);
|
||||
}
|
||||
} else {
|
||||
unregister_code(KC_DEL);
|
||||
unregister_code(KC_BSPC);
|
||||
if (shift_held) {
|
||||
register_code(held_shift);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* The default rotary encoder code can be found at the bottom of qmk_firmware/keyboards/lime/rev1/rev1.c
|
||||
* These default settings can be overriden by your own settings in your keymap.c
|
||||
* For your convenience, here's a copy of those settings so that you can uncomment them if you wish to apply your own modifications.
|
||||
* DO NOT edit the rev1.c file; instead override the weakly defined default functions by your own.
|
||||
*/
|
||||
|
||||
/* DELETE THIS LINE TO UNCOMMENT (1/2)
|
||||
|
||||
// Encoders
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
DELETE THIS LINE TO UNCOMMENT (2/2) */
|
52
keyboards/lime/keymaps/default/readme.md
Normal file
52
keyboards/lime/keymaps/default/readme.md
Normal file
|
@ -0,0 +1,52 @@
|
|||
## Default layout
|
||||
Joystick on the left side, encoder on the right. No underglow.
|
||||
|
||||
### Base layer
|
||||
![Base layout for Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/base-layer.png?raw=true)
|
||||
The layout can be switched for COLEMAK in the settings layer
|
||||
|
||||
### Lower layer
|
||||
![Lower layout for Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/lower-layer.png?raw=true)
|
||||
|
||||
### Raise layer
|
||||
![Raise layout for Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/raise-layer.png?raw=true)
|
||||
|
||||
### Settings layer
|
||||
![Adj layout for Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/adj-layer.png?raw=true)
|
||||
|
||||
This layer can be accessed with the following combination:
|
||||
|
||||
![Adj layout combination for Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/buttons-layer.png?raw=true)
|
||||
|
||||
## Extras
|
||||
|
||||
### Keyboard Pet (Luna)
|
||||
![Adj layout for Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/luna.gif?raw=true)
|
||||
|
||||
Luna jumps every time you hit Space and will bark at people on the internet if you activate Caps Lock!
|
||||
|
||||
This keyboard pet reacts to your WPM counter:
|
||||
- under 10 -> sit
|
||||
- between 10 and 50 -> walk
|
||||
- over 50 -> run
|
||||
|
||||
### Joystick
|
||||
The joystick on the left side will act as a controller for games.
|
||||
|
||||
### Shift + Backspace = Delete
|
||||
This one is pretty self explanatory.
|
||||
|
||||
### Space / Enter swap
|
||||
The Enter and Space functions can be swapped pressing the left thumb button from the Setting layer. The current mode will be displayed on the left display. This one may be useful to all the gamers out there!
|
||||
|
||||
### OS Switch
|
||||
Pressing the OS button while on the settings layer will toggle the MAC / WIN mode. This corrects the behaviour of the Alt and Control modifiers. The current selection will be displayed with an icon at the top of the left display.
|
||||
|
||||
### Media Buttons
|
||||
The right encoder controls the volume and can be pressed to mute. Extra media buttons are hidden away on the settings layer.
|
||||
|
||||
### WPM indicator
|
||||
Current WPM will be displayed at the bottom of the right screen.
|
||||
|
||||
### Joystick Debug
|
||||
The JDebug button on the settings layer toggles the ADC readings of the joystick pins for X and Y axis. These will be displayed on the left OLED.
|
7
keyboards/lime/keymaps/default/rules.mk
Normal file
7
keyboards/lime/keymaps/default/rules.mk
Normal file
|
@ -0,0 +1,7 @@
|
|||
OLED_ENABLE = yes
|
||||
ENCODER_ENABLE = yes
|
||||
JOYSTICK_ENABLE = yes
|
||||
JOYSTICK_DRIVER = analog
|
||||
EXTRAKEY_ENABLE = yes
|
||||
WPM_ENABLE = yes
|
||||
SRC += analog.c
|
232
keyboards/lime/lib/glcdfont.c
Normal file
232
keyboards/lime/lib/glcdfont.c
Normal file
|
@ -0,0 +1,232 @@
|
|||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0.
|
||||
// See gfxfont.h for newer custom bitmap font info.
|
||||
|
||||
#include "progmem.h"
|
||||
|
||||
// Standard ASCII 5x7 font
|
||||
const unsigned char font[] PROGMEM = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00,
|
||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00,
|
||||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00,
|
||||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00,
|
||||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00,
|
||||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00,
|
||||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00,
|
||||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00,
|
||||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00,
|
||||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00,
|
||||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00,
|
||||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00,
|
||||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00,
|
||||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00,
|
||||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00,
|
||||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00,
|
||||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00,
|
||||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00,
|
||||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00,
|
||||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00,
|
||||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00,
|
||||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00,
|
||||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00,
|
||||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00,
|
||||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00,
|
||||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00,
|
||||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00,
|
||||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00,
|
||||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00,
|
||||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00,
|
||||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00,
|
||||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00,
|
||||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00,
|
||||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00,
|
||||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00,
|
||||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00,
|
||||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00,
|
||||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00,
|
||||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
|
||||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00,
|
||||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00,
|
||||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00,
|
||||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00,
|
||||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00,
|
||||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00,
|
||||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00,
|
||||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00,
|
||||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00,
|
||||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00,
|
||||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00,
|
||||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00,
|
||||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
|
||||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00,
|
||||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00,
|
||||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00,
|
||||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00,
|
||||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00,
|
||||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00,
|
||||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00,
|
||||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00,
|
||||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00,
|
||||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00,
|
||||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00,
|
||||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00,
|
||||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00,
|
||||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00,
|
||||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00,
|
||||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00,
|
||||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00,
|
||||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00,
|
||||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00,
|
||||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00,
|
||||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00,
|
||||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00,
|
||||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00,
|
||||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00,
|
||||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00,
|
||||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00,
|
||||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00,
|
||||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00,
|
||||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00,
|
||||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00,
|
||||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00,
|
||||
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00,
|
||||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00,
|
||||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00,
|
||||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00,
|
||||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00,
|
||||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00,
|
||||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00,
|
||||
0x7C, 0x18, 0x24, 0x24, 0x18, 0x00,
|
||||
0x18, 0x24, 0x24, 0x18, 0x7C, 0x00,
|
||||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00,
|
||||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00,
|
||||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00,
|
||||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00,
|
||||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00,
|
||||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00,
|
||||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00,
|
||||
0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00,
|
||||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00,
|
||||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00,
|
||||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00,
|
||||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00,
|
||||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00,
|
||||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xC0, 0x30, 0xC8, 0xF4,
|
||||
0xEA, 0xDA, 0xBD, 0x7D, 0x83, 0x7D,
|
||||
0xBD, 0xDA, 0xEA, 0xF4, 0xC8, 0x30,
|
||||
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0xF0, 0xFE, 0xF1, 0x91, 0xF6, 0xF0,
|
||||
0xF0, 0xFC, 0xF2, 0x92, 0xFC, 0xF0,
|
||||
0x10, 0x38, 0x54, 0x10, 0x10, 0x1E,
|
||||
0x00, 0x7E, 0x40, 0x40, 0x40, 0x00,
|
||||
0x00, 0x7E, 0x12, 0x12, 0x6C, 0x00,
|
||||
0x18, 0x3C, 0x7C, 0x3A, 0x7D, 0x24,
|
||||
0x14, 0x36, 0x00, 0x36, 0x77, 0x77,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x40,
|
||||
0xC0, 0x00, 0x07, 0x19, 0x26, 0x5E,
|
||||
0xAE, 0xB6, 0x7A, 0x7D, 0x82, 0x7D,
|
||||
0x7A, 0xB6, 0xAE, 0x5E, 0x26, 0x19,
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x80, 0x40, 0x3C, 0x53, 0x88, 0x84,
|
||||
0xC3, 0x60, 0x90, 0x84, 0x60, 0x30,
|
||||
0x90, 0x70, 0x21, 0x11, 0x71, 0x81,
|
||||
0x61, 0x50, 0xB0, 0x80, 0x00, 0x00,
|
||||
0x30, 0xC0, 0x30, 0x00, 0x20, 0xF0,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
};
|
46
keyboards/lime/lime.c
Normal file
46
keyboards/lime/lime.c
Normal file
|
@ -0,0 +1,46 @@
|
|||
#include "lime.h"
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
|
||||
__attribute__ ((weak))
|
||||
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] =
|
||||
// The LAYOUT macro could work for this, but it was harder to figure out the
|
||||
// identity using it.
|
||||
|
||||
// This is the identity layout.
|
||||
/*
|
||||
{ \
|
||||
{ {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0} }, \
|
||||
{ {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1} }, \
|
||||
{ {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2} }, \
|
||||
{ {0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3} }, \
|
||||
{ {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4} }, \
|
||||
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \
|
||||
\
|
||||
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \
|
||||
{ {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6} }, \
|
||||
{ {0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7} }, \
|
||||
{ {0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8} }, \
|
||||
{ {0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9} }, \
|
||||
{ {0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}, {5, 10} }, \
|
||||
};
|
||||
*/
|
||||
|
||||
// This is the mirror, q <-> p, w <-> o, etc...
|
||||
{ \
|
||||
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \
|
||||
{ {0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}, {5, 6} }, \
|
||||
{ {0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}, {5, 7} }, \
|
||||
{ {0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}, {5, 8} }, \
|
||||
{ {0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}, {5, 9} }, \
|
||||
{ {0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}, {5, 10} }, \
|
||||
\
|
||||
{ {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0} }, \
|
||||
{ {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1} }, \
|
||||
{ {0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}, {5, 2} }, \
|
||||
{ {0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}, {5, 3} }, \
|
||||
{ {0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}, {5, 4} }, \
|
||||
{ {0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {5, 5} }, \
|
||||
};
|
||||
|
||||
#endif
|
21
keyboards/lime/lime.h
Normal file
21
keyboards/lime/lime.h
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifdef KEYBOARD_lime_rev1
|
||||
#include "rev1.h"
|
||||
#endif
|
30
keyboards/lime/readme.md
Normal file
30
keyboards/lime/readme.md
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Lime Keyboard
|
||||
|
||||
![Lime Keyboard](https://github.com/HellSingCoder/LimeKeyboard/blob/main/media/lime_keyboard.jpeg?raw=true)
|
||||
|
||||
Lime is a 6×4+6 keys column-staggered split keyboard with encoder and joystick support. Based on [Lily58](https://github.com/kata0510/Lily58), [Corne](https://github.com/foostan/crkbd), [Helix](https://github.com/MakotoKurauchi/helix) and [Sofle](https://github.com/josefadamcik/SofleKeyboard) keyboards. This board features a reversible PCB, OLEDs, Underglow and Bluetooth support. The PCB has holes for floating or screwed mounts but can be also mounted with a gasket.
|
||||
|
||||
The Lime keyboard was created by [HellTM](https://github.com/HellSingCoder) with the help of the QMK and custom keyboard community.
|
||||
|
||||
Build guide and a build log not available yet
|
||||
|
||||
* Keyboard Maintainer: [HellSingCoder](https://www.simonepellegrino.com/) (GitHub: [HellTM](https://github.com/HellSingCoder))
|
||||
* Hardware Supported: LimeKeyboard PCB, ProMicro
|
||||
* Hardware Availability: [PCB & Case Data](https://github.com/HellSingCoder/LimeKeyboard)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make lime:default
|
||||
|
||||
Flashing example for this keyboard:
|
||||
|
||||
make lime:default:flash
|
||||
|
||||
Press reset button on he keyboard when asked. You can do that in 3 ways:
|
||||
* **Physical reset button**: Briefly press the button near the TRRS connector on the PCB - if you haven't installed one, short the pads instead
|
||||
* **Keycode in layout**: Press the key mapped to `RESET` (`Lower` + `Raise` + `Esc` on the default layout)
|
||||
* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
|
||||
|
||||
Disconnect the first half, connect the second one and repeat the process.
|
||||
|
||||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
|
68
keyboards/lime/rev1/config.h
Normal file
68
keyboards/lime/rev1/config.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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 0x0666
|
||||
#define PRODUCT_ID 0x2784
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER HellSingCoder
|
||||
#define PRODUCT Lime
|
||||
|
||||
/* key matrix size */
|
||||
// Rows are doubled-up
|
||||
#define MATRIX_ROWS 12
|
||||
#define MATRIX_COLS 6
|
||||
|
||||
// wiring of each half
|
||||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 }
|
||||
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 }
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define TAPPING_TERM 100
|
||||
#define DEBOUNCE 5
|
||||
|
||||
/* encoder support */
|
||||
#ifdef ENCODER_ENABLE
|
||||
# define ENCODERS_PAD_A { F5 }
|
||||
# define ENCODERS_PAD_B { F4 }
|
||||
# define ENCODERS_PAD_A_RIGHT { F4 }
|
||||
# define ENCODERS_PAD_B_RIGHT { F5 }
|
||||
# define ENCODER_RESOLUTION 2
|
||||
#endif
|
||||
|
||||
/* joystick support */
|
||||
#ifdef JOYSTICK_ENABLE
|
||||
# define JOYSTICK_AXES_COUNT 2
|
||||
# define JOYSTICK_BUTTON_COUNT 1
|
||||
# define JOYSTICK_AXES_RESOLUTION 8
|
||||
#endif
|
||||
|
||||
#define TAP_CODE_DELAY 10
|
||||
|
||||
/* communication between sides */
|
||||
#define USE_SERIAL
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
|
||||
#define NO_ACTION_MACRO
|
||||
#define NO_ACTION_FUNCTION
|
||||
#define SPLIT_USB_DETECT
|
||||
|
||||
#ifdef WPM_ENABLE
|
||||
# define SPLIT_WPM_ENABLE
|
||||
#endif
|
||||
|
25
keyboards/lime/rev1/info.json
Normal file
25
keyboards/lime/rev1/info.json
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"keyboard_name": "Lime",
|
||||
"url": "https://github.com/HellSingCoder/LimeKeyboard",
|
||||
"maintainer": "HellSingCoder",
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{"label":"#", "x":3, "y":0}, {"label":"*", "x":11.5, "y":0}, {"label":"@", "x":2, "y":0.13}, {"label":"$", "x":4, "y":0.13}, {"label":"&", "x":10.5, "y":0.13},
|
||||
{"label":"(", "x":12.5, "y":0.13}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":9.5, "y":0.25}, {"label":"!", "x":1, "y":0.38}, {"label":")", "x":13.5, "y":0.38},
|
||||
{"label":"Esc", "x":0, "y":0.5}, {"label":"<i class='fa fa-trash'></i>", "x":14.5, "y":0.5}, {"label":"E", "x":3, "y":1}, {"label":"I", "x":11.5, "y":1},
|
||||
{"label":"W", "x":2, "y":1.13}, {"label":"R", "x":4, "y":1.13}, {"label":"U", "x":10.5, "y":1.13}, {"label":"O", "x":12.5, "y":1.13}, {"label":"T", "x":5, "y":1.25},
|
||||
{"label":"Y", "x":9.5, "y":1.25}, {"label":"Q", "x":1, "y":1.38}, {"label":"P", "x":13.5, "y":1.38}, {"label":"<i class='fa fa-arrow-left'></i>", "x":0, "y":1.5},
|
||||
{"label":"~", "x":14.5, "y":1.5}, {"label":"D", "x":3, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"S", "x":2, "y":2.13}, {"label":"F", "x":4, "y":2.13},
|
||||
{"label":"J", "x":10.5, "y":2.13}, {"label":"L", "x":12.5, "y":2.13}, {"label":"G", "x":5, "y":2.25}, {"label":"H", "x":9.5, "y":2.25}, {"label":"A", "x":1, "y":2.38},
|
||||
{"label":":", "x":13.5, "y":2.38}, {"label":"<i class='fa fa-lock'></i>", "x":0, "y":2.5}, {"label":"\"", "x":14.5, "y":2.5}, {"label":"C", "x":3, "y":3},
|
||||
{"label":"<", "x":11.5, "y":3}, {"label":"X", "x":2, "y":3.13}, {"label":"V", "x":4, "y":3.13}, {"label":"M", "x":10.5, "y":3.13}, {"label":">", "x":12.5, "y":3.13},
|
||||
{"label":"B", "x":5, "y":3.25}, {"label":"Joystick", "x":6, "y":3.25}, {"label":"Encoder", "x":8.5, "y":3.25}, {"label":"N", "x":9.5, "y":3.25},
|
||||
{"label":"Z", "x":1, "y":3.38}, {"label":"?", "x":13.5, "y":3.38}, {"label":"<i class='fa fa-arrow-up'></i>", "x":0, "y":3.5}, {"label":"|", "x":14.5, "y":3.5},
|
||||
{"label":"Alt", "x":2.35, "y":4.13}, {"label":"Del", "x":3.35, "y":4.13}, {"label":"{", "x":11.15, "y":4.13}, {"label":"}", "x":12.15, "y":4.13},
|
||||
{"label":"OS", "x":1.35, "y":4.35}, {"label":"_", "x":13.15, "y":4.38}, {"label":"Lower", "x":0.35, "y":4.5}, {"label":"+", "x":14.15, "y":4.5},
|
||||
{"label":"Ctrl", "x":5.55, "y":2.85}, {"label":"Enter", "x":-0.4, "y":4.1, "h":1.25}, {"label":"Space", "x":-4.1, "y":3.35, "h":1.25}, {"label":"Raise", "x":8.4, "y":11.2}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
38
keyboards/lime/rev1/rev1.c
Normal file
38
keyboards/lime/rev1/rev1.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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 "lime.h"
|
||||
|
||||
/* Encoders */
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
} else if (index == 1) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
41
keyboards/lime/rev1/rev1.h
Normal file
41
keyboards/lime/rev1/rev1.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* Copyright 2021 HellSingCoder
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
#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, L50, R50, R30, R31, R32, R33, R34, R35, \
|
||||
L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \
|
||||
) \
|
||||
{ \
|
||||
{ L00, L01, L02, L03, L04, L05 }, \
|
||||
{ L10, L11, L12, L13, L14, L15 }, \
|
||||
{ L20, L21, L22, L23, L24, L25 }, \
|
||||
{ L30, L31, L32, L33, L34, L35 }, \
|
||||
{ L40, L41, L42, L43, L44, L45 }, \
|
||||
{ L50, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
|
||||
{ R05, R04, R03, R02, R01, R00 }, \
|
||||
{ R15, R14, R13, R12, R11, R10 }, \
|
||||
{ R25, R24, R23, R22, R21, R20 }, \
|
||||
{ R35, R34, R33, R32, R31, R30 }, \
|
||||
{ R45, R44, R43, R42, R41, R40 }, \
|
||||
{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, R50 } \
|
||||
}
|
||||
|
4
keyboards/lime/rev1/rules.mk
Normal file
4
keyboards/lime/rev1/rules.mk
Normal file
|
@ -0,0 +1,4 @@
|
|||
ENCODER_ENABLE = yes
|
||||
ENCODER_RIGHT_ENABLE = yes
|
||||
OLED_ENABLE = yes
|
||||
OLED_DRIVER = SSD1306
|
24
keyboards/lime/rules.mk
Normal file
24
keyboards/lime/rules.mk
Normal file
|
@ -0,0 +1,24 @@
|
|||
# MCU name
|
||||
MCU = atmega32u4
|
||||
|
||||
# Bootloader selection
|
||||
BOOTLOADER = caterina
|
||||
|
||||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = no # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
SPLIT_KEYBOARD = yes
|
||||
SWAP_HANDS_ENABLE = yes
|
||||
DEFAULT_FOLDER = lime/rev1
|
Loading…
Reference in New Issue
Block a user