summaryrefslogtreecommitdiff
path: root/keyboards/handwired/concertina/64key/64key.h
blob: a9e557fc78ce82cae9053e9a9b9b3a4f68d13fad (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
/* Copyright 2020-2021 Viktor Eikman
 *
 * 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"

/*
 * The matrix is constructed for ease of soldering and for density.
 * The nomenclature is <side><cluster>_<column><row>.
 *
 * L: Left hand.
 * R: Right hand.
 * T: Thumb cluster.
 * M: Main cluster.
 *
 * Numbers increase going to the right and away from the user on the
 * right-hand side of the keyboard, looking directly at each of the two
 * key clusters (main and thumb), one by one.
 * This coordinate system is mirrored for the left-hand side.
 */

#define LAYOUT_64key( \
                  LT_32, LT_22, LT_12,                 RT_12, RT_22, RT_32,               \
                  LT_31, LT_21, LT_11, LT_01,   RT_01, RT_11, RT_21, RT_31,               \
                         LT_20, LT_10, LT_00,   RT_00, RT_10, RT_20,                      \
                                                                                          \
                  LM_34, LM_24, LM_14, LM_04,   RM_04, RM_14, RM_24, RM_34,               \
    LM_53, LM_43, LM_33, LM_23, LM_13, LM_03,   RM_03, RM_13, RM_23, RM_33, RM_43, RM_53, \
    LM_52, LM_42, LM_32, LM_22, LM_12, LM_02,   RM_02, RM_12, RM_22, RM_32, RM_42, RM_52, \
    LM_51, LM_41, LM_31, LM_21, LM_11,                 RM_11, RM_21, RM_31, RM_41, RM_51, \
                         LM_20,                               RM_20                       \
  ) \
  { \
    { LT_00, LT_10, LT_20, LT_31, LM_20, LM_31, LM_41, LM_51 }, \
    { LT_01, LT_11, LT_21, LM_11, LM_21, LM_32, LM_42, LM_52 }, \
    { LT_12, LT_22, LT_32, LM_12, LM_22, LM_33, LM_43, LM_53 }, \
    { LM_02, LM_03, LM_04, LM_13, LM_23, LM_14, LM_24, LM_34 }, \
    { RT_00, RT_10, RT_20, RT_31, RM_20, RM_31, RM_41, RM_51 }, \
    { RT_01, RT_11, RT_21, RM_11, RM_21, RM_32, RM_42, RM_52 }, \
    { RT_12, RT_22, RT_32, RM_12, RM_22, RM_33, RM_43, RM_53 }, \
    { RM_02, RM_03, RM_04, RM_13, RM_23, RM_14, RM_24, RM_34 }, \
  }