Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some minor errors in tap dance example #3530

Merged
merged 2 commits into from
Aug 1, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions docs/feature_tap_dance.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,22 @@ SRC += your_name.c
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
#endif
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This #endif isn't supported to be here.

Though, the entire top block could/should be replaced with #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,
Expand All @@ -225,9 +225,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);

Expand All @@ -241,7 +241,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 "<your_name>.h"
#include "quantum.h"
#include "action.h"
#include "process_keycode/process_tap_dance.h"
Expand Down Expand Up @@ -335,4 +335,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`.