aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/common/action.h
diff options
context:
space:
mode:
authorGravatar cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info>2016-08-24 17:47:09 -0400
committerGravatar cbbrowne <cbbrowne@cbbrowne.tor.int-afilias.info>2016-08-24 17:47:09 -0400
commit7c2a24b3154367bfff06163193e07303d9dcf86e (patch)
tree91e921f09d3eedbc90fd36b3b54c5b2581df9891 /tmk_core/common/action.h
parent9778349c4bfb6723ef056eb3473a7fc15c45c435 (diff)
parentad206155aa6f87de3fb9f0aefe60685ec12905a8 (diff)
downloadqmk_firmware-7c2a24b3154367bfff06163193e07303d9dcf86e.tar.gz
Merge branch 'master' of https://github.com/jackhumbert/qmk_firmware
Diffstat (limited to 'tmk_core/common/action.h')
-rw-r--r--tmk_core/common/action.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/tmk_core/common/action.h b/tmk_core/common/action.h
index e8aa12a7c..b9bdfe642 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);