[keyboard] adding keyboard: jerkin (#7975)

* jerkin

* Update config.h

* Apply suggestions from code review

Co-Authored-By: Drashna Jaelre <drashna@live.com>
Co-Authored-By: Akaash Suresh <casa.akaash@gmail.com>

* Update rules.mk

* Apply suggestions from code review

* Missing closing parenthesis in one of the suggestions.

* Finalize collaborator suggestions

* One final tweak to standardize MANUFACTURER

Co-authored-by: ridingqwerty <george.g.koenig@gmail.com>
Co-authored-by: Drashna Jaelre <drashna@live.com>
Co-authored-by: Akaash Suresh <casa.akaash@gmail.com>
This commit is contained in:
worldspawn00 2020-02-06 09:55:55 -06:00 committed by GitHub
parent 6a0e155afe
commit fe814be287
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 181 additions and 0 deletions

View File

@ -0,0 +1,46 @@
#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x79AE
#define DEVICE_VER 0x0001
#define MANUFACTURER Worldspawn00
#define PRODUCT Jerkin
#define DESCRIPTION Alice style 30% board
/* key matrix size */
#define MATRIX_ROWS 3
#define MATRIX_COLS 13
/* key matrix pins */
#define MATRIX_ROW_PINS { B3, B4, B5 }
#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, B1, F7, F6, F5, F4, E6, D7 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 0
#endif
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
// #define RGBLED_NUM 0
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "Jerkin",
"url": "https://qmk.fm/keyboards",
"maintainer": "worldspawn00",
"width": 15.5,
"height": 6.25,
"layouts": {
"LAYOUT": {
"layout": [{"x":1, "y":0.75}, {"x":2, "y":0.75}, {"x":12, "y":0.75}, {"x":13, "y":0.75}, {"x":14, "y":0.75}, {"x":0.83, "y":1.75, "w":1.25}, {"x":2.08, "y":1.75}, {"x":12.5, "y":1.75}, {"x":13.5, "y":1.75, "w":1.75}, {"x":0.58, "y":2.75, "w":1.75}, {"x":2.33, "y":2.75}, {"x":12.25, "y":2.75}, {"x":13.25, "y":2.75}, {"x":14.25, "y":2.75, "w":1.25}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":3.75, "y":1}, {"x":4.75, "y":1}, {"x":5.75, "y":1}, {"x":6.75, "y":1}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":-7.0, "y":3.25}, {"x":-6, "y":3.25}, {"x":-5.0, "y":3.25}, {"x":-4, "y":3.25}, {"x":-6.75, "y":4.25}, {"x":-5.75, "y":4.25}, {"x":-4.75, "y":4.25}, {"x":-3.75, "y":4.25}, {"x":-7.25, "y":5.25}, {"x":-6.25, "y":5.25}, {"x":-5.25, "y":5.25}, {"x":-4.25, "y":5.25}]
}
}
}

View File

@ -0,0 +1 @@
#include "jerkin.h"

View File

@ -0,0 +1,13 @@
#pragma once
#include "quantum.h"
#define LAYOUT( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, KC_NO }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212 } \
}

View File

@ -0,0 +1,65 @@
#include QMK_KEYBOARD_H
enum custom_keycodes {KC_PASTA = SAFE_RANGE};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC,
CTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, LT(2, KC_ENT),
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LT(1, KC_SPC), KC_N, KC_M, KC_COMM, ALT_T(KC_DOT), GUI_T(KC_SLSH), SFT_T(KC_DEL)),
[1] = LAYOUT(
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_RBRC, KC_BSLS,
KC_TRNS, KC_MINS, KC_EQL, KC_BSLS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS),
[2] = LAYOUT(
RESET, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_INS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PASTA, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
switch (keycode) {
case KC_PASTA:
if (record->event.pressed) {
SEND_STRING("https://i.imgur.com/dzBrlqc.png");
}
break;
}
}
return true;
}
void matrix_init_user(void) {
// set CapsLock LED to output and low
setPinOutput(B2);
writePinLow(B2);
// set NumLock LED to output and low
setPinOutput(B6);
writePinLow(B6);
}
layer_state_t layer_state_set_user(layer_state_t state)
{
if (layer_state_cmp(state, 1)) {
writePinHigh(B2);
} else if (state & (1<<2)) {
writePinLow(B2);
writePinHigh(B6);
} else if (state & (1<<3)) {
writePinHigh(B2);
writePinHigh(B6);
} else {
writePinLow(B2);
writePinLow(B6);
}
return state;
}

View File

@ -0,0 +1,15 @@
# Jerkin
![Jerkin](https://i.imgur.com/7wcPUfl.png)
An Alice style 30% board.
* Keyboard Maintainer: [Worldspawn00](https://github.com/Worldspawn00)
* Hardware Supported: Jerkin PCB
* Hardware Availability: https://www.etsy.com/shop/WorldspawnsKeebs
Make example for this keyboard (after setting up your build environment):
make wsk/jerkin: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)

View File

@ -0,0 +1,29 @@
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = caterina
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration
MOUSEKEY_ENABLE = no # 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
AUDIO_ENABLE = no # Audio output on port C6
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow