]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - keyboard/ergodox/keymap_xyverz.h
f515c6868887b96141797de897e1702c1273ad69
[max/tmk_keyboard.git] / keyboard / ergodox / keymap_xyverz.h
1 static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
2     /*
3      * Keymap: Default Layer in Dvorak (Layer 0)
4      *
5      * ,--------------------------------------------------.           ,--------------------------------------------------.
6      * |   +    |   1  |   2  |   3  |   4  |   5  |  Esc |           |  ESC |   6  |   7  |   8  |   9  |   0  |   -    |
7      * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
8      * | Tab    |   '  |   ,  |   .  |   Y  |   Y  |(Null)|           |(Null)|   F  |   G  |   C  |   R  |   L  |   /    |
9      * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
10      * | CapsLk |   A  |   O  |   E  |   U  |   I  |------|           |------|   D  |   H  |   T  |   N  |   S  |   \    |
11      * |--------+------+------+------+------+------| FN1  |           | FN2  |------+------+------+------+------+--------|
12      * | LShift |   Z  |   X  |   C  |   V  |   X  |      |           |      |   B  |   M  |   W  |   V  |   Z  | RShift |
13      * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
14      *   | LGUI |   `  |  INS | Left | Rght |                                       |  Up  |  Dn  |   [  |   ]  | RGUI |
15      *   `----------------------------------'                                       `----------------------------------'
16      *                                        ,-------------.       ,-------------.
17      *                                        | LCtr | LAlt |       | Ralt | RCtr |
18      *                                 ,------|------|------|       |------+------+------.
19      *                                 |      |      | Home |       | PgUp |      |      |
20      *                                 | BkSp | Del  |------|       |------| Enter| Space|
21      *                                 |      |      | End  |       | PgDn |      |      |
22      *                                 `--------------------'       `--------------------'
23      *
24      *
25      *****************************************************************************************************
26      * This Dvorak keyboard layout stems from my early Kinesis years, using the Contour PS/2 with a Dvorak
27      * software layout. Because of this, the RBRC and LBRC were on opposite sides of the board in the cor-
28      * ner keys. I've decided to continue using this layout with my ErgoDox.
29      */
30
31     KEYMAP(  // layer 0 : default
32         // left hand
33         EQL,    1,    2,   3,   4,   5,   ESC,
34         TAB, QUOT, COMM, DOT,   P,   Y,    NO,
35         CAPS,   A,    O,   E,   U,   I,
36         LSFT, SCLN,   Q,   J,   K,   X,   FN1,
37         LGUI,  GRV, INS,LEFT,RGHT,
38                                       LCTL,LALT,
39                                            HOME,
40                                  BSPC,DEL, END,
41         // right hand
42              ESC,  6,   7,   8,   9,   0,  MINS,
43              NO,   F,   G,   C,   R,   L,  SLSH,
44                    D,   H,   T,   N,   S,  BSLS,
45              FN2,  B,   M,   W,   V,   Z,  RSFT,
46                         UP,DOWN,RBRC,LBRC,  RGUI,
47         RALT,RCTL,
48         PGUP,
49         PGDN,ENT, SPC
50     ),
51
52
53     /* 
54      * Keymap: Function and Media Keys Layer (Layer 1)
55      * 
56      * ,--------------------------------------------------.           ,--------------------------------------------------.
57      * | TEENSY |  F1  |  F2  |  F3  |  F4  |  F5  | F11  |           |  F12 |  F6  |  F7  |  F8  |  F9  |  F10 |  Mute  |
58      * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
59      * |        |      |      |      |      |      | FN4  |           |  FN6 |      | PrSc | ScLk | Paus |      | Vol Up |
60      * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
61      * |        |      |      |      |      |      |------|           |------| Stop | Prev | Play | Next | Sel  | Vol Dn |
62      * |--------+------+------+------+------+------| FN4  |           |  FN7 |------+------+------+------+------+--------|
63      * |        |      |      |      |      |      |      |           |      |      |      |      |      |      |        |
64      * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
65      *   |      |      |      |      |      |                                       |      |      |      |      |      |
66      *   `----------------------------------'                                       `----------------------------------'
67      *                                        ,-------------.       ,-------------.
68      *                                        |      |      |       |      |      |
69      *                                 ,------|------|------|       |------+------+------.
70      *                                 |      |      |      |       |      |      |      |
71      *                                 |      |      |------|       |------|      |      |
72      *                                 |      |      |      |       |      |      |      |
73      *                                 `--------------------'       `--------------------'
74      * 
75      * 
76      */
77
78     KEYMAP(  // layer 1 : function and media keys
79         // left hand
80         FN0, F1,  F2,  F3,  F4,  F5,  F11,
81         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4,
82         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
83         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN4,
84         TRNS,TRNS,TRNS,TRNS,TRNS,
85                                       TRNS,TRNS,
86                                            TRNS,
87                                  TRNS,TRNS,TRNS,
88         // right hand
89              F12, F6,  F7,  F8,  F9,  F10, MUTE,
90              FN6, TRNS,PSCR,SLCK,PAUS,TRNS,VOLU,
91                   MSTP,MPRV,MPLY,MNXT,MSEL,VOLD,
92              FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
93                        TRNS,TRNS,TRNS,TRNS,TRNS,
94         TRNS,TRNS,
95         TRNS,
96         TRNS,TRNS,TRNS
97     ),
98
99
100     /* 
101      * Keymap: Numpad Layer (Layer 2)
102      * 
103      * ,--------------------------------------------------.           ,--------------------------------------------------.
104      * | Power  |      |      |      |      |      |      |           |      |      | NmLk | KP / | KP * | KP - |        |
105      * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
106      * | Sleep  |      |      |      |      |      | FN5  |           |  FN4 |      | KP 7 | KP 8 | KP 9 | KP + |        |
107      * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
108      * | Wake   |      |      |      |      |      |------|           |------|      | KP 4 | KP 5 | KP 6 | KP + |        |
109      * |--------+------+------+------+------+------| FN7  |           |  FN4 |------+------+------+------+------+--------|
110      * |        |      |      |      |      |      |      |           |      |      | KP 1 | KP 2 | KP 3 |KP Ent|        |
111      * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
112      *   |      |      |      |      |      |                                       | KP 0 |      | KP . |KP Ent|      |
113      *   `----------------------------------'                                       `----------------------------------'
114      *                                        ,-------------.       ,-------------.
115      *                                        |      |      |       |      |      |
116      *                                 ,------|------|------|       |------+------+------.
117      *                                 |      |      |      |       |      |      |      |
118      *                                 |      |      |------|       |------|      |      |
119      *                                 |      |      |      |       |      |      |      |
120      *                                 `--------------------'       `--------------------'
121      * 
122      */
123
124     KEYMAP(  // layer 2: numpad
125         // left hand
126         PWR, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
127         SLEP,TRNS,TRNS,TRNS,TRNS,TRNS, FN5,
128         WAKE,TRNS,TRNS,TRNS,TRNS,TRNS,
129         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN7,
130         TRNS,TRNS,TRNS,TRNS,TRNS,
131                                       TRNS,TRNS,
132                                            TRNS,
133                                  TRNS,TRNS,TRNS,
134         // right hand
135              TRNS,TRNS,NLCK,PSLS,PAST,PMNS,TRNS,
136               FN4,NO,  P7,  P8,  P9,  PPLS,TRNS,
137                   NO,  P4,  P5,  P6,  PPLS,TRNS,
138               FN4,NO,  P1,  P2,  P3,  PENT,TRNS,
139                        P0,  TRNS,PDOT,PENT,TRNS,
140         TRNS,TRNS,
141         TRNS,
142         TRNS,TRNS,TRNS
143     ),
144
145
146     /* 
147      * Keymap: QWERTY Gaming Layer (Layer 3)
148      * 
149      * ,--------------------------------------------------.           ,--------------------------------------------------.
150      * |   =    |   1  |   2  |   3  |   4  |   5  | ESC  |           | ESC  |   6  |   7  |   8  |   9  |   0  |   -    |
151      * |--------+------+------+------+------+-------------|           |------+------+------+------+------+------+--------|
152      * | Tab    |   Q  |   W  |   E  |   R  |   T  | Fn4  |           | Fn4  |   Y  |   U  |   I  |   O  |   P  |   [    |
153      * |--------+------+------+------+------+------|      |           |      |------+------+------+------+------+--------|
154      * | CapsLk |   A  |   S  |   D  |   F  |   G  |------|           |------|   H  |   J  |   K  |   L  |   ;  |   '    |
155      * |--------+------+------+------+------+------| Fn1  |           | Fn2  |------+------+------+------+------+--------|
156      * | LShift |   Z  |   X  |   C  |   V  |   B  |      |           |      |   N  |   M  |   ,  |   .  |   /  | RShift |
157      * `--------+------+------+------+------+-------------'           `-------------+------+------+------+------+--------'
158      *   | LGUI |   `  |  INS | Left | Rght |                                       |  Up  |  Dn  |   [  |   ]  | RGUI |
159      *   `----------------------------------'                                       `----------------------------------'
160      *                                        ,-------------.       ,-------------.
161      *                                        | LCtr | LAlt |       | Ralt | RCtr |
162      *                                 ,------|------|------|       |------+------+------.
163      *                                 |      |      | Home |       | PgUp |      |      |
164      *                                 | BkSp | Del  |------|       |------| Enter| Space|
165      *                                 |      |      | End  |       | PgDn |      |      |
166      *                                 `--------------------'       `--------------------'
167      * 
168      */
169
170     KEYMAP(  // layer 3 : QWERTY Gaming
171         // left hand
172         EQL, 1,   2,   3,   4,   5,   ESC,
173         TAB, Q,   W,   E,   R,   T,   FN4,
174         CAPS,A,   S,   D,   F,   G,
175         LSFT,Z,   X,   C,   V,   B,   FN1,
176         LGUI,GRV, INS,LEFT,RGHT,
177                                       LCTL,LALT,
178                                            HOME,
179                                  BSPC,DEL, END,
180         // right hand
181              ESC, 6,   7,   8,   9,   0,   MINS,
182              FN4, Y,   U,   I,   O,   P,   BSLS,
183                   H,   J,   K,   L,   SCLN,QUOT,
184              FN2, N,   M,   COMM,DOT, SLSH,RSFT,
185                        UP,DOWN,LBRC,RBRC,RGUI,
186         RALT,RCTL,
187         PGUP,
188         PGDN,ENT, SPC
189     ),
190
191 };
192
193 /* id for user defined functions & macros */
194 enum function_id {
195     TEENSY_KEY,
196 };
197
198 /*
199  * Fn action definition
200  */
201 static const uint16_t PROGMEM fn_actions[] = {
202     ACTION_FUNCTION(TEENSY_KEY),                    // FN0 - Teensy key
203     ACTION_LAYER_MOMENTARY(1),                      // FN1 - switch to Layer1
204     ACTION_LAYER_MOMENTARY(2),                      // FN2 - switch to Layer2
205     ACTION_LAYER_MOMENTARY(3),                      // FN3 - switch to Layer3
206     ACTION_LAYER_SET_CLEAR(0),                      // FN4 - set Layer0
207     ACTION_LAYER_SET(1, ON_PRESS),                  // FN5 - set Layer1
208     ACTION_LAYER_SET(2, ON_PRESS),                  // FN6 - set Layer2
209     ACTION_LAYER_SET(3, ON_PRESS),                  // FN7 - set Layer3
210 };
211
212 /*
213  * Defining the Teensy Key action_function
214  */
215 void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
216 {
217     // print("action_function called\n");
218     // print("id  = "); phex(id); print("\n");
219     // print("opt = "); phex(opt); print("\n");
220
221     if (id == TEENSY_KEY) {
222         clear_keyboard();
223         print("\n\nJump to bootloader... ");
224         _delay_ms(50);
225         bootloader_jump(); // should not return
226         print("not supported.\n");
227     }
228
229 }