]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/m0110_usb/keymap.c
pc98_usb: Change LUFA build option for #627
[max/tmk_keyboard.git] / converter / m0110_usb / keymap.c
1 /*
2 Copyright 2011,2012,2015 Jun Wako <wakojun@gmail.com>
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17 #include <stdint.h>
18 #include "keycode.h"
19 #include "keymap_common.h"
20
21
22
23 #ifdef KEYMAP_SECTION_ENABLE
24 const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
25 #else
26 const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
27 #endif
28     /* Default:
29      * M0110                                                       M0120
30      * ,---------------------------------------------------------. ,---------------.
31      * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Nlk|  =|  /|  *|
32      * |---------------------------------------------------------| |---------------|
33      * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \| |  7|  8|  9|  -|
34      * |---------------------------------------------------------| |---------------|
35      * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  +|
36      * |---------------------------------------------------------| |---------------|
37      * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift   | |  1|  2|  3|   |
38      * `---------------------------------------------------------' |-----------|Ent|
39      *      |Opt|Mac |         Space               |Fn  |Opt|      |      0|  .|   |
40      *      `-----------------------------------------------'      `---------------'
41      * M0110A
42      * ,---------------------------------------------------------. ,---------------.
43      * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Nlk|  =|  /|  *|
44      * |---------------------------------------------------------| |---------------|
45      * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|   | |  7|  8|  9|  -|
46      * |-----------------------------------------------------'   | |---------------|
47      * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  +|
48      * |---------------------------------------------------------| |---------------|
49      * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shft|Up | |  1|  2|  3|   |
50      * |---------------------------------------------------------| |-----------|Ent|
51      * |Opt  |Mac    |         Space             |  \|Lft|Rgt|Dn | |      0|  .|   |
52      * `---------------------------------------------------------' `---------------'
53      */
54     [0] = KEYMAP(
55     GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,    NLCK,EQL, PSLS,PAST,
56     TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,         P7,  P8,  P9,  PMNS,
57     LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,     P4,  P5,  P6,  PPLS,
58     LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          UP,      P1,  P2,  P3,  PENT,
59     LALT,LGUI,               SPC,                FN0, FN13,LEFT,RGHT,DOWN,    P0,       PDOT
60     ),
61     /* Cursor Layer:
62      * M0110                                                       M0120
63      * ,---------------------------------------------------------. ,---------------.
64      * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|  =|  /|  *|
65      * |---------------------------------------------------------| |---------------|
66      * |Caps |Hom| Up|PgU|   |   |   |   |Psc|Slk|Pau|Up |INS|   | |  7|  8|  9|  -|
67      * |---------------------------------------------------------| |---------------|
68      * |Ctrl  |Lef|Dow|Rig|   |   |   |   |Hom|PgU|Lef|Rig|Return| |  4|  5|  6|  +|
69      * |---------------------------------------------------------| |---------------|
70      * |Shift   |End|   |PgD|   |   |   |   |End|PgD|Dow|Shift   | |  1|  2|  3|   |
71      * `---------------------------------------------------------' |-----------|Ent|
72      *      |Opt|Mac |         Space               |Fn  |Opt|      |      0|  .|   |
73      *      `-----------------------------------------------'      `---------------'
74      * M0110A
75      * ,---------------------------------------------------------. ,---------------.
76      * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|  =|  /|  *|
77      * |---------------------------------------------------------| |---------------|
78      * |Caps |Hom| Up|PgU|   |   |   |   |Psc|Slk|Pau|Up |INS|   | |  7|  8|  9|  -|
79      * |-----------------------------------------------------'   | |---------------|
80      * |Ctrl  |Lef|Dow|Rig|   |   |   |   |Hom|PgU|Lef|Rig|Return| |  4|  5|  6|  +|
81      * |---------------------------------------------------------| |---------------|
82      * |Shift   |End|   |PgD|   |   |   |   |End|PgD|Dow|Shft|PgU| |  1|  2|  3|   |
83      * |---------------------------------------------------------| |-----------|Ent|
84      * |Opt  |Mac    |         Space             |  \|Hom|End|PgD| |      0|  .|   |
85      * `---------------------------------------------------------' `---------------'
86      */
87     [1] = KEYMAP(
88     ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
89     CAPS,HOME,UP,  PGUP,NO,  NO,  NO,  NO,  PSCR,SLCK,PAUS,UP,  INS,          P7,  P8,  P9,  PMNS,
90     LCTL,LEFT,DOWN,RGHT,NO,  NO,  NO,  NO,  HOME,PGUP,LEFT,RGHT,     ENT,     P4,  P5,  P6,  PPLS,
91     LSFT,END, NO,  PGDN,NO,  NO,  NO,  NO,  END, PGDN,DOWN,          PGUP,    P1,  P2,  P3,  PENT,
92     LALT,LGUI,               SPC,                FN0, FN13,HOME,END, PGDN,    P0,       PDOT
93     ),
94 };
95
96
97 /*
98  * Fn action definition
99  */
100 #ifdef KEYMAP_SECTION_ENABLE
101 const action_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
102 #else
103 const action_t fn_actions[] PROGMEM = {
104 #endif
105     [0]  = ACTION_LAYER_MOMENTARY(1),
106     [1]  = ACTION_LAYER_MOMENTARY(2),
107     [2]  = ACTION_LAYER_MOMENTARY(3),
108     [3]  = ACTION_LAYER_MOMENTARY(4),
109     [4]  = ACTION_LAYER_MOMENTARY(5),
110     [5]  = ACTION_LAYER_MOMENTARY(6),
111     [6]  = ACTION_LAYER_MOMENTARY(7),
112     [7]  = ACTION_LAYER_TOGGLE(1),
113     [8]  = ACTION_LAYER_TOGGLE(2),
114     [9]  = ACTION_LAYER_TOGGLE(3),
115     [10] = ACTION_LAYER_TAP_TOGGLE(1),
116     [11] = ACTION_LAYER_TAP_TOGGLE(2),
117     [12] = ACTION_LAYER_TAP_TOGGLE(3),
118     [13] = ACTION_LAYER_TAP_KEY(1, KC_BSLASH),
119     [14] = ACTION_LAYER_TAP_KEY(2, KC_TAB),
120     [15] = ACTION_LAYER_TAP_KEY(3, KC_ENTER),
121     [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE),
122     [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON),
123     [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE),
124     [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH),
125     [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE),
126     [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE),
127     [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE),
128     [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER),
129     [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
130     [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE),
131     [26] = ACTION_MODS_ONESHOT(MOD_LCTL),
132     [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),
133     [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE),
134     [29] = ACTION_MODS_ONESHOT(MOD_LSFT),
135     [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE),
136     [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSLASH),
137 };