diff options
-rw-r--r-- | keyboards/kikoslab/kl90/config.h | 52 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/info.json | 12 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/keymaps/default/keymap.c | 145 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/keymaps/via/keymap.c | 145 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/keymaps/via/rules.mk | 2 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/kl90.c | 17 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/kl90.h | 36 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/readme.md | 13 | ||||
-rw-r--r-- | keyboards/kikoslab/kl90/rules.mk | 24 |
9 files changed, 446 insertions, 0 deletions
diff --git a/keyboards/kikoslab/kl90/config.h b/keyboards/kikoslab/kl90/config.h new file mode 100644 index 0000000000..b0d983f181 --- /dev/null +++ b/keyboards/kikoslab/kl90/config.h @@ -0,0 +1,52 @@ +/* +Copyright 2021 Swiftrax <swiftrax@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEA53 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Kikos Lab +#define PRODUCT KL90 +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS { F1, F3, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { F2, F0, A2, A1, A0, D2, D3, D4, D5, D6, D7, E0, E1, C0, C1, C2 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define ENCODERS_PAD_A { A3, C3 } +#define ENCODERS_PAD_B { A4, C4 } + +#define EMCODER_DIRECTION_FLIP + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/*EEPROM for via*/ +#define DYNAMIC_KEYMAP_LAYER_COUNT 3
\ No newline at end of file diff --git a/keyboards/kikoslab/kl90/info.json b/keyboards/kikoslab/kl90/info.json new file mode 100644 index 0000000000..88d8a968ac --- /dev/null +++ b/keyboards/kikoslab/kl90/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "KL-90", + "url": "www.kikoslab.com", + "maintainer": "swiftrax", + "width": 18, + "height": 6.75, + "layouts": { + "LAYOUT": { + "layout": [{"label":"0,0", "x":0, "y":0}, {"label":"0,1", "x":1.5, "y":0}, {"label":"0,2", "x":2.75, "y":0}, {"label":"0,3", "x":3.75, "y":0}, {"label":"0,4", "x":4.75, "y":0}, {"label":"0,5", "x":5.75, "y":0}, {"label":"0,6", "x":7, "y":0}, {"label":"0,7", "x":8, "y":0}, {"label":"0,8", "x":9, "y":0}, {"label":"0,9", "x":10, "y":0}, {"label":"0,10", "x":11.25, "y":0}, {"label":"0,11", "x":12.25, "y":0}, {"label":"0,12", "x":13.25, "y":0}, {"label":"0,13", "x":14.25, "y":0}, {"label":"0,14", "x":15.5, "y":0}, {"label":"0,15", "x":17, "y":0}, {"label":"1,0", "x":0, "y":1.5}, {"label":"1,1", "x":1.5, "y":1.5}, {"label":"1,2", "x":2.5, "y":1.5}, {"label":"1,3", "x":3.5, "y":1.5}, {"label":"1,4", "x":4.5, "y":1.5}, {"label":"1,5", "x":5.5, "y":1.5}, {"label":"1,6", "x":6.5, "y":1.5}, {"label":"1,7", "x":7.5, "y":1.5}, {"label":"1,8", "x":8.5, "y":1.5}, {"label":"1,9", "x":9.5, "y":1.5}, {"label":"1,10", "x":10.5, "y":1.5}, {"label":"1,11", "x":11.5, "y":1.5}, {"label":"1,12", "x":12.5, "y":1.5}, {"label":"1,13", "x":13.5, "y":1.5}, {"label":"1,14", "x":14.5, "y":1.5, "w":2}, {"label":"1,15", "x":17, "y":1.5}, {"label":"2,0", "x":0, "y":2.5}, {"label":"2,1", "x":1.5, "y":2.5, "w":1.5}, {"label":"2,2", "x":3, "y":2.5}, {"label":"2,3", "x":4, "y":2.5}, {"label":"2,4", "x":5, "y":2.5}, {"label":"2,5", "x":6, "y":2.5}, {"label":"2,6", "x":7, "y":2.5}, {"label":"2,7", "x":8, "y":2.5}, {"label":"2,8", "x":9, "y":2.5}, {"label":"2,9", "x":10, "y":2.5}, {"label":"2,10", "x":11, "y":2.5}, {"label":"2,11", "x":12, "y":2.5}, {"label":"2,12", "x":13, "y":2.5}, {"label":"2,13", "x":14, "y":2.5}, {"label":"2,14", "x":15, "y":2.5, "w":1.5}, {"label":"2,15", "x":17, "y":2.5}, {"label":"3,0", "x":0, "y":3.5}, {"label":"3,1", "x":1.5, "y":3.5, "w":1.75}, {"label":"3,2", "x":3.25, "y":3.5}, {"label":"3,3", "x":4.25, "y":3.5}, {"label":"3,4", "x":5.25, "y":3.5}, {"label":"3,5", "x":6.25, "y":3.5}, {"label":"3,6", "x":7.25, "y":3.5}, {"label":"3,7", "x":8.25, "y":3.5}, {"label":"3,8", "x":9.25, "y":3.5}, {"label":"3,9", "x":10.25, "y":3.5}, {"label":"3,10", "x":11.25, "y":3.5}, {"label":"3,11", "x":12.25, "y":3.5}, {"label":"3,12", "x":13.25, "y":3.5}, {"label":"3,13", "x":14.25, "y":3.5}, {"label":"3,14", "x":15.25, "y":3.5, "w":1.25}, {"label":"3,15", "x":17, "y":3.5}, {"label":"4,0", "x":0, "y":4.5}, {"label":"4,1", "x":1.5, "y":4.5, "w":1.25}, {"label":"4,12", "x":2.75, "y":4.5}, {"label":"4,2", "x":3.75, "y":4.5}, {"label":"4,3", "x":4.75, "y":4.5}, {"label":"4,4", "x":5.75, "y":4.5}, {"label":"4,5", "x":6.75, "y":4.5}, {"label":"4,6", "x":7.75, "y":4.5}, {"label":"4,7", "x":8.75, "y":4.5}, {"label":"4,8", "x":9.75, "y":4.5}, {"label":"4,9", "x":10.75, "y":4.5}, {"label":"4,10", "x":11.75, "y":4.5}, {"label":"4,11", "x":12.75, "y":4.5}, {"label":"4,13", "x":13.75, "y":4.5, "w":1.75}, {"label":"4,15", "x":17, "y":4.5}, {"label":"4,14", "x":15.75, "y":4.75}, {"label":"5,0", "x":0, "y":5.5}, {"label":"5,1", "x":1.5, "y":5.5, "w":1.25}, {"label":"5,2", "x":2.75, "y":5.5, "w":1.25}, {"label":"5,3", "x":4, "y":5.5, "w":1.25}, {"label":"5,4", "x":5.25, "y":5.5, "w":2.25}, {"label":"5,6", "x":7.5, "y":5.5}, {"label":"5,6", "x":8.5, "y":5.5}, {"label":"5,8", "x":9.5, "y":5.5, "w":2}, {"label":"5,10", "x":11.5, "y":5.5}, {"label":"5,11", "x":12.5, "y":5.5}, {"label":"5,12", "x":13.5, "y":5.5}, {"label":"5,13", "x":14.75, "y":5.75}, {"label":"5,14", "x":15.75, "y":5.75}, {"label":"5,15", "x":16.75, "y":5.75}] + } + } +}
\ No newline at end of file diff --git a/keyboards/kikoslab/kl90/keymaps/default/keymap.c b/keyboards/kikoslab/kl90/keymaps/default/keymap.c new file mode 100644 index 0000000000..da68511e7a --- /dev/null +++ b/keyboards/kikoslab/kl90/keymaps/default/keymap.c @@ -0,0 +1,145 @@ +/* +Copyright 2021 Swiftrax <swiftrax@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + KC_DEL , KC_ESC , 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_PSCR, KC_MPLY, + KC_F13 , 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_EQL , KC_BSPC, KC_INS , + KC_F14 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_F15 , 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_PIPE, KC_ENT , KC_PGUP, + KC_F16 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_BSLS, KC_UP , KC_PGDN, + KC_F17 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_WH_D); + } else { + tap_code(KC_WH_U); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_0; +} + +#define IDLE_FRAMES 5 +#define IDLE_SPEED 10 + +#define ANIM_SIZE 600 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define ANIM_FRAME_DURATION 200 //how long each frame lasts in ms + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; + +static void render_anim(void){ + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, + 64, + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 17, 17, 9, 9, 9,193, 39, 8, 16, 16, 16, 16, 8, 36, 66,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,146, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, + 64, + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, + 64, + } + }; + void animation_phase(void) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } + else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) + oled_off(); + else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} + +void oled_task_user(void) { + render_anim(); +} +#endif
\ No newline at end of file diff --git a/keyboards/kikoslab/kl90/keymaps/via/keymap.c b/keyboards/kikoslab/kl90/keymaps/via/keymap.c new file mode 100644 index 0000000000..da68511e7a --- /dev/null +++ b/keyboards/kikoslab/kl90/keymaps/via/keymap.c @@ -0,0 +1,145 @@ +/* +Copyright 2021 Swiftrax <swiftrax@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_all( + KC_DEL , KC_ESC , 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_PSCR, KC_MPLY, + KC_F13 , 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_EQL , KC_BSPC, KC_INS , + KC_F14 , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , + KC_F15 , 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_PIPE, KC_ENT , KC_PGUP, + KC_F16 , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, KC_BSLS, KC_UP , KC_PGDN, + KC_F17 , KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , KC_SPC , KC_SPC , KC_SPC , KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + +[1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +[2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code(KC_WH_D); + } else { + tap_code(KC_WH_U); + } + } else if (index == 1) { /* Second encoder */ + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} + +#ifdef OLED_DRIVER_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + return OLED_ROTATION_0; +} + +#define IDLE_FRAMES 5 +#define IDLE_SPEED 10 + +#define ANIM_SIZE 600 // number of bytes in array, minimize for adequate firmware size, max is 1024 +#define ANIM_FRAME_DURATION 200 //how long each frame lasts in ms + +uint32_t anim_timer = 0; +uint32_t anim_sleep = 0; +uint8_t current_idle_frame = 0; + +static void render_anim(void){ + static const char PROGMEM idle[IDLE_FRAMES][ANIM_SIZE] = { + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 8, 24, 24, 8, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 8, 16, 16, 16, 16, 8, 4, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 7, 24, 32, 32, 32, 32, 16, 12, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, + 64, + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 32, 32, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0,128, 96, 16, 31, 0, 0, 0, 0, 8, 8, 8, 8, 0, 0, 16, 16, 16, 16, 0, 0, 8, 8, 8, 8, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 17, 17, 9, 9, 9,193, 39, 8, 16, 16, 16, 16, 8, 36, 66,130, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 18, 18, 18, 18,146, 71, 24, 32, 32, 32, 32, 16, 12, 4, 36, 36, 68, 68, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, + 64, + }, + { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,128,192, 32, 16, 16, 8, 4, 3, 0, 0, 1, 2, 4, 4, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 8, 8, 4, 2, 2,126,128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 56, 56, 16, 0, 0, 24, 60, 60, 24, 0, 0,128, 64, 0, 0, 0, 0, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 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128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, 0, 0, 0, 0, 0,252, 6, 1, 1, 1, 2, 4, 15, 0, 0, 0, 0, 12, 30, 30, 12, 0, 0, 16, 48, 48, 16, 0, 0, 24, 60, 60, 24, 0, 0,248, 4, 4, 12, 16, 96, 0, 0, 0, 15, 48, 96,192, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 7, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 7, 4, 4, 12, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 24, 16, 16, 16, 16, 16, 16, 16, 16, 16, 48, 32, 32, 32, 32, 32, 32, 96, 64, + 64, + } + }; + void animation_phase(void) { + current_idle_frame = (current_idle_frame + 1) % IDLE_FRAMES; + oled_write_raw_P(idle[abs((IDLE_FRAMES-1)-current_idle_frame)], ANIM_SIZE); + } + + if(get_current_wpm() != 000) { + oled_on(); // not essential but turns on animation OLED with any alpha keypress + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + anim_sleep = timer_read32(); + } + else { + if(timer_elapsed32(anim_sleep) > OLED_TIMEOUT) + oled_off(); + else { + if(timer_elapsed32(anim_timer) > ANIM_FRAME_DURATION) { + anim_timer = timer_read32(); + animation_phase(); + } + } + } +} + +void oled_task_user(void) { + render_anim(); +} +#endif
\ No newline at end of file diff --git a/keyboards/kikoslab/kl90/keymaps/via/rules.mk b/keyboards/kikoslab/kl90/keymaps/via/rules.mk new file mode 100644 index 0000000000..d03b5f1ca7 --- /dev/null +++ b/keyboards/kikoslab/kl90/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +WPM_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/kikoslab/kl90/kl90.c b/keyboards/kikoslab/kl90/kl90.c new file mode 100644 index 0000000000..d592f90255 --- /dev/null +++ b/keyboards/kikoslab/kl90/kl90.c @@ -0,0 +1,17 @@ +/* +Copyright 2021 Swiftrax <swiftrax@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include "kl90.h" diff --git a/keyboards/kikoslab/kl90/kl90.h b/keyboards/kikoslab/kl90/kl90.h new file mode 100644 index 0000000000..1fcb104308 --- /dev/null +++ b/keyboards/kikoslab/kl90/kl90.h @@ -0,0 +1,36 @@ +/* +Copyright 2021 Swiftrax <swiftrax@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#pragma once + +#include "quantum.h" + + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415, \ + K500, K501, K502, K503, K504, K505, K506, K508, K510, K511, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415 }, \ + { K500, K501, K502, K503, K504, K505, K506, KC_NO, K508, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} diff --git a/keyboards/kikoslab/kl90/readme.md b/keyboards/kikoslab/kl90/readme.md new file mode 100644 index 0000000000..77cdd8baae --- /dev/null +++ b/keyboards/kikoslab/kl90/readme.md @@ -0,0 +1,13 @@ +# KL-90 + +Dual encoder 75% with a macro column + +* Keyboard Maintainer: Swiftrax +* Hardware Supported: KL-90 PCB +* Hardware Availability: https://www.kikoslab.com + +Make example for this keyboard (after setting up your build environment): + + make kikoslab/kl90:default + +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). diff --git a/keyboards/kikoslab/kl90/rules.mk b/keyboards/kikoslab/kl90/rules.mk new file mode 100644 index 0000000000..3d7e4db929 --- /dev/null +++ b/keyboards/kikoslab/kl90/rules.mk @@ -0,0 +1,24 @@ +# MCU name +MCU = at90usb1286 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # 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 +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output +ENCODER_ENABLE = yes +OLED_DRIVER_ENABLE = yes |