@ -196,22 +196,20 @@ SRC += your_name.c
Pretty simple. It is a nice way to keep some rules common on all your keymaps.
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>/<you r _name>.h`
You will need a few things in this file:
You will need a few things in this file:
```c
```c
#ifndef YOUR_NAME
#pragma once
#define YOUR_NAME
#include "quantum.h"
#include "quantum.h"
#include "process_keycode/process_tap_dance.h"
#include "process_keycode/process_tap_dance.h"
typedef struct {
typedef struct {
bool is_press_action;
bool is_press_action;
int state;
int state;
} x tap;
} tap;
enum {
enum {
SINGLE_TAP = 1,
SINGLE_TAP = 1,
@ -225,9 +223,9 @@ enum {
//Tap dance enums
//Tap dance enums
enum {
enum {
CTL_X = 0,
X_CTL = 0,
SOME_OTHER_DANCE
SOME_OTHER_DANCE
}
};
int cur_dance (qk_tap_dance_state_t *state);
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:
And then in your user's `.c` file you implement the functions above:
```c
```c
#include "gordon .h"
#include "< your_name > .h"
#include "quantum.h"
#include "quantum.h"
#include "action.h"
#include "action.h"
#include "process_keycode/process_tap_dance.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 `<your_name>.h` .