Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyboards/ryanskidmore: add rskeys100 keyboard #15506

Merged
merged 9 commits into from
May 2, 2022
85 changes: 85 additions & 0 deletions keyboards/ryanskidmore/rskeys100/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
// Copyright 2021 Ryan Skidmore (@ryanskidmore, [email protected])
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0x7273 // rs
#define PRODUCT_ID 0x0064 // 100
#define DEVICE_VER 0x0001 // rev 1
#define MANUFACTURER ryanskidmore
#define PRODUCT rsKeys100

/* Key Matrix Sizes */
#define MATRIX_ROWS 6
#define MATRIX_COLS 24

/* Rows */
#define ROW_A D4
#define ROW_B C6
#define ROW_C D7
#define ROW_D E6
#define ROW_E B4
#define ROW_F B5

/* Columns 0 - 20 (24 with dummy columns for shift registers) */
#define SHR_LATCH B2
#define SHR_CLOCK B3
#define SHR_DATA B1
#define SHR_COLS { 0x000001, 0x000002, 0x000004, 0x000008, 0x000010, 0x000020, 0x000040, 0x000080, 0x000100, 0x000200, 0x000400, 0x000800, 0x001000, 0x002000, 0x004000, 0x008000, 0x010000, 0x020000, 0x040000, 0x080000, 0x100000, 0x200000, 0x400000, 0x800000 }

/* The shift registers on the matrix PCB output a signal on each column, which passes through the
* switch and a diode towards the row. The row is then connected to the AVR as an input. This means
* the diode direction is COL(umn) to ROW */
#define DIODE_DIRECTION COL2ROW

/* RGB Data Pin */
#define RGB_DI_PIN C7
/* The number of RGB LEDs connected */
#define DRIVER_LED_TOTAL 115
/* Set the maximum brightness to 110 to avoid going over 500 mA.
* At full brightness with all three indicator LEDs on, the power draw is about 450 mA. */
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 110
/* Enable framebuffer effects */
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS
/* Enable the cycle left right animation and set it as the startup mode */
#define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_CYCLE_LEFT_RIGHT

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not 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

/* Set the max power consumption for the keyboard, which is 500 mA. */
#define USB_MAX_POWER_CONSUMPTION 500

/*
* Force NKRO
*
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
* makefile for this to work.)
*
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
* until the next keyboard reset.
*
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
* fully operational during normal computer usage.
*
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
* power-up.
*
*/
#define FORCE_NKRO

