]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/infinity_ergodox/keymaps/default/keymap.c
f1e6b1c8ae42cfcde009389d58de23cb69e9515d
[qmk_firmware.git] / keyboards / infinity_ergodox / keymaps / default / keymap.c
1 /*
2 Copyright 2016 Fred Sundvik <fsundvik@gmail.com>
3 Jun Wako <wakojun@gmail.com>
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program.  If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 #include "infinity_ergodox.h"
20
21 // Workaround for old keymap format
22 #define KC_RESET RESET
23
24 const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25     KEYMAP(  // layer 0 : default
26         // left hand
27         EQL, 1,   2,   3,   4,   5,   ESC,
28         BSLS,Q,   W,   E,   R,   T,   FN1,
29         TAB, A,   S,   D,   F,   G,
30         LSFT,Z,   X,   C,   V,   B,   FN0,
31         LGUI,GRV, BSLS,LEFT,RGHT,
32                                       LCTL,LALT,
33                                            HOME,
34                                  BSPC,DEL, END,
35         // right hand
36              FN2, 6,   7,   8,   9,   0,   MINS,
37              LBRC,Y,   U,   I,   O,   P,   RBRC,
38                   H,   J,   K,   L,   SCLN,QUOT,
39              FN0, N,   M,   COMM,DOT, SLSH,RSFT,
40                        LEFT,DOWN,UP,  RGHT,RGUI,
41         RALT,RCTL,
42         PGUP,
43         PGDN,ENT, SPC
44     ),
45
46     KEYMAP(  // layer 1 : function and symbol keys
47         // left hand
48         TRNS,F1,  F2,  F3,  F4,  F5,  F11,
49         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN3,
50         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
51         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
52         TRNS,TRNS,TRNS,TRNS,TRNS,
53                                       TRNS,TRNS,
54                                            TRNS,
55                                  TRNS,TRNS,TRNS,
56         // right hand
57              F12, F6,  F7,  F8,  F9,  F10, TRNS,
58              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
59                   TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
60              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
61                        TRNS,TRNS,TRNS,TRNS,TRNS,
62         TRNS,TRNS,
63         TRNS,
64         TRNS,TRNS,TRNS
65     ),
66
67     KEYMAP(  // layer 2 : keyboard functions
68         // left hand
69         RESET,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
70         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN3,
71         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
72         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
73         TRNS,TRNS,TRNS,TRNS,TRNS,
74                                       TRNS,TRNS,
75                                            TRNS,
76                                  TRNS,TRNS,TRNS,
77         // right hand
78              TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
79              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
80                   TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
81              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
82                        TRNS,TRNS,TRNS,TRNS,TRNS,
83         TRNS,TRNS,
84         TRNS,
85         TRNS,TRNS,TRNS
86     ),
87
88     KEYMAP(  // layer 3: numpad
89         // left hand
90         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
91         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
92         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
93         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
94         TRNS,TRNS,TRNS,TRNS,TRNS,
95                                       TRNS,TRNS,
96                                            TRNS,
97                                  TRNS,TRNS,TRNS,
98         // right hand
99              TRNS,NLCK,PSLS,PAST,PAST,PMNS,BSPC,
100              TRNS,NO,  P7,  P8,  P9,  PMNS,BSPC,
101                   NO,  P4,  P5,  P6,  PPLS,PENT,
102              TRNS,NO,  P1,  P2,  P3,  PPLS,PENT,
103                        P0,  PDOT,SLSH,PENT,PENT,
104         TRNS,TRNS,
105         TRNS,
106         TRNS,TRNS,TRNS
107     ),
108 };
109 const uint16_t fn_actions[] = {
110     ACTION_LAYER_MOMENTARY(1),                      // FN0 - switch to Layer1
111     ACTION_LAYER_SET(2, ON_PRESS),                  // FN1 - set Layer2
112     ACTION_LAYER_TOGGLE(3),                         // FN2 - toggle Layer3 aka Numpad layer
113     ACTION_LAYER_SET(0, ON_PRESS),                  // FN3 - set Layer0
114 };