summaryrefslogtreecommitdiff
path: root/users/ericgebhart/keymap/keymap.c
blob: bee8538e262ef55dab3f0ead2022560b710a1149 (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
136
137
138
139
140
141
142
/*
  Copyright 2022 Eric Gebhart <e.a.gebhart@gmail.com>

  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/>.
*/

/* This is my keymap. Enable the layers you want in config.h. */

#include QMK_KEYBOARD_H
#include "ericgebhart.h"
#include "layouts.h"

#include "keyboards.h"

// set up the wrapper macros.
#define BASE_LAYER(NAME, ...)  [NAME] = BASE(__VA_ARGS__)
#define BASE_LAYERt6(NAME, ...)  [NAME] = BASEt6(__VA_ARGS__)
#define T_LAYER(LNAME, ...)  [LNAME] = TRANS(__VA_ARGS__)


// One that takes 5 and one that takes 6 for bepo and other big maps
// that need 3x12 instead of 3x10.
#ifdef BASE_NUMBER_ROW
#define B_LAYER(LNAME, NUMS, LAYOUT) BASE_LAYER(LNAME, NUMS, LAYOUT)
#define B_LAYERt6(LNAME, NUMS, LAYOUT) BASE_LAYERt6(LNAME, NUMS, LAYOUT)
#else
// if there is no number row, don't give it one.
#define B_LAYER(LNAME, NUMS, LAYOUT) BASE_LAYER(LNAME, LAYOUT)
#define B_LAYERt6(LNAME, NUMS, LAYOUT) BASE_LAYERt6(LNAME, LAYOUT)
#endif

// Find alt local key definitions.
// DV for dvorak/qwerty maps on bepo.
// BK, BKW for beakl maps on en-qwerty and bepo.
// BKW is automatic in map_beakl.h
#define ALT_TARGET_IS NONE // NONE, DV=dvorak, BK=Beakl, BK2, BKW=Beaklwi.


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

  // Default lang, Base layers
#include "map_dvorak.h"
#include "map_maks.h"
#include "map_qwerty.h"
#include "map_beakl.h"
#include "map_alt.h"
#include "map_gap.h"
#include "map_carpalx.h"
#include "map_hd.h"
#include "map_bepo.h"

  // create a set of layers for a second locale.
#ifdef SECOND_LOCALE
#undef LANG_IS
#define LANG_IS SECOND_LOCALE

  // changes alt target for us, because both en-qwerty and fr-bepo
  // need a beakl alt target.
#include "map_beakl.h"

  // Qwerty based layers. Need a DV alt target to get the right shifted keys.
#undef ALT_TARGET_IS
#define ALT_TARGET_IS DV // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.

#include "map_dvorak.h"
#include "map_maks.h"
#include "map_qwerty.h"
#include "map_alt.h"
#include "map_gap.h"
#include "map_carpalx.h"
#include "map_hd.h"

#undef ALT_TARGET_IS
#define ALT_TARGET_IS NONE // NONE, DV = dvorak, BK=Beakl, BKW=Beaklwi.

#include "map_bepo.h"

#undef LANG_IS
#define LANG_IS DEFAULT_LANG
#endif // bepo


// SYMBOL LAYER
#include "map_symbols.h"

#ifdef SECOND_LOCALE
#undef LANG_IS
#define LANG_IS SECOND_LOCALE

#include "map_symbols.h"

#undef LANG_IS
#define LANG_IS DEFAULT_LANG
#endif


  // KEYPAD LAYER
#include "map_keypads.h"

#ifdef SECOND_LOCALE
#undef LANG_IS
#define LANG_IS SECOND_LOCALE

#include "map_keypads.h"

#undef LANG_IS
#define LANG_IS DEFAULT_LANG
#endif


// TOPROWS LAYER
#include "map_toprows.h"

#include "map_accented.h"

#ifdef SECOND_LOCALE
#undef LANG_IS
#define LANG_IS SECOND_LOCALE

#include "map_toprows.h"

#include "map_accented.h"

#undef LANG_IS
#define LANG_IS EN
#endif

// functional non language based layers.
#include "map_funcs.h"

};