Skip to content

Commit ba6b2a0

Browse files
shayna-ilyaCrandel
authored andcommitted
Add vial support for Jorne (vial-kb#562)
* add the vial to the jorne keyboard * fix by code review
1 parent 4c31a54 commit ba6b2a0

File tree

4 files changed

+184
-0
lines changed

4 files changed

+184
-0
lines changed

keyboards/jorne/keymaps/vial/config.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2021 Joric (@joric)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
#pragma once
4+
5+
#define VIAL_KEYBOARD_UID {0x80, 0x41, 0x59, 0xF5, 0x4B, 0xF3, 0x50, 0x97}
6+
#define VIAL_UNLOCK_COMBO_ROWS {0, 0}
7+
#define VIAL_UNLOCK_COMBO_COLS {0, 1}
8+
9+
#ifdef RGBLIGHT_ENABLE
10+
#define RGBLIGHT_EFFECT_BREATHING
11+
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
12+
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
13+
#define RGBLIGHT_EFFECT_SNAKE
14+
#define RGBLIGHT_EFFECT_KNIGHT
15+
#define RGBLIGHT_EFFECT_CHRISTMAS
16+
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
17+
#define RGBLIGHT_EFFECT_RGB_TEST
18+
#define RGBLIGHT_EFFECT_ALTERNATING
19+
#define RGBLIGHT_HUE_STEP 8
20+
#define RGBLIGHT_SAT_STEP 8
21+
#define RGBLIGHT_VAL_STEP 8
22+
#endif
23+
24+
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
25+
// #define SPLIT_USB_DETECT
26+
// #define NO_USB_STARTUP_CHECK

keyboards/jorne/keymaps/vial/keymap.c

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
// Copyright 2021 Joric (@joric)
2+
// SPDX-License-Identifier: GPL-2.0-or-later
3+
#include QMK_KEYBOARD_H
4+
5+
enum layers {
6+
_QWERTY = 0,
7+
_LOWER,
8+
_RAISE,
9+
_ADJUST,
10+
};
11+
12+
13+
enum custom_keycodes {
14+
RGBRST = SAFE_RANGE
15+
};
16+
17+
#define RBR_RGU MT(MOD_RGUI, KC_RBRC)
18+
#define F12_RGU MT(MOD_RGUI, KC_F12)
19+
#define PLS_LCT MT(MOD_LCTL, KC_PPLS)
20+
#define EQL_LCT MT(MOD_LCTL, KC_PEQL)
21+
#define APP_LCT MT(MOD_LCTL, KC_APP)
22+
#define EQL_RCT MT(MOD_RCTL, KC_PEQL)
23+
#define QUO_RCT MT(MOD_RCTL, KC_QUOT)
24+
#define APP_RCT MT(MOD_RCTL, KC_APP)
25+
#define MIN_RCT MT(MOD_RCTL, KC_MINS)
26+
#define EQL_LAL MT(MOD_LALT, KC_EQL)
27+
#define BSL_RAL MT(MOD_RALT, KC_BSLS)
28+
#define BSP_LSH MT(MOD_LSFT, KC_BSPC)
29+
#define SPC_RSH MT(MOD_RSFT, KC_SPC)
30+
#define DEL_RSE LT(_RAISE, KC_DEL)
31+
#define TAB_RSE LT(_RAISE, KC_TAB)
32+
#define ENT_LWR LT(_LOWER, KC_ENT)
33+
#define ESC_LWR LT(_LOWER, KC_ESC)
34+
35+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
36+
37+
[_QWERTY] = LAYOUT(
38+
KC_LGUI, KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, RGUI_T(KC_RBRC),
39+
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RCTL_T(KC_QUOT),
40+
KC_LALT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, BSL_RAL,
41+
TAB_RSE, SPC_RSH, ENT_LWR, ESC_LWR, BSP_LSH, DEL_RSE
42+
),
43+
44+
[_LOWER] = LAYOUT(
45+
_______, KC_UNDS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, F12_RGU,
46+
PLS_LCT, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, MIN_RCT,
47+
EQL_LAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
48+
_______, _______, _______, _______, _______, _______
49+
),
50+
51+
[_RAISE] = LAYOUT(
52+
_______, KC_NUM, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_VOLU, KC_HOME, KC_PSCR, KC_PGUP, KC_SCRL, KC_CAPS, _______,
53+
EQL_LCT, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_MUTE, KC_LEFT, KC_UP, KC_RGHT, KC_INS, APP_RCT,
54+
_______, KC_P0, KC_P1, KC_P2, KC_P3, KC_PCMM, KC_VOLD, KC_END, KC_DOWN, KC_PGDN, KC_PAUS, _______,
55+
_______, _______, _______, _______, _______, _______
56+
),
57+
58+
[_ADJUST] = LAYOUT(
59+
QK_BOOT, RGBRST, AS_UP, AS_TOGG, AS_DOWN, _______, _______, _______, _______, AS_DOWN, AS_TOGG, AS_UP, RGBRST, QK_BOOT,
60+
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, RGB_VAI, RGB_SAI, RGB_HUI, RGB_TOG,
61+
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, RGB_VAD, RGB_SAD, RGB_HUD, RGB_MOD,
62+
_______, SH_TOGG, _______, _______, SH_TOGG, _______
63+
),
64+
65+
};
66+
67+
layer_state_t layer_state_set_user(layer_state_t state) {
68+
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
69+
}
70+
71+
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
72+
switch (keycode) {
73+
case RGBRST:
74+
#ifdef RGBLIGHT_ENABLE
75+
if (record->event.pressed) {
76+
eeconfig_update_rgblight_default();
77+
rgblight_enable();
78+
}
79+
#endif
80+
break;
81+
}
82+
return true;
83+
}
84+

