]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
alps64: Fix keymap(plain and editor)
authortmk <hasu@tmk-kbd.com>
Fri, 11 Mar 2016 22:49:06 +0000 (07:49 +0900)
committertmk <hasu@tmk-kbd.com>
Fri, 11 Mar 2016 22:49:06 +0000 (07:49 +0900)
keyboard/alps64/Makefile.keymap_editor
keyboard/alps64/keymap_editor.c [new file with mode: 0644]
keyboard/alps64/keymap_plain.c

index d7ad0cc4f8a774e1f78deb9298854e08ebd417ff..08293d5d08f6eba3547084b4dc26aef5a5e677ac 100644 (file)
@@ -1,4 +1,5 @@
 # build firmware for keymap editor
 #
 KEYMAP_SECTION_ENABLE = yes    # fixed address keymap for keymap editor
+KEYMAP = editor
 include Makefile
diff --git a/keyboard/alps64/keymap_editor.c b/keyboard/alps64/keymap_editor.c
new file mode 100644 (file)
index 0000000..68c629f
--- /dev/null
@@ -0,0 +1,66 @@
+#include "keymap_common.h"
+
+#ifdef KEYMAP_SECTION_ENABLE
+const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
+#else
+const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
+#endif
+    /* 0: qwerty
+     * ,-----------------------------------------------------------.
+     * |`  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  #|Bsp|
+     * |-----------------------------------------------------------|
+     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  |
+     * |-----------------------------------------------------------|
+     * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Enter   |
+     * |-----------------------------------------------------------|
+     * |Shft|  \|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift |Esc|
+     * |-----------------------------------------------------------'
+     * |Ctrl|Gui |Alt |         Space         |App |Alt |Gui |Ctrl |
+     * `-----------------------------------------------------------'
+     */
+    KEYMAP( \
+        GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NUHS, BSPC, \
+        TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
+        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT,  \
+        LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,ESC, \
+        LCTL,LGUI,LALT,          SPC,                     APP, RALT,RGUI,RCTL),
+};
+
+#ifdef KEYMAP_SECTION_ENABLE
+const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
+#else
+const uint16_t fn_actions[] PROGMEM = {
+#endif
+    [0]  = ACTION_LAYER_MOMENTARY(1),
+    [1]  = ACTION_LAYER_MOMENTARY(2),
+    [2]  = ACTION_LAYER_MOMENTARY(3),
+    [3]  = ACTION_LAYER_MOMENTARY(4),
+    [4]  = ACTION_LAYER_MOMENTARY(5),
+    [5]  = ACTION_LAYER_MOMENTARY(6),
+    [6]  = ACTION_LAYER_MOMENTARY(7),
+    [7]  = ACTION_LAYER_TOGGLE(1),
+    [8]  = ACTION_LAYER_TOGGLE(2),
+    [9]  = ACTION_LAYER_TOGGLE(3),
+    [10] = ACTION_LAYER_TAP_TOGGLE(1),
+    [11] = ACTION_LAYER_TAP_TOGGLE(2),
+    [12] = ACTION_LAYER_TAP_TOGGLE(3),
+    [13] = ACTION_LAYER_TAP_KEY(1, KC_BSLASH),
+    [14] = ACTION_LAYER_TAP_KEY(2, KC_TAB),
+    [15] = ACTION_LAYER_TAP_KEY(3, KC_ENTER),
+    [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE),
+    [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON),
+    [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE),
+    [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH),
+    [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE),
+    [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE),
+    [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE),
+    [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER),
+    [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
+    [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE),
+    [26] = ACTION_MODS_ONESHOT(MOD_LCTL),
+    [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),
+    [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE),
+    [29] = ACTION_MODS_ONESHOT(MOD_LSFT),
+    [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE),
+    [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSLASH),
+};
index d6ff119fafd28bacc94c3c8e107eded69718d697..11a43d5901edd83eb74e52d60f7de02aca94ba92 100644 (file)
@@ -1,10 +1,6 @@
 #include "keymap_common.h"
 
-#ifdef KEYMAP_SECTION_ENABLE
-const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
-#else
 const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
-#endif
     /* 0: qwerty
      * ,-----------------------------------------------------------.
      * |`  |  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  #|Bsp|
@@ -18,48 +14,20 @@ const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
      * |Ctrl|Gui |Alt |         Space         |App |Alt |Gui |Ctrl |
      * `-----------------------------------------------------------'
      */
-    KEYMAP( \
+    [0] = KEYMAP( \
         GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NUHS, BSPC, \
         TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS, \
-        CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT,  \
-        LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,ESC, \
-        LCTL,LGUI,LALT,          SPC,                     APP, RALT,RGUI,RCTL),
+        LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT,  \
+        LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,FN0, \
+        LCTL,LGUI,LALT,          SPC,                     APP, RALT,RGUI,FN0),
+    [1] = KEYMAP( \
+        ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
+        CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS,BSPC, \
+        TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,PENT, \
+        TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS, \
+        TRNS,TRNS,TRNS,          TRNS,                    TRNS,TRNS,TRNS,TRNS),
 };
-#ifdef KEYMAP_SECTION_ENABLE
-const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
+
+const uint16_t fn_actions[] PROGMEM = {
     [0]  = ACTION_LAYER_MOMENTARY(1),
-    [1]  = ACTION_LAYER_MOMENTARY(2),
-    [2]  = ACTION_LAYER_MOMENTARY(3),
-    [3]  = ACTION_LAYER_MOMENTARY(4),
-    [4]  = ACTION_LAYER_MOMENTARY(5),
-    [5]  = ACTION_LAYER_MOMENTARY(6),
-    [6]  = ACTION_LAYER_MOMENTARY(7),
-    [7]  = ACTION_LAYER_TOGGLE(1),
-    [8]  = ACTION_LAYER_TOGGLE(2),
-    [9]  = ACTION_LAYER_TOGGLE(3),
-    [10] = ACTION_LAYER_TAP_TOGGLE(1),
-    [11] = ACTION_LAYER_TAP_TOGGLE(2),
-    [12] = ACTION_LAYER_TAP_TOGGLE(3),
-    [13] = ACTION_LAYER_TAP_KEY(1, KC_BSLASH),
-    [14] = ACTION_LAYER_TAP_KEY(2, KC_TAB),
-    [15] = ACTION_LAYER_TAP_KEY(3, KC_ENTER),
-    [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE),
-    [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON),
-    [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE),
-    [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH),
-    [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE),
-    [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE),
-    [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE),
-    [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER),
-    [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC),
-    [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE),
-    [26] = ACTION_MODS_ONESHOT(MOD_LCTL),
-    [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),
-    [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE),
-    [29] = ACTION_MODS_ONESHOT(MOD_LSFT),
-    [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRAVE),
-    [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSLASH),
 };
-#else
-const uint16_t fn_actions[] PROGMEM = {};
-#endif