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

Added Ristretto board definition with Vial keymap #12

Open
wants to merge 2 commits into
base: vial
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions keyboards/ristretto/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/* Copyright 2021 Brandon Lewis
*
* 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 0x666B // fk
#define PRODUCT_ID 0x7273 // rs
#define DEVICE_VER 0x0001 // rev 1
#define MANUFACTURER fruitykeeb
#define PRODUCT ristretto

/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 13

/* key matrix pins */
#define MATRIX_ROW_PINS { B1, B2, B3, D3 }
#define MATRIX_COL_PINS { C7, C6, B6, B5, B4, D7, B7, F0, F1, F4, F5, F6, F7 }

/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION COL2ROW

/* 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

#define ENCODERS_PAD_A { D4 }
#define ENCODERS_PAD_B { D6 }
#define ENCODER_RESOLUTION 4
65 changes: 65 additions & 0 deletions keyboards/ristretto/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"keyboard_name": "ristretto",
"url": "https://www.fruitykeeb.xyz/product/ristretto",
"maintainer": "Fruit",
"width": 15,
"height": 4,
"layouts": {
"LAYOUT": {
"layout": [
{"label":"ESC", "x":0, "y":0.25},
{"label":"Q", "x":1, "y":0.25},
{"label":"W", "x":2, "y":0.25},
{"label":"E", "x":3, "y":0},
{"label":"R", "x":4, "y":0.25},
{"label":"T", "x":5, "y":0.25},
{"label":"Y", "x":9, "y":0.25},
{"label":"U", "x":10, "y":0.25},
{"label":"I", "x":11, "y":0},
{"label":"O", "x":12, "y":0.25},
{"label":"P", "x":13, "y":0.25},
{"label":"BKSP", "x":14, "y":0.25},

{"label":"TAB", "x":0, "y":1.25},
{"label":"A", "x":1, "y":1.25},
{"label":"S", "x":2, "y":1.25},
{"label":"D", "x":3, "y":1},
{"label":"F", "x":4, "y":1.25},
{"label":"G", "x":5, "y":1.25},
{"label":"H", "x":9, "y":1.25},
{"label":"J", "x":10, "y":1.25},
{"label":"K", "x":11, "y":1},
{"label":"L", "x":12, "y":1.25},
{"label":";", "x":13, "y":1.25},
{"label":"'", "x":14, "y":1.25},

{"label":"LSFT", "x":0, "y":2.25},
{"label":"Z", "x":1, "y":2.25},
{"label":"X", "x":2, "y":2.25},
{"label":"C", "x":3, "y":2},
{"label":"V", "x":4, "y":2.25},
{"label":"B", "x":5, "y":2.25},
{"label":"N", "x":9, "y":2.25},
{"label":"M", "x":10, "y":2.25},
{"label":"<", "x":11, "y":2},
{"label":">", "x":12, "y":2.25},
{"label":"?", "x":13, "y":2.25},
{"label":"ENTR", "x":14, "y":2.25},

{"label":"LCTL", "x":0, "y":3.25},
{"label":"LGUI", "x":1, "y":3.25},
{"label":"LALT", "x":2, "y":3.25},
{"label":"LOWER", "x":3, "y":3, "h":1.25},
{"label":"Enter", "x":4, "y":3.25},
{"label":"SPACE", "x":5, "y":3.25, "w":1.5},
{"label":"Rotary", "x":7, "y":3.25},
{"label":"SPACE", "x":8.5, "y":3.25, "w":1.5},
{"label":"SHIFT", "x":10, "y":3.25},
{"label":"RAISE", "x":11, "y":3, "h":1.25},
{"label":"RALT", "x":12, "y":3.25},
{"label":"RGUI", "x":13, "y":3.25},
{"label":"RCTL", "x":14, "y":3.25}
]
}
}
}
53 changes: 53 additions & 0 deletions keyboards/ristretto/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* Copyright 2021 Brandon Lewis
*
* 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 {
_BASE,
_RAISE,
_LOWER,
_ADJUST
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT(
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_QUOT ,
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT ,
KC_LCTL , KC_LGUI , KC_LALT ,MO(_LOWER),KC_ENT , KC_SPC , KC_MUTE , KC_SPC , KC_RSFT ,MO(_RAISE),KC_RALT , KC_RGUI , KC_RCTRL
),
[_RAISE] = LAYOUT(
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL ,
KC_CAPS , KC_MINS , KC_EQL , KC_LBRC , KC_RBRC , KC_BSLS , KC_NO , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_BSLS ,
KC_TRNS , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
KC_TRNS , KC_TRNS , KC_TRNS ,MO(_ADJUST),KC_ENT , KC_NO , KC_MPLY , KC_NO , KC_RSFT , KC_NO , KC_TRNS , KC_TRNS , KC_TRNS
),
[_LOWER] = LAYOUT(
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_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_LBRC , KC_RBRC , KC_NO ,
KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
KC_TRNS , KC_TRNS , KC_TRNS , KC_NO , KC_ENT , KC_NO , KC_MUTE , KC_NO , KC_RSFT ,MO(_ADJUST),KC_TRNS, KC_TRNS , KC_TRNS
),
[_ADJUST] = LAYOUT(
XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX ,
XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_CAPS , KC_NLCK , KC_SLCK , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX ,
XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX ,
KC_TRNS , KC_TRNS , KC_TRNS , XXXXXXX , XXXXXXX , XXXXXXX , KC_MUTE , XXXXXXX , XXXXXXX , XXXXXXX , KC_TRNS , KC_TRNS , KC_TRNS
),
};

// OLED and Encoder function is located in the ristretto.c File
9 changes: 9 additions & 0 deletions keyboards/ristretto/keymaps/vial/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#define VIAL_KEYBOARD_UID {0x2B, 0xF8, 0x4A, 0x8F, 0x2B, 0xD3, 0x91, 0xA8}

#define VIAL_UNLOCK_COMBO_ROWS { 0, 3 }
#define VIAL_UNLOCK_COMBO_COLS { 0, 12 }

#define DYNAMIC_KEYMAP_LAYER_COUNT 4
#define LAYER_STATE_8BIT
// #define VIAL_COMBO_ENTRIES 8
// #define VIAL_TAP_DANCE_ENTRIES 8
44 changes: 44 additions & 0 deletions keyboards/ristretto/keymaps/vial/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/* Copyright 2021 Brandon Lewis
*
* 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_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_QUOT ,
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT ,
KC_LCTL , KC_LGUI , KC_LALT , MO(2) , KC_ENT , KC_SPC , KC_MUTE , KC_SPC , KC_RSFT , MO(1) , KC_RALT , KC_RGUI , KC_RCTRL
),
[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_DEL ,
KC_CAPS , KC_MINS , KC_EQL , KC_LBRC , KC_RBRC , KC_BSLS , KC_NO , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_BSLS ,
KC_TRNS , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
KC_TRNS , KC_TRNS , KC_TRNS , MO(3) , KC_ENT , KC_NO , KC_MPLY , KC_NO , KC_RSFT , KC_NO , KC_TRNS , KC_TRNS , KC_TRNS
),
[2] = LAYOUT(
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_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_LBRC , KC_RBRC , KC_NO ,
KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO ,
KC_TRNS , KC_TRNS , KC_TRNS , KC_NO , KC_ENT , KC_NO , KC_MUTE , KC_NO , KC_RSFT , MO(3) , KC_TRNS , KC_TRNS , KC_TRNS
),
[3] = LAYOUT(
XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX ,
XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_CAPS , KC_NLCK , KC_SLCK , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX ,
XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX ,
KC_TRNS , KC_TRNS , KC_TRNS , XXXXXXX , XXXXXXX , XXXXXXX , KC_MUTE , XXXXXXX , XXXXXXX , XXXXXXX , KC_TRNS , KC_TRNS , KC_TRNS
),
};
6 changes: 6 additions & 0 deletions keyboards/ristretto/keymaps/vial/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
VIA_ENABLE = yes
VIAL_ENABLE = yes
LTO_ENABLE = yes

VIAL_ENCODERS_ENABLE = yes
VIAL_INSECURE = yes
45 changes: 45 additions & 0 deletions keyboards/ristretto/keymaps/vial/vial.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "ristretto",
"vendorId": "0x666B",
"productId": "0x7273",
"lighting": "none",
"matrix": {"rows": 4, "cols": 13},
"layouts": {
"labels":
["Left 2u", "Right 2u"],
"keymap": [
[{"y":3.05},"3,0","3,1",{"x":10.7},"3,11","3,12"],
[{"y":-0.45,"x":6.85},"3,6"],
[{"y":0.15,"x":6.35},"0,0\n\n\n\n\n\n\n\n\ne","0,1\n\n\n\n\n\n\n\n\ne"],
[{"rx":7.5,"ry":0.5,"y":-0.45,"x":-6.95},"0,0"],
[{"y":-1,"x":-5.95},"0,1",{"x":9.6},"0,11","0,12"],
[{"x":-7.15},"1,0","1,1",{"x":10},"1,11","1,12"],
[{"x":-7.35},"2,0","2,1",{"x":10.4},"2,11","2,12"],
[{"r":10,"y":-2.55,"x":-3.8},"0,3"],
[{"y":-0.8,"x":-2.8},"0,4","0,5"],
[{"y":-0.9,"x":-4.8},"0,2"],
[{"y":-0.3,"x":-3.8},"1,3"],
[{"y":-0.8,"x":-2.8},"1,4","1,5"],
[{"y":-0.9,"x":-4.8},"1,2"],
[{"y":-0.3,"x":-3.8},"2,3"],
[{"y":-0.8,"x":-2.8},"2,4","2,5"],
[{"y":-0.9,"x":-4.8},"2,2"],
[{"y":-0.1,"x":-3.8,"w":1.25},"3,3","3,4\n\n\n0,0","3,5\n\n\n0,0"],
[{"y":-0.9,"x":-4.8},"3,2"],
[{"y":-0.05,"x":-2.55,"w":2},"3,5\n\n\n0,1"],
[{"y":4.45,"x":-7.5,"a":7},"\n\n\n\n1"],
[{"r":-10,"y":-10.75,"x":2.5,"a":4},"0,9"],
[{"y":-0.8,"x":0.5},"0,7","0,8"],
[{"y":-0.9,"x":3.5},"0,10"],
[{"y":-0.3,"x":2.5},"1,9"],
[{"y":-0.8,"x":0.5},"1,7","1,8"],
[{"y":-0.9,"x":3.5},"1,10"],
[{"y":-0.3,"x":2.5},"2,9"],
[{"y":-0.8,"x":0.5},"2,7","2,8"],
[{"y":-0.9,"x":3.5},"2,10"],
[{"y":-0.1,"x":0.25},"3,7\n\n\n1,0","3,8\n\n\n1,0",{"w":1.25},"3,9"],
[{"y":-0.9,"x":3.5},"3,10"],
[{"y":0,"x":0.25,"w":2},"3,7\n\n\n1,1"]
]
}
}
18 changes: 18 additions & 0 deletions keyboards/ristretto/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Ristretto

![Ristretto](https://i.imgur.com/VHX6ktEh.jpg)
![Ristretto-2](https://i.imgur.com/Hrc8vkph.jpg)

An Integrated, Column Stagger, 40% Keyboard with OLED and Rotary Encoder

* Keyboard Maintainer: [Fruit](https://github.com/Blewis308)
* Hardware Supported: Ristretto PCB, Atmega32u4
* Hardware Availability: Through Group Buy - May 2021

To enter the bootloader, press the button marked "SW1" on the bottom of the PCB.

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

make ristretto: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).
63 changes: 63 additions & 0 deletions keyboards/ristretto/ristretto.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/* Copyright 2021 Brandon Lewis
*
* 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 "ristretto.h"

enum layers {
_BASE,
_RAISE,
_LOWER,
_ADJUST
};

bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if(index == 0) {
if (clockwise) {
tap_code(KC_VOLD);
} else {
tap_code(KC_VOLU);
}
}
return true;
}

#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
return OLED_ROTATION_270;
}

__attribute__((weak)) void oled_task_user(void) {
oled_write_P(PSTR("\n\n"), false);
oled_write_ln_P(PSTR("LAYER"), false);
oled_write_ln_P(PSTR(""), false);
switch (get_highest_layer(layer_state)) {
case _BASE:
oled_write_P(PSTR("BASE\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("RAISE\n"), false);
break;
case _LOWER:
oled_write_P(PSTR("LOWER\n"), false);
break;
case _ADJUST:
oled_write_P(PSTR("ADJ\n"), false);
break;
}
}

#endif
31 changes: 31 additions & 0 deletions keyboards/ristretto/ristretto.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/* Copyright 2021 Brandon Lewis
*
* 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, K007, K008, K009, K010, K011, K012, \
K100, K101, K102, K103, K104, K105, K107, K108, K109, K110, K111, K112, \
K200, K201, K202, K203, K204, K205, K207, K208, K209, K210, K211, K212, \
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312 \
) { \
{K000, K001, K002, K003, K004, K005, KC_NO, K007, K008, K009, K010, K011, K012}, \
{K100, K101, K102, K103, K104, K105, KC_NO, K107, K108, K109, K110, K111, K112}, \
{K200, K201, K202, K203, K204, K205, KC_NO, K207, K208, K209, K210, K211, K212}, \
{K300, K301, K302, K303, K304, K305, K306 , K307, K308, K309, K310, K311, K312} \
}
Loading