keyboards/jorne/keymaps/vial/rules.mk

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
VIA_ENABLE = yes
2+
VIAL_ENABLE = yes
3+
LTO_ENABLE = yes
4+
5+
RGBLIGHT_ENABLE = no
6+
RGB_MATRIX_ENABLE = no # Can't have RGBLIGHT and RGB_MATRIX at the same time.
7+
MOUSEKEY_ENABLE = no
8+
OLED_ENABLE = yes
9+
COMBO_ENABLE = no
10+
MOUSEKEY_ENABLE = no # Mouse keys
11+
EXTRAKEY_ENABLE = no # Audio control and System control
12+
13+
QMK_SETTINGS = no
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "Jorne",
3+
"vendorId": "0x4753",
4+
"productId": "0x0001",
5+
"lighting": "qmk_rgblight",
6+
"matrix": {"rows": 8, "cols": 6},
7+
"layouts": {
8+
"keymap": [
9+
[{"y": 1, "x": 4}, "0,3", {"x": 7.5}, "4,3"],
10+
[{"y": -0.875, "x": 11.5}, "4,4", {"x": 1}, "4,2"],
11+
[{"y": -0.995, "x": 3}, "0,2", {"x": 1}, "0,4"],
12+
[{"y": -0.88, "x": 6}, "0,5", {"x": 3.5}, "4,5"],
13+
[{"y": -0.875, "x": 14.5}, "4,1", "4,0"],
14+
[{"y": -0.995, "x": 1}, "0,0", "0,1"],
15+
[{"y": -0.38, "x": 4}, "1,3", {"x": 7.5}, "5,3"],
16+
[{"y": -0.875, "x": 13.5}, "5,2"],
17+
[
18+
{"y": -0.995, "c": "#aaaaaa"},
19+
"3,0",
20+
{"x": 2, "c": "#cccccc"},
21+
"1,2",
22+
{"x": 1},
23+
"1,4",
24+
{"x": 5.5},
25+
"5,4",
26+
{"x": 4, "c": "#aaaaaa"},
27+
"7,0"
28+
],
29+
[{"y": -0.88, "x": 6, "c": "#cccccc"}, "1,5", {"x": 3.5}, "5,5"],
30+
[{"y": -0.875, "x": 14.5}, "5,1", {"c": "#aaaaaa"}, "5,0"],
31+
[{"y": -0.995, "x": 1}, "1,0", {"c": "#cccccc"}, "1,1"],
32+
[{"y": -0.38, "x": 4}, "2,3", {"x": 7.5}, "6,3"],
33+
[
34+
{"y": -0.87, "x": 3},
35+
"2,2",
36+
{"x": 1},
37+
"2,4",
38+
{"x": 5.5},
39+
"6,4",
40+
{"x": 1},
41+
"6,2"
42+
],
43+
[{"y": -0.88, "x": 6}, "2,5", {"x": 3.5}, "6,5"],
44+
[
45+
{"y": -0.87, "x": 1, "c": "#aaaaaa"},
46+
"2,0",
47+
{"c": "#cccccc"},
48+
"2,1",
49+
{"x": 11.5},
50+
"6,1",
51+
{"c": "#aaaaaa"},
52+
"6,0"
53+
],
54+
[{"y": -0.13, "x": 4.5, "c": "#777777"}, "3,3", {"x": 6.5}, "7,3"],
55+
[{"r": 15, "rx": 4.5, "ry": 9.1, "y": -5}, "3,4"],
56+
[{"r": 30, "rx": 5.4, "ry": 9.3, "y": -5.3, "x": -0.9, "h": 1.5}, "3,5"],
57+
[{"r": -30, "rx": 11.1, "y": -4.8, "x": 0.8, "h": 1.5}, "7,5"],
58+
[{"r": -15, "rx": 12, "ry": 9.1, "y": -4.75, "x": -0.02}, "7,4"]
59+
]
60+
}
61+
}

0 commit comments

Comments
 (0)