]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/usb_usb/keymap_editor.c
Merge pull request #230 from jerryen/master
[max/tmk_keyboard.git] / converter / usb_usb / keymap_editor.c
1 /*
2 Copyright 2016 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
18 #include "keymap_common.h"
19
20
21 #ifndef KEYMAP_SECTION_ENABLE
22     #error "KEYMAP_SECTION_ENABLE is not defined."
23 #endif
24
25 const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
26     /* 0: plain Qwerty without layer switching
27      *         ,---------------. ,---------------. ,---------------.
28      *         |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24|
29      * ,---.   |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------.
30      * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help  |
31      * `---'   `---------------' `---------------' `---------------' `-----------' `---------------' `-------'
32      * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------.
33      * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|JPY|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -| |Stp|Agn|
34      * |-----------------------------------------------------------| |-----------| |---------------| |-------|
35      * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  +| |Mnu|Und|
36      * |-----------------------------------------------------------| `-----------' |---------------| |-------|
37      * |CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  :|  #|Retn|               |  4|  5|  6|KP,| |Sel|Cpy|
38      * |-----------------------------------------------------------|     ,---.     |---------------| |-------|
39      * |Shft|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /| RO|Shift |     |Up |     |  1|  2|  3|KP=| |Exe|Pst|
40      * |-----------------------------------------------------------| ,-----------. |---------------| |-------|
41      * |Ctl|Gui|Alt|MHEN|HNJ| Space  |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| |  0    |  .|Ent| |Fnd|Cut|
42      * `-----------------------------------------------------------' `-----------' `---------------' `-------'
43      */
44     KEYMAP_ALL(
45               F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
46     ESC,      F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,    VOLD,VOLU,MUTE,PWR,     HELP,
47     GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, JYEN,BSPC,     INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,    STOP,AGIN,
48     TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     BSLS,     DEL, END, PGDN,    P7,  P8,  P9,  PPLS,    MENU,UNDO,
49     CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     NUHS,ENT,                         P4,  P5,  P6,  PCMM,    SLCT,COPY,
50     LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RO,  RSFT,          UP,           P1,  P2,  P3,  PEQL,    EXEC,PSTE,
51     LCTL,LGUI,LALT,MHEN,HANJ,     SPC,      HAEN,HENK,KANA,RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT,    FIND,CUT
52     ),
53 };
54
55 const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
56     [0]  = ACTION_LAYER_MOMENTARY(1),
57     [1]  = ACTION_LAYER_MOMENTARY(2),
58     [2]  = ACTION_LAYER_MOMENTARY(3),
59     [3]  = ACTION_LAYER_MOMENTARY(4),
60     [4]  = ACTION_LAYER_MOMENTARY(5),
61     [5]  = ACTION_LAYER_MOMENTARY(6),
62     [6]  = ACTION_LAYER_MOMENTARY(7),
63     [7]  = ACTION_LAYER_TOGGLE(1),
64     [8]  = ACTION_LAYER_TOGGLE(2),
65     [9]  = ACTION_LAYER_TOGGLE(3),
66     [10] = ACTION_LAYER_TAP_TOGGLE(1),
67     [11] = ACTION_LAYER_TAP_TOGGLE(2),
68     [12] = ACTION_LAYER_TAP_TOGGLE(3),
69     [13] = ACTION_LAYER_TAP_KEY(1, KC_BSLASH),
70     [14] = ACTION_LAYER_TAP_KEY(2, KC_TAB),
71     [15] = ACTION_LAYER_TAP_KEY(3, KC_ENTER),
72     [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE),
73     [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON),
74     [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE),
75     [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH),
76     [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE),
77     [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE),
78     [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE),
79     [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER),
80     [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
81     [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE),
82     [26] = ACTION_MODS_ONESHOT(MOD_LCTL),
83     [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),
84     [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE),
85     [29] = ACTION_MODS_ONESHOT(MOD_LSFT),
86     [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE),
87     [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSLASH),
88 };