aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common/action_code.h
diff options
context:
space:
mode:
authorJoe Wasson <jwasson+github@gmail.com>2018-03-12 10:22:49 -0700
committerJack Humbert <jack.humb@gmail.com>2018-03-16 16:33:43 -0400
commit5d771039adf23fe9cb8de5843a3d799dc73a2fc7 (patch)
tree043471b02358c3f7cbe848886fc5bcd850049fa7 /tmk_core/common/action_code.h
parent23ac2a02ef870dce91318a4d98e3c8ec5749bced (diff)
downloadfirmware-5d771039adf23fe9cb8de5843a3d799dc73a2fc7.tar.gz
firmware-5d771039adf23fe9cb8de5843a3d799dc73a2fc7.tar.bz2
firmware-5d771039adf23fe9cb8de5843a3d799dc73a2fc7.zip
Fix swap-hands tapping.
This is an inelegant hack for #2522 but makes things work. Basically we give `action.c` a chance to handle the hold event early so that we can swap the keyboard for later keys. Later, to allow the hold to happen again quickly we nuke the key record so that tapping is reset. I tried to find a cleaner way, honestly.
Diffstat (limited to 'tmk_core/common/action_code.h')
-rw-r--r--tmk_core/common/action_code.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/tmk_core/common/action_code.h b/tmk_core/common/action_code.h
index 05bc84573..fe2735b97 100644
--- a/tmk_core/common/action_code.h
+++ b/tmk_core/common/action_code.h
@@ -186,7 +186,7 @@ typedef union {
} func;
struct action_swap {
uint8_t code :8;
- uint8_t opt :4;
+ uint8_t opt :4;
uint8_t kind :4;
} swap;
} action_t;
@@ -243,7 +243,7 @@ enum usage_pages {
-/*
+/*
* Layer Actions
*/
enum layer_param_on {
@@ -257,7 +257,7 @@ enum layer_param_bit_op {
OP_BIT_XOR = 2,
OP_BIT_SET = 3,
};
-enum layer_pram_tap_op {
+enum layer_param_tap_op {
OP_TAP_TOGGLE = 0xF0,
OP_ON_OFF,
OP_OFF_ON,
@@ -329,7 +329,7 @@ enum function_opts {
#define ACTION_FUNCTION_TAP(id) ACTION(ACT_FUNCTION, FUNC_TAP<<8 | (id))
#define ACTION_FUNCTION_OPT(id, opt) ACTION(ACT_FUNCTION, (opt)<<8 | (id))
/* OneHand Support */
-enum swap_hands_pram_tap_op {
+enum swap_hands_param_tap_op {
OP_SH_TOGGLE = 0xF0,
OP_SH_TAP_TOGGLE,
OP_SH_ON_OFF,