Skip to content

Commit

Permalink
[Keyboard] The inaugural commit for Leeloo's firmware. (#16599)
Browse files Browse the repository at this point in the history
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
  • Loading branch information
3 people authored Apr 13, 2022
1 parent 0272621 commit 8580380
Show file tree
Hide file tree
Showing 12 changed files with 547 additions and 0 deletions.
78 changes: 78 additions & 0 deletions keyboards/clickety_split/leeloo/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
{
"keyboard_name": "Leeloo",
"url": "https://clicketysplit.ca/pages/leeloo",
"maintainer": "Clickety Split Ltd",
"layouts": {
"LAYOUT": {
"layout": [
{"label":"Esc", "x":0, "y":0.5},
{"label":"1", "x":1, "y":0.4},
{"label":"2", "x":2, "y":0.2},
{"label":"3", "x":3, "y":0},
{"label":"4", "x":4, "y":0.2},
{"label":"5", "x":5, "y":0.4},

{"label":"6", "x":9, "y":0.4},
{"label":"7", "x":10, "y":0.2},
{"label":"8", "x":11, "y":0},
{"label":"9", "x":12, "y":0.2},
{"label":"0", "x":13, "y":0.4},
{"label":"Back Slash", "x":14, "y":0.5},

{"label":"TAB", "x":0, "y":1.5},
{"label":"Q", "x":1, "y":1.4},
{"label":"W", "x":2, "y":1.2},
{"label":"E", "x":3, "y":1.0},
{"label":"R", "x":4, "y":1.2},
{"label":"T", "x":5, "y":1.4},

{"label":"Y", "x":9, "y":1.4},
{"label":"U", "x":10, "y":1.2},
{"label":"I", "x":11, "y":1.0},
{"label":"O", "x":12, "y":1.2},
{"label":"P", "x":13, "y":1.4},
{"label":"GRV", "x":14, "y":1.5},

{"label":"CAPS", "x":0, "y":2.5},
{"label":"A", "x":1, "y":2.4},
{"label":"S", "x":2, "y":2.2},
{"label":"D", "x":3, "y":2.0},
{"label":"F", "x":4, "y":2.2},
{"label":"G", "x":5, "y":2.4},

{"label":"H", "x":9, "y":2.4},
{"label":"J", "x":10, "y":2.2},
{"label":"K", "x":11, "y":2.0},
{"label":"L", "x":12, "y":2.2},
{"label":";", "x":13, "y":2.4},
{"label":"'", "x":14, "y":2.5},

{"label":"Shift", "x":0, "y":3.5},
{"label":"Z", "x":1, "y":3.4},
{"label":"X", "x":2, "y":3.2},
{"label":"C", "x":3, "y":3.0},
{"label":"V", "x":4, "y":3.2},
{"label":"B", "x":5, "y":3.4},

{"label":"N", "x":9, "y":3.4},
{"label":"M", "x":10, "y":3.2},
{"label":",", "x":11, "y":3.0},
{"label":".", "x":12, "y":3.2},
{"label":"/", "x":13, "y":3.4},
{"label":"Shift", "x":14, "y":3.5},

{"label":"Alt", "x":2.7, "y":4.6},
{"label":"Ctrl", "x":3.8, "y":4.5},
{"label":"Enter", "x":5.7, "y":3.57},
{"label":"MINS", "x":7.12, "y":2.96},
{"label":"GUI", "x":6.25, "y":3.4},

{"label":"GUI", "x":7.75, "y":3.4},
{"label":"EQL", "x":6.39, "y":6.86},
{"label":"Space", "x":8.08, "y":6.18},
{"label":"Back Space", "x":10.2, "y":4.5},
{"label":"Delete", "x":11.3, "y":4.6}
]
}
}
}
35 changes: 35 additions & 0 deletions keyboards/clickety_split/leeloo/keymaps/default/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* Copyright 2022 Clickety Split Ltd.
* https://clicketysplit.ca
*
* 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

#ifdef TAPPING_TERM
#undef TAPPING_TERM

#define IGNORE_MOD_TAP_INTERRUPT
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 150
#endif

