Skip to content

Commit b9809bf

Browse files
committed
Add missing header
1 parent 85cba49 commit b9809bf

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

config/keypos_def/keypos_26keys.h

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
/* This file is copied and then modified from https://github.com/urob/zmk-nodefree-config/blob/973f717c6bbde9cf452a4da88ac9a7f80cdd4bef/keypos_def/keypos_34keys.h
2+
* LICENSE for that repo is inlined below.
3+
4+
* MIT License
5+
*
6+
* Copyright (c) 2023 Robert U
7+
*
8+
* Permission is hereby granted, free of charge, to any person obtaining a copy
9+
* of this software and associated documentation files (the "Software"), to deal
10+
* in the Software without restriction, including without limitation the rights
11+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12+
* copies of the Software, and to permit persons to whom the Software is
13+
* furnished to do so, subject to the following conditions:
14+
*
15+
* The above copyright notice and this permission notice shall be included in all
16+
* copies or substantial portions of the Software.
17+
*
18+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24+
* SOFTWARE.
25+
*/
26+
27+
/* 26 KEY MATRIX / LAYOUT MAPPING
28+
29+
╭────────────────────┬────────────────────╮ ╭─────────────────────┬─────────────────────╮
30+
│ 0 1 2 3 │ 4 5 6 7 │ │ LT3 LT2 LT1 LT0 │ RT0 RT1 RT2 RT3 │
31+
│ 8 9 10 11 12 │ 13 14 15 16 17 │ │ LM4 LM3 LM2 LM1 LM0 │ RM0 RM1 RM2 RM3 RM4 │
32+
╰───╮ 18 19 20 │ 21 22 23 ╭───╯ ╰───╮ LB3 LB2 LB1 │ RB1 RB2 RB3 ╭───╯
33+
╰───────────╮ 24 │ 25 ╭───────────╯ ╰───────────╮ LH0 │ RH0 ╭───────────╯
34+
╰────┴────╯ ╰─────┴─────╯ */
35+
36+
#pragma once
37+
38+
#define LT0 3 // left-top row
39+
#define LT1 2
40+
#define LT2 1
41+
#define LT3 0
42+
43+
#define RT0 4 // right-top row
44+
#define RT1 5
45+
#define RT2 6
46+
#define RT3 7
47+
48+
#define LM0 12 // left-middle row
49+
#define LM1 11
50+
#define LM2 10
51+
#define LM3 9
52+
#define LM4 8
53+
54+
#define RM0 13 // right-middle row
55+
#define RM1 14
56+
#define RM2 15
57+
#define RM3 16
58+
#define RM4 17
59+
60+
#define LB1 20 // left-bottom row
61+
#define LB2 19
62+
#define LB3 18
63+
64+
#define RB1 21 // right-bottom row
65+
#define RB2 22
66+
#define RB3 23
67+
68+
#define LH0 24 // left thumb key
69+
70+
#define RH0 25 // right thumb key
71+
72+
#define KEYS_L LT0 LT1 LT2 LT3 LM0 LM1 LM2 LM3 LM4 LB1 LB2 LB3 // left-hand keys
73+
#define KEYS_R RT0 RT1 RT2 RT3 RM0 RM1 RM2 RM3 RM4 RB1 RB2 RB3 // right-hand keys
74+
#define THUMBS LH0 RH0 // thumb keys
75+
76+
#define LAYER_FROM36( \
77+
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \
78+
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \
79+
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \
80+
k30, k31, k32, k33, k34, k35 \
81+
) \
82+
k01 k02 k03 k04 k05 k06 k07 k08 \
83+
k10 k11 k12 k13 k14 k15 k16 k17 k18 k19 \
84+
k21 k22 k23 k26 k27 k28 \
85+
k32 k33

0 commit comments

Comments
 (0)