X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=docs%2Ffeature_tap_dance.md;h=93d190883147dd261f80844be8bd5ad9f07655ce;hb=cd215209efb0e236b691b51c3397495d4449623b;hp=99298fbda83bb66ee14ab5217ef6fd3bd0f290cd;hpb=998ddbb122c9d3e2a77bd4e88c881b225ca0d569;p=qmk_firmware.git diff --git a/docs/feature_tap_dance.md b/docs/feature_tap_dance.md index 99298fbda..93d190883 100644 --- a/docs/feature_tap_dance.md +++ b/docs/feature_tap_dance.md @@ -196,22 +196,20 @@ SRC += your_name.c Pretty simple. It is a nice way to keep some rules common on all your keymaps. -### In `/qmk_firmware/users//.h` +### In `/qmk_firmware/users//.h` You will need a few things in this file: ```c -#ifndef YOUR_NAME -#define YOUR_NAME +#pragma once #include "quantum.h" #include "process_keycode/process_tap_dance.h" - typedef struct { bool is_press_action; int state; -} xtap; +} tap; enum { SINGLE_TAP = 1, @@ -225,9 +223,9 @@ enum { //Tap dance enums enum { - CTL_X = 0, - SOME_OTHER_DANCE -} + X_CTL = 0, + SOME_OTHER_DANCE +}; int cur_dance (qk_tap_dance_state_t *state); @@ -241,7 +239,7 @@ void x_reset (qk_tap_dance_state_t *state, void *user_data); And then in your user's `.c` file you implement the functions above: ```c -#include "gordon.h" +#include ".h" #include "quantum.h" #include "action.h" #include "process_keycode/process_tap_dance.h" @@ -335,4 +333,4 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; ``` -And then simply use TD(X_CTL) anywhere in your keymap. +And then simply use `TD(X_CTL)` anywhere in your keymap after including `.h`.