// If rotary encoders are used, and they require more or less resolution/sensitivity
// you may try increasing or decreasing the value.
// #define ENCODER_RESOLUTION 2
114 changes: 114 additions & 0 deletions keyboards/clickety_split/leeloo/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
/* Copyright 2022 Clickety Split Ltd.
* https://clicketysplit.ca
*
* 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

enum layer_names {
_BASE,
_LOWER,
_RAISE,
_ADJUST
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* QWERTY
* ,-----------------------------------------. ,-----------------------------------------.
* | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | ` |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | CAPS | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' |
* |------+------+------+------+------+------| LGUI | | RGUI |------+------+------+------+------+------|
* |LSHIFT| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RSHIFT|
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LALT | LCTL | ENT | / MINS / \ EQL \ | SPC | BSPC | DEL |
* | | | LOWR |/ RAISE / \RAISE \ | LOWR | | |
* `-------------------------------' '------''-----------------------'
*/
[_BASE] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
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, KC_LGUI, KC_RGUI, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
KC_LALT, KC_LCTL, LT(1,KC_ENT), LT(2,KC_MINS), LT(2,KC_EQL), LT(1,KC_SPC), KC_BSPC, KC_DEL
),
/* LOWER
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | < | ( | [ | { |--------. ,-------| } | ] | ) | > | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |--------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LALT | LCTL | ENT | / MINS / \ EQL \ | SPC | BSPC | DEL |
* | | | LOWR |/ RAISE / \RAISE \ | LOWR | | |
* `-------------------------------' '------''-----------------------'
*/
[_LOWER] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, KC_LABK, KC_LPRN, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_RPRN, KC_RABK, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
),
/* RAISE
* ,-----------------------------------------. ,-----------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | PGUP | HOME | UP | END | | F12 |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | |-------. ,-------| PGDN | LEFT | DOWN | RIGHT| | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |-------| |-------| | LWRD | | RWRD | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LALT | LCTL | ENT | / MINS / \ EQL \ | SPC | DEL | DEL |
* | | | LOWR |/ RAISE / \RAISE \ | LOWR | | |
* `-------------------------------' '------''-----------------------'
*/
[_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_PGUP, KC_HOME, KC_UP, KC_END, _______, KC_F12,
_______, _______, _______, _______, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, C(KC_LEFT), _______, C(KC_RGHT), _______, _______,
_______, _______, _______, _______, _______, _______, KC_DEL, _______
),
/* ADJUST
* ,-----------------------------------------. ,-----------------------------------------.
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | | | | | | | | |
* |------+------+------+------+------+------| |------+------+------+------+------+------|
* | | | | | | |--------. ,-------| | | | | | |
* |------+------+------+------+------+------| | | |------+------+------+------+------+------|
* | | | | | | |--------| |-------| | | | | | |
* `-----------------------------------------/ / \ \-----------------------------------------'
* | LALT | LCTL | ENT | / MINS / \ EQL \ | SPC | BSPC | DEL |
* | | | LOWR |/ RAISE / \RAISE \ | LOWR | | |
* `-------------------------------' '------''-----------------------'
*/
[_ADJUST] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______
)
};


1 change: 1 addition & 0 deletions keyboards/clickety_split/leeloo/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LTO_ENABLE = yes
131 changes: 131 additions & 0 deletions keyboards/clickety_split/leeloo/leeloo.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/* Copyright 2022 Clickety Split Ltd.
* https://clicketysplit.ca
*
* 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 "leeloo.h"

#ifdef OLED_ENABLE
oled_rotation_t oled_init_kb(oled_rotation_t rotation) {
if (!is_keyboard_master()) {
return OLED_ROTATION_180;
} else {
return rotation;
}
}

static void render_keylock_status(led_t led_state) {
oled_write_P(PSTR("Lock: "), false);
oled_write_P(PSTR("CAPS"), led_state.caps_lock);
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("NUML"), led_state.num_lock);
oled_write_P(PSTR(" "), false);
oled_write_ln_P(PSTR("SCLK"), led_state.scroll_lock);
}

static void render_mod_status(uint8_t modifiers) {
oled_write_P(PSTR("Mods: "), false);
oled_write_P(PSTR("Sft"), (modifiers & MOD_MASK_SHIFT));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Ctl"), (modifiers & MOD_MASK_CTRL));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("Alt"), (modifiers & MOD_MASK_ALT));
oled_write_P(PSTR(" "), false);
oled_write_P(PSTR("GUI"), (modifiers & MOD_MASK_GUI));
}

static void render_secondary_oled(void) {
// Version Information
oled_write_P(PSTR("Leeloo\n\n"), false);
oled_write_P(PSTR("Firmware: "), false);
oled_write_P(PSTR("v1.0"), false);
oled_write_P(PSTR("\n"), false);
oled_write_P(PSTR("Clickety Split Ltd."), false);
}

static void render_status(void) {
// Host Keyboard Layer Status
switch (get_highest_layer(default_layer_state)) {
case _BASE:
oled_write_P(PSTR("QWERTY | "), false);
break;
}

// Host Keyboard Layer Status
switch (get_highest_layer(layer_state)) {
case 0:
oled_write_P(PSTR("Base \n"), false);
break;

case _LOWER:
oled_write_P(PSTR("Lower \n"), false);
break;

case _RAISE:
oled_write_P(PSTR("Raise \n"), false);
break;

case _ADJUST:
oled_write_P(PSTR("Adjust \n"), false);
break;

default:
oled_write_P(PSTR("Unknown \n"), false);
}

oled_write_P(PSTR("\n"), false);
render_keylock_status(host_keyboard_led_state());
render_mod_status(get_mods() | get_oneshot_mods());
}

bool oled_task_kb(void) {
if (!oled_task_user()) {
return false;
}

if (is_keyboard_master()) {
// Renders the current keyboard state (layer, lock, caps, scroll, etc)
render_status();
} else {
// Version Information
render_secondary_oled();
}

return false;

}
#endif // OLED_ENABLE

#ifdef ENCODER_ENABLE
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (index == 0) {
// Volume control
if (clockwise) {
tap_code_delay(KC_VOLD, 10);
} else {
tap_code_delay(KC_VOLU, 10);
}
} else if (index == 1) {
// Page up/Page down
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return true;
}
#endif
24 changes: 24 additions & 0 deletions keyboards/clickety_split/leeloo/leeloo.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/* Copyright 2022 Clickety Split Ltd.
* https://clicketysplit.ca
*
* 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"

#if defined(KEYBOARD_clickety_split_leeloo_rev1)
# include "rev1.h"
#endif
Loading

0 comments on commit 8580380

Please sign in to comment.