]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Fix keymap of hhkb for new actions
authortmk <nobody@nowhere>
Thu, 4 Apr 2013 18:27:10 +0000 (03:27 +0900)
committertmk <nobody@nowhere>
Thu, 4 Apr 2013 18:27:10 +0000 (03:27 +0900)
common/action.h
keyboard/hhkb/keymap.c

index 5f659337f9706fba99b6e9202728fed588b998db..98c4ef81a664c7e3121cf7564e02a364660a06a5 100644 (file)
@@ -25,18 +25,20 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "action_macro.h"
 
 
+/* tapping count and state */
+typedef struct {
+    bool    interrupted :1;
+    bool    reserved2   :1;
+    bool    reserved1   :1;
+    bool    reserved0   :1;
+    uint8_t count       :4;
+} tap_t;
+
 /* Key event container for recording */
 typedef struct {
     keyevent_t  event;
 #ifndef NO_ACTION_TAPPING
-    /* tapping count and state */
-    struct {
-        bool    interrupted :1;
-        bool    reserved2   :1;
-        bool    reserved1   :1;
-        bool    reserved0   :1;
-        uint8_t count       :4;
-    } tap;
+    tap_t tap;
 #endif
 } keyrecord_t;
 
index 094d33af113e010085bad1237ffbcbb626b4f32c..7afbdbec2c072b21432d7bb6ae5e345d3298ddac 100644 (file)
@@ -186,17 +186,14 @@ enum macro_id {
  * Fn action definition
  */
 static const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_DEFAULT_LAYER,                        // Default layer(not used)
-//  [1] = ACTION_KEYMAP(1),                            // HHKB layer
-    [1] = ACTION_KEYMAP_TAP_TOGGLE(1),                 // HHKB layer(toggle with 5 taps)
-    [2] = ACTION_KEYMAP_TAP_KEY(2, KC_SLASH),          // Cursor layer with Slash*
-    [3] = ACTION_KEYMAP_TAP_KEY(3, KC_SCLN),           // Mousekey layer with Semicolon*
-    [4] = ACTION_RMOD_TAP_KEY(KC_RCTL, KC_ENT),        // RControl with tap Enter*
-    [5] = ACTION_LMOD_ONESHOT(KC_LSFT),                // Oneshot Shift*
-//  [6] = ACTION_KEYMAP_TAP_KEY(4, KC_SPC),            // Half-qwerty layer with Space
-    [6] = ACTION_KEYMAP_TAP_KEY(5, KC_SPC),            // Mousekey layer with Space
-//  [7] = ACTION_KEYMAP(3),                            // Mousekey layer
-    [7] = ACTION_KEYMAP_TOGGLE(3),                     // Mousekey layer(toggle)
+    [0] = ACTION_DEFAULT_LAYER_SET(0),                // Default layer(not used)
+    [1] = ACTION_LAYER_TAP_TOGGLE(1),                 // HHKB layer(toggle with 5 taps)
+    [2] = ACTION_LAYER_TAP_KEY(2, KC_SLASH),          // Cursor layer with Slash*
+    [3] = ACTION_LAYER_TAP_KEY(3, KC_SCLN),           // Mousekey layer with Semicolon*
+    [4] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT),      // RControl with tap Enter*
+    [5] = ACTION_MODS_ONESHOT(MOD_LSFT),              // Oneshot Shift*
+    [6] = ACTION_LAYER_TAP_KEY(5, KC_SPC),            // Mousekey layer with Space
+    [7] = ACTION_LAYER_TOGGLE(3),                     // Mousekey layer(toggle)
 
 //  [8] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_BSPC),       // LControl with tap Backspace
 //  [9] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_ESC),        // LControl with tap Esc