Skip to content

Instantly share code, notes, and snippets.

@arkag
Created September 11, 2018 02:20
Show Gist options
  • Save arkag/cbaf3cc53b06274918e45abdbcff4d80 to your computer and use it in GitHub Desktop.
Save arkag/cbaf3cc53b06274918e45abdbcff4d80 to your computer and use it in GitHub Desktop.
void surround_type(uint8_t num_of_char, uint8_t keycode) {
char str[2*(num_of_char + (num_of_char / 2))];
for (int i = 0; i < num_of_char; i++) {
}
for (int i = 0; i < (num_of_char/2); i++) {
SEND_STRING(X_LEFT);
}
}
void dance_grv (qk_tap_dance_state_t *state, void *user_data) {
if (state->count == 1) {
tap_key(KC_GRV);
} else if (state->count == 2) {
surround_type(1, "``");
} else {
surround_type(3, "``````");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment