#include <fauxclicky.h>
#endif
+/** \brief Called to execute an action.
+ *
+ * FIXME: Needs documentation.
+ */
void action_exec(keyevent_t event)
{
if (!IS_NOEVENT(event)) {
bool swap_hands = false;
bool swap_held = false;
+/** \brief Process Hand Swap
+ *
+ * FIXME: Needs documentation.
+ */
void process_hand_swap(keyevent_t *event) {
static swap_state_row_t swap_state[MATRIX_ROWS];
}
#ifndef NO_ACTION_TAPPING
-// Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
+/** \brief Allows for handling tap-hold actions immediately instead of waiting for TAPPING_TERM or another keypress.
+ *
+ * FIXME: Needs documentation.
+ */
void process_record_tap_hint(keyrecord_t *record)
{
action_t action = layer_switch_get_action(record->event.key);
}
#endif
+/** \brief Take a key event (key press or key release) and processes it.
+ *
+ * FIXME: Needs documentation.
+ */
void process_record(keyrecord_t *record)
{
if (IS_NOEVENT(record->event)) { return; }
process_action(record, action);
}
+/** \brief Take an action and processes it.
+ *
+ * FIXME: Needs documentation.
+ */
void process_action(keyrecord_t *record, action_t action)
{
keyevent_t event = record->event;
if (event.pressed) {
if (tap_count == 0) {
dprint("MODS_TAP: Oneshot: 0\n");
- register_mods(mods);
+ register_mods(mods | get_oneshot_mods());
} else if (tap_count == 1) {
dprint("MODS_TAP: Oneshot: start\n");
- set_oneshot_mods(mods);
+ set_oneshot_mods(mods | get_oneshot_mods());
#if defined(ONESHOT_TAP_TOGGLE) && ONESHOT_TAP_TOGGLE > 1
} else if (tap_count == ONESHOT_TAP_TOGGLE) {
dprint("MODS_TAP: Toggling oneshot");
register_mods(mods);
#endif
} else {
- register_mods(mods);
+ register_mods(mods | get_oneshot_mods());
}
} else {
if (tap_count == 0) {
-/*
- * Utilities for actions.
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
*/
void register_code(uint8_t code)
{
}
}
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void unregister_code(uint8_t code)
{
if (code == KC_NO) {
}
}
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void register_mods(uint8_t mods)
{
if (mods) {
}
}
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void unregister_mods(uint8_t mods)
{
if (mods) {
}
}
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void clear_keyboard(void)
{
clear_mods();
clear_keyboard_but_mods();
}
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void clear_keyboard_but_mods(void)
{
clear_weak_mods();
#endif
}
+/** \brief Utilities for actions. (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
bool is_tap_key(keypos_t key)
{
action_t action = layer_switch_get_action(key);
}
-/*
- * debug print
+/** \brief Debug print (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
*/
void debug_event(keyevent_t event)
{
dprintf("%04X%c(%u)", (event.key.row<<8 | event.key.col), (event.pressed ? 'd' : 'u'), event.time);
}
+/** \brief Debug print (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void debug_record(keyrecord_t record)
{
debug_event(record.event);
#endif
}
+/** \brief Debug print (FIXME: Needs better description)
+ *
+ * FIXME: Needs documentation.
+ */
void debug_action(action_t action)
{
switch (action.kind.id) {