diff options
| -rw-r--r-- | common/action.h | 18 | ||||
| -rw-r--r-- | keyboard/hhkb/keymap.c | 19 |
2 files changed, 18 insertions, 19 deletions
diff --git a/common/action.h b/common/action.h index 5f659337f..98c4ef81a 100644 --- a/common/action.h +++ b/common/action.h | |||
| @@ -25,18 +25,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 25 | #include "action_macro.h" | 25 | #include "action_macro.h" |
| 26 | 26 | ||
| 27 | 27 | ||
| 28 | /* tapping count and state */ | ||
| 29 | typedef struct { | ||
| 30 | bool interrupted :1; | ||
| 31 | bool reserved2 :1; | ||
| 32 | bool reserved1 :1; | ||
| 33 | bool reserved0 :1; | ||
| 34 | uint8_t count :4; | ||
| 35 | } tap_t; | ||
| 36 | |||
| 28 | /* Key event container for recording */ | 37 | /* Key event container for recording */ |
| 29 | typedef struct { | 38 | typedef struct { |
| 30 | keyevent_t event; | 39 | keyevent_t event; |
| 31 | #ifndef NO_ACTION_TAPPING | 40 | #ifndef NO_ACTION_TAPPING |
| 32 | /* tapping count and state */ | 41 | tap_t tap; |
| 33 | struct { | ||
| 34 | bool interrupted :1; | ||
| 35 | bool reserved2 :1; | ||
| 36 | bool reserved1 :1; | ||
| 37 | bool reserved0 :1; | ||
| 38 | uint8_t count :4; | ||
| 39 | } tap; | ||
| 40 | #endif | 42 | #endif |
| 41 | } keyrecord_t; | 43 | } keyrecord_t; |
| 42 | 44 | ||
diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c index 094d33af1..7afbdbec2 100644 --- a/keyboard/hhkb/keymap.c +++ b/keyboard/hhkb/keymap.c | |||
| @@ -186,17 +186,14 @@ enum macro_id { | |||
| 186 | * Fn action definition | 186 | * Fn action definition |
| 187 | */ | 187 | */ |
| 188 | static const uint16_t PROGMEM fn_actions[] = { | 188 | static const uint16_t PROGMEM fn_actions[] = { |
| 189 | [0] = ACTION_DEFAULT_LAYER, // Default layer(not used) | 189 | [0] = ACTION_DEFAULT_LAYER_SET(0), // Default layer(not used) |
| 190 | // [1] = ACTION_KEYMAP(1), // HHKB layer | 190 | [1] = ACTION_LAYER_TAP_TOGGLE(1), // HHKB layer(toggle with 5 taps) |
| 191 | [1] = ACTION_KEYMAP_TAP_TOGGLE(1), // HHKB layer(toggle with 5 taps) | 191 | [2] = ACTION_LAYER_TAP_KEY(2, KC_SLASH), // Cursor layer with Slash* |
| 192 | [2] = ACTION_KEYMAP_TAP_KEY(2, KC_SLASH), // Cursor layer with Slash* | 192 | [3] = ACTION_LAYER_TAP_KEY(3, KC_SCLN), // Mousekey layer with Semicolon* |
| 193 | [3] = ACTION_KEYMAP_TAP_KEY(3, KC_SCLN), // Mousekey layer with Semicolon* | 193 | [4] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), // RControl with tap Enter* |
| 194 | [4] = ACTION_RMOD_TAP_KEY(KC_RCTL, KC_ENT), // RControl with tap Enter* | 194 | [5] = ACTION_MODS_ONESHOT(MOD_LSFT), // Oneshot Shift* |
| 195 | [5] = ACTION_LMOD_ONESHOT(KC_LSFT), // Oneshot Shift* | 195 | [6] = ACTION_LAYER_TAP_KEY(5, KC_SPC), // Mousekey layer with Space |
| 196 | // [6] = ACTION_KEYMAP_TAP_KEY(4, KC_SPC), // Half-qwerty layer with Space | 196 | [7] = ACTION_LAYER_TOGGLE(3), // Mousekey layer(toggle) |
| 197 | [6] = ACTION_KEYMAP_TAP_KEY(5, KC_SPC), // Mousekey layer with Space | ||
| 198 | // [7] = ACTION_KEYMAP(3), // Mousekey layer | ||
| 199 | [7] = ACTION_KEYMAP_TOGGLE(3), // Mousekey layer(toggle) | ||
| 200 | 197 | ||
| 201 | // [8] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_BSPC), // LControl with tap Backspace | 198 | // [8] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_BSPC), // LControl with tap Backspace |
| 202 | // [9] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_ESC), // LControl with tap Esc | 199 | // [9] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_ESC), // LControl with tap Esc |
