summaryrefslogtreecommitdiff
path: root/keyboards/ramonimbao/squishytkl/squishytkl.h
blob: 53d91c27ed85ae7a6e6cba877e1505ded41b1f99 (plain)
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
132
133
134
135
/* Copyright 2021 Ramon Imbao
 *
 * 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"

/* This is a shortcut to help you visually see your layout.
 *
 * The first section contains all of the arguments representing the physical
 * layout of the board and position of the keys.
 *
 * The second converts the arguments into a two-dimensional array which
 * represents the switch matrix.
 */

#define ___ KC_NO

#define LAYOUT_ansi( \
    k00,  k01, k02, k03, k04,  k10, k11, k12, k13,  k20, k21, k22, k23,  k24,   k3k, k3l, k3m, \
    k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h,    k8i,    k4k, k4l, k4m, \
    k95,   k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h,   k9j,   k5k, k5l, k5m, \
    ka5,    ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag,     kai,                    \
    kb5,      kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg,     kbi,             k6l,      \
    kc5,  kc6,  kc7,                kcd,                kcf,  kcg,  kch,  kci,  k7k, k7l, k7m  \
) { \
    /*              0    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 */ \
    /*              0    1    2    3    4    5    6    7    8    9    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    p  */ \
    /*  0 | 0 */ { k00, k01, k02, k03, k04, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  1 | 1 */ { k10, k11, k12, k13, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  2 | 2 */ { k20, k21, k22, k23, k24, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  3 | 3 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k3k, k3l, k3m, ___, ___, ___ }, \
    /*  4 | 4 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k4k, k4l, k4m, ___, ___, ___ }, \
    /*  5 | 5 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k5k, k5l, k5m, ___, ___, ___ }, \
    /*  6 | 6 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k6l, ___ }, \
    /*  7 | 7 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k7k, k7l, k7m }, \
    /*  8 | 8 */ { ___, ___, ___, ___, ___, k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h, k8i, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  9 | 9 */ { ___, ___, ___, ___, ___, k95, k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h, ___, k9j, ___, ___, ___, ___, ___, ___ }, \
    /* 10 | a */ { ___, ___, ___, ___, ___, ka5, ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag, ___, kai, ___, ___, ___, ___, ___, ___, ___ }, \
    /* 11 | b */ { ___, ___, ___, ___, ___, kb5, ___, kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg, ___, kbi, ___, ___, ___, ___, ___, ___, ___ }, \
    /* 12 | c */ { ___, ___, ___, ___, ___, kc5, kc6, kc7, ___, ___, ___, ___, ___, kcd, ___, kcf, kcg, ___, kch, kci, ___, ___, ___, ___, ___, ___ }, \
    /* 13 | c */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
}

#define LAYOUT_iso( \
    k00,  k01, k02, k03, k04,  k10, k11, k12, k13,  k20, k21, k22, k23,  k24,   k3k, k3l, k3m, \
    k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h,    k8i,    k4k, k4l, k4m, \
    k95,   k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h,          k5k, k5l, k5m, \
    ka5,    ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag, kai,   k9j,                 \
    kb5, kb6, kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg,     kbi,             k6l,      \
    kc5,  kc6,  kc7,                kcd,                kcf,  kcg,  kch,  kci,  k7k, k7l, k7m  \
) { \
    /*              0    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 */ \
    /*              0    1    2    3    4    5    6    7    8    9    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    p  */ \
    /*  0 | 0 */ { k00, k01, k02, k03, k04, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  1 | 1 */ { k10, k11, k12, k13, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  2 | 2 */ { k20, k21, k22, k23, k24, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  3 | 3 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k3k, k3l, k3m, ___, ___, ___ }, \
    /*  4 | 4 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k4k, k4l, k4m, ___, ___, ___ }, \
    /*  5 | 5 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k5k, k5l, k5m, ___, ___, ___ }, \
    /*  6 | 6 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k6l, ___ }, \
    /*  7 | 7 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k7k, k7l, k7m }, \
    /*  8 | 8 */ { ___, ___, ___, ___, ___, k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h, k8i, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  9 | 9 */ { ___, ___, ___, ___, ___, k95, k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h, ___, k9j, ___, ___, ___, ___, ___, ___ }, \
    /* 10 | a */ { ___, ___, ___, ___, ___, ka5, ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag, ___, kai, ___, ___, ___, ___, ___, ___, ___ }, \
    /* 11 | b */ { ___, ___, ___, ___, ___, kb5, kb6, kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg, ___, kbi, ___, ___, ___, ___, ___, ___, ___ }, \
    /* 12 | c */ { ___, ___, ___, ___, ___, kc5, kc6, kc7, ___, ___, ___, ___, ___, kcd, ___, kcf, kcg, ___, kch, kci, ___, ___, ___, ___, ___, ___ }, \
    /* 13 | c */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
}

#define LAYOUT_jis( \
    k00,  k01, k02, k03, k04,  k10, k11, k12, k13,  k20, k21, k22, k23,  k24,   k3k, k3l, k3m, \
    k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h, k8i, k8j,  k4k, k4l, k4m, \
    k95,   k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h,          k5k, k5l, k5m, \
    ka5,    ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag, kai,   k9j,                 \
    kb5,      kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg, kbi,   kbj,          k6l,      \
    kc5,  kc6,  kc7,  kc8, kc9,         kcd,       kce, kcf,  kcg,  kch,  kci,  k7k, k7l, k7m  \
) { \
    /*              0    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 */ \
    /*              0    1    2    3    4    5    6    7    8    9    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    p  */ \
    /*  0 | 0 */ { k00, k01, k02, k03, k04, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  1 | 1 */ { k10, k11, k12, k13, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  2 | 2 */ { k20, k21, k22, k23, k24, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  3 | 3 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k3k, k3l, k3m, ___, ___, ___ }, \
    /*  4 | 4 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k4k, k4l, k4m, ___, ___, ___ }, \
    /*  5 | 5 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k5k, k5l, k5m, ___, ___, ___ }, \
    /*  6 | 6 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k6l, ___ }, \
    /*  7 | 7 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k7k, k7l, k7m }, \
    /*  8 | 8 */ { ___, ___, ___, ___, ___, k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h, k8i, k8j, ___, ___, ___, ___, ___, ___ }, \
    /*  9 | 9 */ { ___, ___, ___, ___, ___, k95, k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h, ___, k9j, ___, ___, ___, ___, ___, ___ }, \
    /* 10 | a */ { ___, ___, ___, ___, ___, ka5, ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag, ___, kai, ___, ___, ___, ___, ___, ___, ___ }, \
    /* 11 | b */ { ___, ___, ___, ___, ___, kb5, ___, kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg, ___, kbi, kbj, ___, ___, ___, ___, ___, ___ }, \
    /* 12 | c */ { ___, ___, ___, ___, ___, kc5, kc6, kc7, kc8, kc9, ___, ___, ___, kcd, kce, kcf, kcg, ___, kch, kci, ___, ___, ___, ___, ___, ___ }, \
    /* 13 | c */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
}

#define LAYOUT_all( \
    k00,  k01, k02, k03, k04,  k10, k11, k12, k13,  k20, k21, k22, k23,  k24,   k3k, k3l, k3m, \
    k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h, k8i, k8j,  k4k, k4l, k4m, \
    k95,   k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h,   k9j,   k5k, k5l, k5m, \
    ka5,    ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag,     kai,                    \
    kb5, kb6, kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg,     kbi, kbj,        k6l,      \
    kc5,  kc6,  kc7,    kc8, kc9,   kcd,        kce,    kcf,  kcg,  kch,  kci,  k7k, k7l, k7m, \
    kc0, kc1 \
) { \
    /*              0    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 */ \
    /*              0    1    2    3    4    5    6    7    8    9    a    b    c    d    e    f    g    h    i    j    k    l    m    n    o    p  */ \
    /*  0 | 0 */ { k00, k01, k02, k03, k04, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  1 | 1 */ { k10, k11, k12, k13, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  2 | 2 */ { k20, k21, k22, k23, k24, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
    /*  3 | 3 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k3k, k3l, k3m, ___, ___, ___ }, \
    /*  4 | 4 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k4k, k4l, k4m, ___, ___, ___ }, \
    /*  5 | 5 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k5k, k5l, k5m, ___, ___, ___ }, \
    /*  6 | 6 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k6l, ___ }, \
    /*  7 | 7 */ { ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, k7k, k7l, k7m }, \
    /*  8 | 8 */ { ___, ___, ___, ___, ___, k85, k86, k87, k88, k89, k8a, k8b, k8c, k8d, k8e, k8f, k8g, k8h, k8i, k8j, ___, ___, ___, ___, ___, ___ }, \
    /*  9 | 9 */ { ___, ___, ___, ___, ___, k95, k96, k97, k98, k99, k9a, k9b, k9c, k9d, k9e, k9f, k9g, k9h, ___, k9j, ___, ___, ___, ___, ___, ___ }, \
    /* 10 | a */ { ___, ___, ___, ___, ___, ka5, ka6, ka7, ka8, ka9, kaa, kab, kac, kad, kae, kaf, kag, ___, kai, ___, ___, ___, ___, ___, ___, ___ }, \
    /* 11 | b */ { ___, ___, ___, ___, ___, kb5, kb6, kb7, kb8, kb9, kba, kbb, kbc, kbd, kbe, kbf, kbg, ___, kbi, kbj, ___, ___, ___, ___, ___, ___ }, \
    /* 12 | c */ { ___, ___, ___, ___, ___, kc5, kc6, kc7, kc8, kc9, ___, ___, ___, kcd, kce, kcf, kcg, ___, kch, kci, ___, ___, ___, ___, ___, ___ }, \
    /* 13 | c */ { kc0, kc1, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___ }, \
}