diff options
author | IBNobody <ibnobody@gmail.com> | 2016-08-23 20:52:19 -0500 |
---|---|---|
committer | IBNobody <ibnobody@gmail.com> | 2016-08-23 20:52:19 -0500 |
commit | 9263ade0fbdde6431fb5c7f26970754c5c7c2963 (patch) | |
tree | fcc4e5429bf545dca85f32d7a174388e61966438 /tmk_core/common/action.h | |
parent | 6c2b7f359cfe5122631d8772f8766c08465949c8 (diff) | |
parent | a9205484718ab2a74bc97884a2ea7b95882ed66d (diff) |
Merge remote-tracking branch 'refs/remotes/jackhumbert/master'
Diffstat (limited to 'tmk_core/common/action.h')
-rw-r--r-- | tmk_core/common/action.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h index e8aa12a7cb..b9bdfe642c 100644 --- a/tmk_core/common/action.h +++ b/tmk_core/common/action.h @@ -65,6 +65,24 @@ bool process_record_quantum(keyrecord_t *record); #if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS) extern bool disable_action_cache; #endif + +/* Code for handling one-handed key modifiers. */ +#ifdef ONEHAND_ENABLE +extern bool swap_hands; +extern const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS]; +#if (MATRIX_COLS <= 8) +typedef uint8_t swap_state_row_t; +#elif (MATRIX_COLS <= 16) +typedef uint16_t swap_state_row_t; +#elif (MATRIX_COLS <= 32) +typedef uint32_t swap_state_row_t; +#else +#error "MATRIX_COLS: invalid value" +#endif + +void process_hand_swap(keyevent_t *record); +#endif + void process_record_nocache(keyrecord_t *record); void process_record(keyrecord_t *record); void process_action(keyrecord_t *record, action_t action); |