Pretty simple. It is a nice way to keep some rules common on all your keymaps.
-### In `/qmk_firmware/users/<your_name>/<you_name>.h`
+### In `/qmk_firmware/users/<your_name>/<your_name>.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,
//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);
And then in your user's `.c` file you implement the functions above:
```c
-#include "gordon.h"
+#include "<your_name>.h"
#include "quantum.h"
#include "action.h"
#include "process_keycode/process_tap_dance.h"
};
```
-And then simply use TD(X_CTL) anywhere in your keymap.
+And then simply use `TD(X_CTL)` anywhere in your keymap after including `<your_name>.h`.