/* disable these deprecated features by default */
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
121 changes: 121 additions & 0 deletions keyboards/ryanskidmore/rskeys100/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
{
"keyboard_name": "rskeys100",
"url": "",
"maintainer": "ryanskidmore",
"layouts": {
"LAYOUT": {
ryanskidmore marked this conversation as resolved.
Show resolved Hide resolved
"layout": [
{"x":0, "y":0},
{"x":2, "y":0},
{"x":3, "y":0},
{"x":4, "y":0},
{"x":5, "y":0},
{"x":6.5, "y":0},
{"x":7.5, "y":0},
{"x":8.5, "y":0},
{"x":9.5, "y":0},
{"x":11, "y":0},
{"x":12, "y":0},
{"x":13, "y":0},
{"x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"x":17.25, "y":0},

{"x":0, "y":1.25},
{"x":1, "y":1.25},
{"x":2, "y":1.25},
{"x":3, "y":1.25},
{"x":4, "y":1.25},
{"x":5, "y":1.25},
{"x":6, "y":1.25},
{"x":7, "y":1.25},
{"x":8, "y":1.25},
{"x":9, "y":1.25},
{"x":10, "y":1.25},
{"x":11, "y":1.25},
{"x":12, "y":1.25},
{"x":13, "y":1.25, "w":2},
{"x":15.25, "y":1.25},
{"x":16.25, "y":1.25},
{"x":17.25, "y":1.25},
{"x":18.5, "y":1.25},
{"x":19.5, "y":1.25},
{"x":20.5, "y":1.25},
{"x":21.5, "y":1.25},

{"x":0, "y":2.25, "w":1.5},
{"x":1.5, "y":2.25},
{"x":2.5, "y":2.25},
{"x":3.5, "y":2.25},
{"x":4.5, "y":2.25},
{"x":5.5, "y":2.25},
{"x":6.5, "y":2.25},
{"x":7.5, "y":2.25},
{"x":8.5, "y":2.25},
{"x":9.5, "y":2.25},
{"x":10.5, "y":2.25},
{"x":11.5, "y":2.25},
{"x":12.5, "y":2.25},
{"x":15.25, "y":2.25},
{"x":16.25, "y":2.25},
{"x":17.25, "y":2.25},
{"x":18.5, "y":2.25},
{"x":19.5, "y":2.25},
{"x":20.5, "y":2.25},
{"x":21.5, "y":2.25, "h": 2},

{"x":0, "y":3.25, "w":1.75},
{"x":1.75, "y":3.25},
{"x":2.75, "y":3.25},
{"x":3.75, "y":3.25},
{"x":4.75, "y":3.25},
{"x":5.75, "y":3.25},
{"x":6.75, "y":3.25},
{"x":7.75, "y":3.25},
{"x":8.75, "y":3.25},
{"x":9.75, "y":3.25},
{"x":10.75, "y":3.25},
{"x":11.75, "y":3.25},
{"x":12.75, "y":3.25},
{"x":13.75, "y":2.25, "w":1.25, "h":2},
{"x":18.5, "y":3.25},
{"x":19.5, "y":3.25},
{"x":20.5, "y":3.25},

{"x":0, "y":4.25, "w":1.25},
{"x":1.25, "y":4.25},
{"x":2.25, "y":4.25},
{"x":3.25, "y":4.25},
{"x":4.25, "y":4.25},
{"x":5.25, "y":4.25},
{"x":6.25, "y":4.25},
{"x":7.25, "y":4.25},
{"x":8.25, "y":4.25},
{"x":9.25, "y":4.25},
{"x":10.25, "y":4.25},
{"x":11.25, "y":4.25},
{"x":12.25, "y":4.25, "w":2.75},
{"x":16.25, "y":4.25},
{"x":18.5, "y":4.25},
{"x":19.5, "y":4.25},
{"x":20.5, "y":4.25},
{"x":21.5, "y":4.25, "h":2},

{"x":0, "y":5.25, "w":1.25},
{"x":1.25, "y":5.25, "w":1.25},
{"x":2.5, "y":5.25, "w":1.25},
{"x":3.75, "y":5.25, "w":6.25},
{"x":10, "y":5.25, "w":1.25},
{"x":11.25, "y":5.25, "w":1.25},
{"x":12.5, "y":5.25, "w":1.25},
{"x":13.75, "y":5.25, "w":1.25},
{"x":15.25, "y":5.25},
{"x":16.25, "y":5.25},
{"x":17.25, "y":5.25},
{"x":18.5, "y":5.25, "w":2},
{"x":20.5, "y":5.25}
]
}
}
}
65 changes: 65 additions & 0 deletions keyboards/ryanskidmore/rskeys100/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// Copyright 2021 Ryan Skidmore (@ryanskidmore, [email protected])
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
* │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Scr│Pse│
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ Ent│ └───┴───┴───┘ ├───┼───┼───┤ + │
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │ │ │ 4 │ 5 │ 6 │ │
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
* │Ctrl│GUI │Alt │ │ Alt│ GUI│Menu│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
*/
/* Default Layer */
[0] = LAYOUT(
ryanskidmore marked this conversation as resolved.
Show resolved Hide resolved
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, LT(1, KC_F12), KC_PSCR, KC_SLCK, KC_PAUS,

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_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
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_ENT, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
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_NUHS, KC_P4, KC_P5, KC_P6,
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
),
/* RGB Control Layer */
[1] = LAYOUT(
ryanskidmore marked this conversation as resolved.
Show resolved Hide resolved
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,

_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, _______, _______, _______
),
};

void keyboard_post_init_user(void) {
rgb_matrix_enable_noeeprom();
}

void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
/* We use RGB for the indicator RGB colours since we don't need to adjust the brightness.
* If any of the indicators are enabled, set the key to white. This overrides the active RGB
* matrix animation. */

if (host_keyboard_led_state().caps_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(76, 255, 255, 255);
}

if (host_keyboard_led_state().num_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(19, 255, 255, 255);
}

if (host_keyboard_led_state().scroll_lock) {
RGB_MATRIX_INDICATOR_SET_COLOR(14, 255, 255, 255);
}
}
1 change: 1 addition & 0 deletions keyboards/ryanskidmore/rskeys100/keymaps/default/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is the default keymap (UK, ISO) for the rskeys100. The RGB control layer can be activated by holding the F12 key.
Loading