-
Notifications
You must be signed in to change notification settings - Fork 3
/
darknight.ino
131 lines (125 loc) · 5.08 KB
/
darknight.ino
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
#include <firmware.h>
// The layout has 5 rows and 12 columns.
constexpr int R = 5, C = 12;
// The row pins, to be modified according to the exact wiring.
const int row_pins[R] = {18, 17, 16, 15, 14};
// The column pins, to be modified according to the exact wiring.
const int col_pins[C] = {0, 1, 2, 3, 4, 5, 11, 10, 9, 8, 7, 6};
// LED pins are for displaying the active layer with binary code.
// High bits are not displayed when there are not enough LEDs.
// Pin 13 is for the built-in LED with Teensy LC, 3.2 and 4.0.
// Make sure it's not already used by one of the rows/columns.
// Set an empty initializer {} to disable this feature.
const int led_pins[] = {13};
// Layers of this layout. The keyboard always loads layer 0 to start.
// See key_map.h for definitions of keys, e.g. lsh <=> left shift.
Layer<R,C> layers[] = {
{ "darknight", // name of this layer
l0, // this is layer 0
l2, // Fn layer is layer 2
"", // use no translator
{
{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='},
{tab, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p','\''},
{lct, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', rct},
{lsh, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', rsh},
{lgu, '`', mlc, mrc, lal, fn, spc, ral, '[', ']','\\', del},
},
// Tapping on modifiers to get normal keys.
{ {fn, bks}, {lct, esc}, {rct, ent} }
},
{ "darknight-vi", // name of this layer
l1, // this is layer 1
l2, // Fn layer is layer 2
"vi", // use vi translator
{
{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='},
{tab, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p','\''},
{lct, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', rct},
{lsh, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', rsh},
{lgu, '`', mlc, mrc, lal, fn, spc, ral, '[', ']','\\', del},
},
// Tapping on modifiers to get normal keys.
{ {fn, bks}, {lct, esc}, {rct, ent} }
},
{ "darknight-fn",
l2, // this is layer 2
l2, // Fn layer is itself
"", // use no translator
{
{ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12},
{tab, 0, mut, vdn, vup, 0, 0, 0, 0, 0, 0, cap},
{lct, ply, pau, rew, ffw, rec, lt, dn, up, rt, 0, rct},
{lsh, 0, stp, ptk, ntk, ejt, hom, pgd, pgu, end, 0, rsh},
{lgu, l0, l1, l2, lal, fn, bks, ral, l3, l4, l5, l6},
},
// Tapping on modifiers to get normal keys.
{ {fn, bks}, {lct, esc}, {rct, ent} }
},
{ "darknight-dbg",
l3, // this is layer 3
l2, // Fn layer is layer 2
"dbg", // use debug translator
{
{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='},
{tab, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p','\''},
{lct, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', rct},
{lsh, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', rsh},
{lgu, '`', mlc, mrc, lal, fn, spc, ral, '[', ']','\\', del},
},
},
{ "darknight-mod-fn", // name of this layer
l4, // this is layer 4
l4, // Fn layer is itself
"", // use no translator
{
{0, f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, 0},
{0, '~', '"', '_', '+', '|', hom, pgd, pgu, end, f11, 0},
{0, '`','\'', '-', '=','\\', lt, dn, up, rt, f12, 0},
{0, lct, lsh, '(', ')', bks, mut, vdn, vup, rsh, rct, 0},
{0, lgu, l0, l1, lal, lfn, tab, rfn, l2, l3, ral, 0},
},
},
{ "darknight-mod", // name of this layer
l5, // this is layer 5
l4, // Fn layer is layer 4
"", // use no translator
{
{0, '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', 0},
{0, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p', 0},
{0, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', 0},
{0, lct, lsh, 'c', 'v', 'b', 'n', 'm', ',', rsh, rct, 0},
{0, lgu, mlc, mrc, lal, lfn, spc, rfn, '[', ']', ral, 0},
},
// Tapping on modifiers to get normal keys.
{ {lfn, bks}, {lct, 'z'}, {lsh, 'x'}, {lal, esc},
{rfn, ent}, {rct, '/'}, {rsh, '.'}, {ral, del} }
},
{ "ergo", // name of this layer
l6, // this is layer 6
l7, // Fn layer is layer 7
"", // use no translator
{
{'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '-', '='},
{tab, 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', 'o', 'p','\''},
{esc, 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', ent},
{lsh, 'z', 'x', 'c', 'v', 'b', 'n', 'm', ',', '.', '/', rsh},
{lgu, '`', mlc, mrc, lal, fn, spc, rct, '[', ']','\\', del},
},
// Tapping on modifiers to get normal keys.
{ {fn, bks} }
},
{ "ergo-fn", // name of this layer
l7, // this is layer 7
l7, // Fn layer is layer 7
"", // use no translator
{
{ f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12},
{tab, 0, mut, vdn, vup, 0, 0, pgu, up, pgd, 0, cap},
{esc, ptk, rew, ppa, ffw, ntk, 0, lt, dn, rt, 0, ent},
{lsh, 0, 0, 0, 0, 0, 0, hom, 0, end, 0, rsh},
{lgu, 0, mlc, mrc, lal, fn, bks, rct, l0, l1, 0, del},
},
},
};
#include <firmware.cc>