Skip to content

Commit 36347bc

Browse files
authored
Merge pull request #11 from ivan-oc/add-crbn-support
Added support for Polarity Works CRBN keyboard
2 parents 125f8c7 + 01029ef commit 36347bc

File tree

4 files changed

+193
-1
lines changed

4 files changed

+193
-1
lines changed

keyboards/crbn/config.h

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright 2020 Harry Herring
1+
/* Copyright 2021 Harry Herring, Ivan Organista
22
*
33
* This program is free software: you can redistribute it and/or modify
44
* it under the terms of the GNU General Public License as published by
@@ -52,3 +52,14 @@
5252

5353
/* Locking resynchronize hack */
5454
#define LOCKING_RESYNC_ENABLE
55+
56+
/* VIAL Keyboard UID */
57+
#define VIAL_KEYBOARD_UID {0xC1, 0x9B, 0x8E, 0x7B, 0x43, 0xD7, 0x61, 0xEE}
58+
59+
/* VIAL Unlock combo keys */
60+
#define VIAL_UNLOCK_COMBO_ROWS { 0, 2 }
61+
#define VIAL_UNLOCK_COMBO_COLS { 0, 11 }
62+
63+
/* Encoder default values and delay */
64+
#define VIAL_ENCODER_DEFAULT { KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS }
65+
#define VIAL_ENCODER_KEYCODE_DELAY 10

keyboards/crbn/keymaps/via/keymap.c

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* Copyright 2021 Ivan Organista
2+
*
3+
* This program is free software: you can redistribute it and/or modify
4+
* it under the terms of the GNU General Public License as published by
5+
* the Free Software Foundation, either version 2 of the License, or
6+
* (at your option) any later version.
7+
*
8+
* This program is distributed in the hope that it will be useful,
9+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
* GNU General Public License for more details.
12+
*
13+
* You should have received a copy of the GNU General Public License
14+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
*/
16+
17+
#include QMK_KEYBOARD_H
18+
19+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20+
21+
LAYOUT_crbn_1x2u(
22+
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
23+
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
24+
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
25+
MO(3), KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT),
26+
27+
LAYOUT_crbn_1x2u(
28+
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_TRNS,
29+
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
30+
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, LSFT(KC_NUHS), LSFT(KC_NUBS), KC_HOME, KC_END, KC_TRNS,
31+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY),
32+
33+
LAYOUT_crbn_1x2u(
34+
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
35+
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
36+
KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, KC_TRNS,
37+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY),
38+
39+
LAYOUT_crbn_1x2u(
40+
RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
41+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
42+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
43+
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
44+
45+
};

keyboards/crbn/keymaps/via/rules.mk

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
VIA_ENABLE = yes
2+
VIAL_ENABLE = yes
3+
VIAL_ENCODERS_ENABLE = yes
4+
LTO_ENABLE = yes

keyboards/crbn/keymaps/via/vial.json

+132
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"name": "Polarity Works CRBN",
3+
"vendorId": "0x726F",
4+
"productId": "0x0002",
5+
"lighting": "none",
6+
"matrix": {
7+
"rows": 4,
8+
"cols": 12
9+
},
10+
"layouts": {
11+
"labels": [
12+
[
13+
"Bottom row",
14+
"1x2u spacebar",
15+
"2x2u spacebar"
16+
]
17+
],
18+
"keymap": [
19+
[
20+
{
21+
"c": "#777777"
22+
},
23+
"0,0",
24+
{
25+
"c": "#cccccc"
26+
},
27+
"0,1",
28+
"0,2",
29+
"0,3",
30+
"0,4",
31+
"0,5",
32+
"0,6",
33+
"0,7",
34+
"0,8",
35+
"0,9",
36+
"0,10",
37+
{
38+
"c": "#aaaaaa"
39+
},
40+
"0,11",
41+
{
42+
"x": 0.25,
43+
"c": "#cccccc"
44+
},
45+
"0,0\n\n\n\n\n\n\n\n\ne",
46+
"0,1\n\n\n\n\n\n\n\n\ne"
47+
],
48+
[
49+
{
50+
"c": "#aaaaaa"
51+
},
52+
"1,0",
53+
{
54+
"c": "#cccccc"
55+
},
56+
"1,1",
57+
"1,2",
58+
"1,3",
59+
"1,4",
60+
"1,5",
61+
"1,6",
62+
"1,7",
63+
"1,8",
64+
"1,9",
65+
"1,10",
66+
"1,11"
67+
],
68+
[
69+
{
70+
"c": "#aaaaaa"
71+
},
72+
"2,0",
73+
{
74+
"c": "#cccccc"
75+
},
76+
"2,1",
77+
"2,2",
78+
"2,3",
79+
"2,4",
80+
"2,5",
81+
"2,6",
82+
"2,7",
83+
"2,8",
84+
"2,9",
85+
"2,10",
86+
{
87+
"c": "#777777"
88+
},
89+
"2,11"
90+
],
91+
[
92+
{
93+
"c": "#aaaaaa"
94+
},
95+
"3,0",
96+
"3,1",
97+
"3,2",
98+
"3,3",
99+
"3,4\n\n\n0,0",
100+
{
101+
"c": "#cccccc",
102+
"w": 2
103+
},
104+
"3,5\n\n\n0,0",
105+
{
106+
"c": "#aaaaaa"
107+
},
108+
"3,7\n\n\n0,0",
109+
{
110+
"c": "#777777"
111+
},
112+
"3,8",
113+
"3,9",
114+
"3,10",
115+
"3,11"
116+
],
117+
[
118+
{
119+
"y": 0.25,
120+
"x": 4,
121+
"c": "#cccccc",
122+
"w": 2
123+
},
124+
"3,4\n\n\n0,1",
125+
{
126+
"w": 2
127+
},
128+
"3,7\n\n\n0,1"
129+
]
130+
]
131+
}
132+
}

0 commit comments

Comments
 (0)