]> git.donarmstrong.com Git - qmk_firmware.git/blob - keyboards/infinity_ergodox/keymaps/default/keymap.c
c33fb7b92600df7cd0a333268a74b3458adeb2e1
[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 const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
22     KEYMAP(  // layer 0 : default
23         // left hand
24         EQL, 1,   2,   3,   4,   5,   ESC,
25         BSLS,Q,   W,   E,   R,   T,   FN1,
26         TAB, A,   S,   D,   F,   G,
27         LSFT,Z,   X,   C,   V,   B,   FN0,
28         LGUI,GRV, BSLS,LEFT,RGHT,
29                                       LCTL,LALT,
30                                            HOME,
31                                  BSPC,DEL, END,
32         // right hand
33              FN2, 6,   7,   8,   9,   0,   MINS,
34              LBRC,Y,   U,   I,   O,   P,   RBRC,
35                   H,   J,   K,   L,   SCLN,QUOT,
36              FN0, N,   M,   COMM,DOT, SLSH,RSFT,
37                        LEFT,DOWN,UP,  RGHT,RGUI,
38         RALT,RCTL,
39         PGUP,
40         PGDN,ENT, SPC
41     ),
42
43     KEYMAP(  // layer 1 : function and symbol keys
44         // left hand
45         TRNS,F1,  F2,  F3,  F4,  F5,  F11,
46         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN3,
47         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
48         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
49         TRNS,TRNS,TRNS,TRNS,TRNS,
50                                       TRNS,TRNS,
51                                            TRNS,
52                                  TRNS,TRNS,TRNS,
53         // right hand
54              F12, F6,  F7,  F8,  F9,  F10, TRNS,
55              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
56                   TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
57              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
58                        TRNS,TRNS,TRNS,TRNS,TRNS,
59         TRNS,TRNS,
60         TRNS,
61         TRNS,TRNS,TRNS
62     ),
63
64     KEYMAP(  // layer 2 : keyboard functions
65         // left hand
66         BTLD,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
67         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN3,
68         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
69         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
70         TRNS,TRNS,TRNS,TRNS,TRNS,
71                                       TRNS,TRNS,
72                                            TRNS,
73                                  TRNS,TRNS,TRNS,
74         // right hand
75              TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
76              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
77                   TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
78              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
79                        TRNS,TRNS,TRNS,TRNS,TRNS,
80         TRNS,TRNS,
81         TRNS,
82         TRNS,TRNS,TRNS
83     ),
84
85     KEYMAP(  // layer 3: numpad
86         // left hand
87         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
88         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
89         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
90         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
91         TRNS,TRNS,TRNS,TRNS,TRNS,
92                                       TRNS,TRNS,
93                                            TRNS,
94                                  TRNS,TRNS,TRNS,
95         // right hand
96              TRNS,NLCK,PSLS,PAST,PAST,PMNS,BSPC,
97              TRNS,NO,  P7,  P8,  P9,  PMNS,BSPC,
98                   NO,  P4,  P5,  P6,  PPLS,PENT,
99              TRNS,NO,  P1,  P2,  P3,  PPLS,PENT,
100                        P0,  PDOT,SLSH,PENT,PENT,
101         TRNS,TRNS,
102         TRNS,
103         TRNS,TRNS,TRNS
104     ),
105 };
106 const uint16_t fn_actions[] = {
107     ACTION_LAYER_MOMENTARY(1),                      // FN0 - switch to Layer1
108     ACTION_LAYER_SET(2, ON_PRESS),                  // FN1 - set Layer2
109     ACTION_LAYER_TOGGLE(3),                         // FN2 - toggle Layer3 aka Numpad layer
110     ACTION_LAYER_SET(0, ON_PRESS),                  // FN3 - set Layer0
111 };