-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
697 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
{ | ||
"manufacturer": "Kiser Designs", | ||
"keyboard_name": "Gyrovan", | ||
"maintainer": "NCKiser", | ||
"bootloader": "stm32-dfu", | ||
"diode_direction": "COL2ROW", | ||
"encoder": { | ||
"enabled": true, | ||
"rotary": [ | ||
{"pin_a": "A10", "pin_b": "B3"}, | ||
{"pin_a": "A15", "pin_b": "A14"}, | ||
{"pin_a": "A8", "pin_b": "B15"}, | ||
{"pin_a": "C15", "pin_b": "F0"} | ||
] | ||
}, | ||
"features": { | ||
"bootmagic": true, | ||
"command": false, | ||
"console": false, | ||
"extrakey": true, | ||
"mousekey": true, | ||
"nkro": true, | ||
"rgb_matrix": true | ||
}, | ||
"matrix_pins": { | ||
"cols": ["B11", "B10", "B2", "B1", "B0", "A7", "A6", "A5", "A4", "A3", "A1", "F1"], | ||
"rows": ["C13", "B12", "A2", "A0", "C14"] | ||
}, | ||
"processor": "STM32F072", | ||
"rgb_matrix": { | ||
"driver": "ws2812", | ||
"led_count": 6, | ||
"layout": [ | ||
{"flags": 4, "matrix": [0, 0], "x": 132, "y": 32}, | ||
{"flags": 4, "matrix": [0, 1], "x": 172, "y": 32}, | ||
{"flags": 4, "matrix": [0, 2], "x": 212, "y": 32}, | ||
{"flags": 4, "matrix": [4, 0], "x": 12, "y": 32}, | ||
{"flags": 4, "matrix": [4, 1], "x": 52, "y": 32}, | ||
{"flags": 4, "matrix": [4, 2], "x": 92, "y": 32} | ||
], | ||
"animations": { | ||
"gradient_left_right": true, | ||
"breathing": true, | ||
"cycle_all": true, | ||
"cycle_left_right": true | ||
} | ||
}, | ||
"url": "https://qmk.fm/keyboards", | ||
"usb": { | ||
"device_version": "0.0.1", | ||
"pid": "0x4776", | ||
"vid": "0x4B44" | ||
}, | ||
"ws2812": { | ||
"pin": "A9", | ||
"driver": "bitbang" | ||
}, | ||
"layouts": { | ||
"LAYOUT": { | ||
"layout": [ | ||
{ "matrix": [4, 0], "x": 0.5, "y": 0.25 }, | ||
{ "matrix": [4, 1], "x": 1.5, "y": 0.25 }, | ||
{ "matrix": [4, 2], "x": 2.5, "y": 0.25 }, | ||
{ "matrix": [4, 3], "x": 3.5, "y": 0.25 }, | ||
{ "matrix": [4, 4], "x": 4.5, "y": 0.25 }, | ||
{ "matrix": [4, 5], "x": 5.5, "y": 0.25 }, | ||
|
||
{ "matrix": [4, 9], "x": 11.75, "y": 0 }, | ||
|
||
{ "matrix": [0, 0], "x": 0, "y": 1.25 }, | ||
{ "matrix": [0, 1], "x": 1, "y": 1.25 }, | ||
{ "matrix": [0, 2], "x": 2, "y": 1.25 }, | ||
{ "matrix": [0, 3], "x": 3, "y": 1.25 }, | ||
{ "matrix": [0, 4], "x": 4, "y": 1.25 }, | ||
{ "matrix": [0, 5], "x": 5, "y": 1.25 }, | ||
{ "matrix": [0, 6], "x": 6, "y": 1.25 }, | ||
{ "matrix": [0, 7], "x": 7, "y": 1.25 }, | ||
{ "matrix": [0, 8], "x": 8, "y": 1.25 }, | ||
{ "matrix": [0, 9], "x": 9, "y": 1.25 }, | ||
{ "matrix": [0, 10], "x": 10, "y": 1.25 }, | ||
{ "matrix": [0, 11], "w": 1.75, "x": 11, "y": 1.25 }, | ||
|
||
{ "matrix": [1, 0], "w": 1.25, "x": 0, "y": 2.25 }, | ||
{ "matrix": [1, 1], "x": 1.25, "y": 2.25 }, | ||
{ "matrix": [1, 2], "x": 2.25, "y": 2.25 }, | ||
{ "matrix": [1, 3], "x": 3.25, "y": 2.25 }, | ||
{ "matrix": [1, 4], "x": 4.25, "y": 2.25 }, | ||
{ "matrix": [1, 5], "x": 5.25, "y": 2.25 }, | ||
{ "matrix": [1, 6], "x": 6.25, "y": 2.25 }, | ||
{ "matrix": [1, 7], "x": 7.25, "y": 2.25 }, | ||
{ "matrix": [1, 8], "x": 8.25, "y": 2.25 }, | ||
{ "matrix": [1, 9], "x": 9.25, "y": 2.25 }, | ||
{ "matrix": [1, 10], "x": 10.25, "y": 2.25 }, | ||
{ "matrix": [1, 11], "w": 1.5, "x": 11.25, "y": 2.25 }, | ||
|
||
{ "matrix": [2, 0], "w": 1.75, "x": 0, "y": 3.25 }, | ||
{ "matrix": [2, 1], "x": 1.75, "y": 3.25 }, | ||
{ "matrix": [2, 2], "x": 2.75, "y": 3.25 }, | ||
{ "matrix": [2, 3], "x": 3.75, "y": 3.25 }, | ||
{ "matrix": [2, 4], "x": 4.75, "y": 3.25 }, | ||
{ "matrix": [2, 5], "x": 5.75, "y": 3.25 }, | ||
{ "matrix": [2, 6], "x": 6.75, "y": 3.25 }, | ||
{ "matrix": [2, 7], "x": 7.75, "y": 3.25 }, | ||
{ "matrix": [2, 8], "x": 8.75, "y": 3.25 }, | ||
{ "matrix": [2, 9], "x": 9.75, "y": 3.25 }, | ||
{ "matrix": [2, 10], "x": 10.75, "y": 3.25 }, | ||
{ "matrix": [2, 11], "x": 11.75, "y": 3.25 }, | ||
|
||
{ "matrix": [3, 0], "w": 1.25, "x": 0, "y": 4.25 }, | ||
{ "matrix": [3, 1], "x": 1.25, "y": 4.25 }, | ||
{ "matrix": [3, 2], "w": 1.25, "x": 2.25, "y": 4.25 }, | ||
{ "matrix": [3, 4], "w": 2.75, "x": 3.5, "y": 4.25 }, | ||
{ "matrix": [3, 5], "w": 6.25, "x": 3.5, "y": 5.25 }, | ||
{ "matrix": [3, 6], "w": 2.25, "x": 6.25, "y": 4.25 }, | ||
{ "matrix": [3, 8], "w": 1.25, "x": 8.5, "y": 4.25 }, | ||
{ "matrix": [3, 9], "x": 9.75, "y": 4.25 }, | ||
{ "matrix": [3, 10], "x": 10.75, "y": 4.25 }, | ||
{ "matrix": [3, 11], "x": 11.75, "y": 4.25 } | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* Copyright 2024 Noah Kiser (NCKiser) | ||
* | ||
* 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( | ||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_MUTE, | ||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL | ||
) | ||
}; | ||
|
||
#if defined(ENCODER_MAP_ENABLE) | ||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | ||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_HOME, KC_END) } | ||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ENCODER_MAP_ENABLE = yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* 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 | ||
|
||
#define VIAL_KEYBOARD_UID {0x91, 0xC7, 0x88, 0x4B, 0xE5, 0x17, 0x8B, 0x62} | ||
|
||
#define VIAL_TAP_DANCE_ENTRIES 16 | ||
|
||
#define VIAL_COMBO_ENTRIES 16 | ||
|
||
#define DYNAMIC_KEYMAP_LAYER_COUNT 8 | ||
|
||
#define VIAL_UNLOCK_COMBO_ROWS { 1, 2 } | ||
#define VIAL_UNLOCK_COMBO_COLS { 0, 11 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
/* Copyright 2024 Noah Kiser (NCKiser) | ||
* | ||
* 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( | ||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_MUTE, | ||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | ||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, | ||
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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL | ||
) | ||
}; | ||
|
||
#if defined(ENCODER_MAP_ENABLE) | ||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = { | ||
[0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGUP, KC_PGDN), ENCODER_CCW_CW(KC_HOME, KC_END) } | ||
}; | ||
#endif | ||
|
||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { | ||
if (rgb_matrix_is_enabled()){ | ||
HSV layer_hsv = {rgb_matrix_get_hue(), ((int)rgb_matrix_get_sat()>>1)+128, rgb_matrix_get_val()}; //get the matrix hue, sat (minimum 50%), and value | ||
HSV lock_hsv = {(rgb_matrix_get_hue()+(rgb_matrix_get_speed()>>1))%256, ((int)rgb_matrix_get_sat()>>1)+128, 0}; | ||
HSV mod_hsv = {(rgb_matrix_get_hue()+2*(rgb_matrix_get_speed()>>1))%256, ((int)rgb_matrix_get_sat()>>1)+128, 0}; | ||
|
||
layer_hsv.h += 32*get_highest_layer(layer_state|default_layer_state); //hue-shift the layer indicator based on highest layer (of 0-7 layers) | ||
layer_hsv.h = layer_hsv.h % 256; //modulo 256 | ||
|
||
int mods = get_mods() | get_oneshot_mods(); //get all modifiers, either held or OSM | ||
//0bGASC | ||
mods = ((mods>>4)|mods) & 0x0F; //combine left and right mods, and take just the bottom 4 bits (0-15) | ||
if (mods == 0b0001){mod_hsv.h = ( mod_hsv.h + 0 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b0011){mod_hsv.h = ( mod_hsv.h + 32 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b0010){mod_hsv.h = ( mod_hsv.h + 64 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b0110){mod_hsv.h = ( mod_hsv.h + 96 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b0100){mod_hsv.h = ( mod_hsv.h + 128 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1100){mod_hsv.h = ( mod_hsv.h + 160 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1000){mod_hsv.h = ( mod_hsv.h + 192 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1001){mod_hsv.h = ( mod_hsv.h + 224 )%256; mod_hsv.s = mod_hsv.s; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1010){mod_hsv.h = ( mod_hsv.h + 85 )%256; mod_hsv.s = mod_hsv.s >> 1; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b0101){mod_hsv.h = ( mod_hsv.h + 213 )%256; mod_hsv.s = mod_hsv.s >> 1; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1110){mod_hsv.h = ( mod_hsv.h + 128 )%256; mod_hsv.s = mod_hsv.s >> 1; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b0111){mod_hsv.h = ( mod_hsv.h + 43 )%256; mod_hsv.s = mod_hsv.s >> 1; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1011){mod_hsv.h = ( mod_hsv.h + 0 )%256; mod_hsv.s = mod_hsv.s >> 1; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1101){mod_hsv.h = ( mod_hsv.h + 171 )%256; mod_hsv.s = mod_hsv.s >> 1; mod_hsv.v = rgb_matrix_get_val();} | ||
if (mods == 0b1111){mod_hsv.h = mod_hsv.h; mod_hsv.s = 0; mod_hsv.v = rgb_matrix_get_val();} | ||
|
||
int locks = (host_keyboard_led_state().caps_lock << 0) | ( (1-host_keyboard_led_state().num_lock) << 1) | (host_keyboard_led_state().scroll_lock << 2); | ||
//0bSNC | ||
if (locks == 0b001){lock_hsv.h = ( lock_hsv.h + 0 )%256; lock_hsv.s = lock_hsv.s; lock_hsv.v = rgb_matrix_get_val();} | ||
if (locks == 0b010){lock_hsv.h = ( lock_hsv.h + 85 )%256; lock_hsv.s = lock_hsv.s; lock_hsv.v = rgb_matrix_get_val();} | ||
if (locks == 0b100){lock_hsv.h = ( lock_hsv.h + 171 )%256; lock_hsv.s = lock_hsv.s; lock_hsv.v = rgb_matrix_get_val();} | ||
if (locks == 0b011){lock_hsv.h = ( lock_hsv.h + 43 )%256; lock_hsv.s = lock_hsv.s; lock_hsv.v = rgb_matrix_get_val();} | ||
if (locks == 0b110){lock_hsv.h = ( lock_hsv.h + 128 )%256; lock_hsv.s = lock_hsv.s; lock_hsv.v = rgb_matrix_get_val();} | ||
if (locks == 0b101){lock_hsv.h = ( lock_hsv.h + 213 )%256; lock_hsv.s = lock_hsv.s; lock_hsv.v = rgb_matrix_get_val();} | ||
if (locks == 0b111){lock_hsv.h = lock_hsv.h; lock_hsv.s = lock_hsv.s >> 1; lock_hsv.v = rgb_matrix_get_val();} | ||
|
||
RGB layer_rgb = hsv_to_rgb(layer_hsv); | ||
RGB lock_rgb = hsv_to_rgb(lock_hsv); | ||
RGB mod_rgb = hsv_to_rgb(mod_hsv); | ||
int top_row = via_get_layout_options()&0x80 ? 0 : 1; | ||
rgb_matrix_set_color(0 + 3*top_row, layer_rgb.r, layer_rgb.g, layer_rgb.b); | ||
rgb_matrix_set_color(1 + 3*top_row, lock_rgb.r, lock_rgb.g, lock_rgb.b); | ||
rgb_matrix_set_color(2 + 3*top_row, mod_rgb.r, mod_rgb.g, mod_rgb.b); | ||
rgb_matrix_set_color(3 - 3*top_row, 0, 0, 0); | ||
rgb_matrix_set_color(4 - 3*top_row, 0, 0, 0); | ||
rgb_matrix_set_color(5 - 3*top_row, 0, 0, 0); | ||
} | ||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
VIA_ENABLE = yes | ||
VIAL_ENABLE = yes | ||
VIALRGB_ENABLE = yes | ||
ENCODER_MAP_ENABLE = yes |
Oops, something went wrong.