~ruther/qmk_firmware

4c48518a4ef25f52a9a5d214041c9aeb3e0546df — misonoworks 4 years ago 135d28d
[Keyboard] Add Karina keyboard  (#11347)

* add karina keymap

* Update info.json

* Add files via upload

* Update readme.md

* Update info.json

* Update info.json

* Update keyboards/misonoworks/karina/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/misonoworks/karina/rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Update keyboards/misonoworks/karina/config.h

Co-authored-by: Ryan <fauxpark@gmail.com>

Co-authored-by: autumnisacutie <63772942+autumnisacutie@users.noreply.github.com>
Co-authored-by: Ryan <fauxpark@gmail.com>
A keyboards/misonoworks/karina/config.h => keyboards/misonoworks/karina/config.h +59 -0
@@ 0,0 1,59 @@
/*
Copyright 2020 MisonoWorks

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"

// descriptors
#define VENDOR_ID       0xFEED
#define PRODUCT_ID      0xC456
#define DEVICE_VER      0x0001
#define MANUFACTURER    MisonoWorks
#define PRODUCT         Karina

// matrix
#define MATRIX_ROWS 4
#define MATRIX_COLS 11

// pins
#define MATRIX_ROW_PINS { D2, D3, D5, F0 }
#define MATRIX_COL_PINS { B3, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6}
#define UNUSED_PINS

// diode mode
#define DIODE_DIRECTION COL2ROW

// debouncing, NKRO, mouse keys speed 
#define DEBOUNCE 5
#define FORCE_NKRO
#define MK_3_SPEED
#define TERMINAL_HELP

// encoders
#define ENCODERS_PAD_A { B2, F4 }
#define ENCODERS_PAD_B { B1, F5 }
#define ENCODER_RESOLUTION 3

/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#define RGB_DI_PIN D1
#ifdef RGB_DI_PIN
#define RGBLED_NUM 19
#define RGBLIGHT_ANIMATIONS
#endif

A keyboards/misonoworks/karina/info.json => keyboards/misonoworks/karina/info.json +12 -0
@@ 0,0 1,12 @@
{
    "keyboard_name": "Karina", 
    "url": "https://github.com/autumnisacutie/karina", 
    "maintainer": "MisonoWorks", 
    "width": 11, 
    "height": 5, 
    "layouts": {
        "LAYOUT": {
            "layout": [{"x":0, "y":0}, {"x":10, "y":0}, {"label":"Q", "x":0.5, "y":1}, {"label":"W", "x":1.5, "y":1}, {"label":"E", "x":2.5, "y":1}, {"label":"R", "x":3.5, "y":1}, {"label":"T", "x":4.5, "y":1}, {"label":"Y", "x":5.5, "y":1}, {"label":"U", "x":6.5, "y":1}, {"label":"I", "x":7.5, "y":1}, {"label":"O", "x":8.5, "y":1}, {"label":"P", "x":9.5, "y":1}, {"label":"Tab", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"H", "x":6, "y":2}, {"label":"J", "x":7, "y":2}, {"label":"K", "x":8, "y":2}, {"label":"L", "x":9, "y":2}, {"label":"Enter", "x":10, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":"Z", "x":1.5, "y":3}, {"label":"X", "x":2.5, "y":3}, {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, {"label":"N", "x":6.5, "y":3}, {"label":"M", "x":7.5, "y":3}, {"label":"<", "x":8.5, "y":3}, {"label":"Shift", "x":9.5, "y":3, "w":1.5}, {"label":"Alt", "x":0, "y":4, "w":1.75}, {"x":1.75, "y":4, "w":1.25}, {"x":3, "y":4, "w":2.75}, {"x":5.75, "y":4, "w":2.25}, {"x":8, "y":4, "w":1.25}, {"label":"Control", "x":9.25, "y":4, "w":1.75}]
        }
    }
}

A keyboards/misonoworks/karina/karina.c => keyboards/misonoworks/karina/karina.c +18 -0
@@ 0,0 1,18 @@
/*
Copyright 2020 MisonoWorks

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 "karina.h"

A keyboards/misonoworks/karina/karina.h => keyboards/misonoworks/karina/karina.h +32 -0
@@ 0,0 1,32 @@
/*
Copyright 2020 MisonoWorks

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( \
	K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010,  \
	K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110,       \
	K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210,            \
	K300, K301,       K303,             K306,       K308, K309  \
) { \
	{ K000,  K001,  K002,  K003,  K004,  K005,  K006,  K007,  K008,  K009,  K010 }, \
	{ K100,  K101,  K102,  K103,  K104,  K105,  K106,  K107,  K108,  K109,  K110 }, \
	{ K200,  K201,  K202,  K203,  K204,  K205,  K206,  K207,  K208,  K209,  K210 }, \
	{ K300,  K301,  KC_NO, K303,  KC_NO, KC_NO, K306,  KC_NO, K308,  K309,  KC_NO }  \
}

A keyboards/misonoworks/karina/keymaps/default/keymap.c => keyboards/misonoworks/karina/keymaps/default/keymap.c +64 -0
@@ 0,0 1,64 @@
/*
Copyright 2020 MisonoWorks

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 layers {
    DEFAULT,
    SUPER,
    META,
};

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

    [DEFAULT] = LAYOUT(
        KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 
		KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
		KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_MUTE, 
		KC_LALT, MO(SUPER), KC_SPC, KC_BSPC, MO(META), KC_LCTL),

    [SUPER] = LAYOUT(
        KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 
		KC_MINUS, KC_EQUAL, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_SCLN, 
		KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_BSLS, KC_TRNS,
		KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS),
		
	[META] = LAYOUT(
	    KC_NUMLOCK, 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_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, 
		KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_PLUS, KC_P2, KC_P0, KC_P1, KC_TRNS, KC_TRNS, KC_TRNS, 
		RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, KC_TRNS, RGB_MOD)

};

void encoder_update_user(uint8_t index, bool clockwise) {
    if (index == 0) {
        if (clockwise) {
            tap_code(KC_PGUP);
        } else {
            tap_code(KC_PGDOWN);
        }
    }
    else if (index == 1) {
        if (clockwise) {
            tap_code(KC_VOLU);
        } else {
            tap_code(KC_VOLD);
        }
    }
}


A keyboards/misonoworks/karina/keymaps/voltex/keymap.c => keyboards/misonoworks/karina/keymaps/voltex/keymap.c +64 -0
@@ 0,0 1,64 @@
/*
Copyright 2020 MisonoWorks

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 layers {
    DEFAULT,
    SUPER,
    META,
};

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

    [DEFAULT] = LAYOUT(
        KC_TRNS, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 
		KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT,
		KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_TRNS, 
		KC_LALT, MO(SUPER), KC_SPC, KC_BSPC, MO(META), KC_LCTL),

    [SUPER] = LAYOUT(
        KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, 
		KC_MINUS, KC_EQUAL, KC_GRAVE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_QUOT, KC_SCLN, 
		KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_BSLS, KC_TRNS,
		KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS),
		
	[META] = LAYOUT(
	    KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 
		KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, 
		KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_PLUS, KC_KP_2, KC_KP_0, KC_KP_1, KC_TRNS, KC_TRNS, KC_TRNS, 
		RGB_TOG, RGB_SAI, RGB_HUI, RGB_VAI, KC_TRNS, RGB_MOD)

};

void encoder_update_user(uint8_t index, bool clockwise) {
    if (index == 0) {
        if (clockwise) {
            tap_code(KC_MS_LEFT);
        } else {
            tap_code(KC_MS_RIGHT);
        }
    }
    else if (index == 1) {
        if (clockwise) {
            tap_code(KC_MS_U);
        } else {
            tap_code(KC_MS_D);
        }
    }
}


A keyboards/misonoworks/karina/readme.md => keyboards/misonoworks/karina/readme.md +15 -0
@@ 0,0 1,15 @@
# Karina

![Karina](https://i.imgur.com/dawlYEl.jpg)

35% keyboard with two rotary encoders and an LED bar.

* Keyboard Maintainer: [MisonoWorks](https://github.com/autumnisacutie/)
* Hardware Supported: Karina V1 PCB
* Hardware Availability: [P3D Store](https://p3dstore.com/)

Make example for this keyboard (after setting up your build environment):

    make misonoworks/karina: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).

A keyboards/misonoworks/karina/rules.mk => keyboards/misonoworks/karina/rules.mk +23 -0
@@ 0,0 1,23 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
BOOTLOADER = atmel-dfu

# Build Options
#   change yes to no to disable
#
BOOTMAGIC_ENABLE = full     # 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 = yes           # USB Nkey Rollover
BACKLIGHT_ENABLE = no       # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes       # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no       # Enable Bluetooth
AUDIO_ENABLE = no           # Audio output
ENCODER_ENABLE = yes