mirror of
https://github.com/qmk/qmk_firmware
synced 2024-11-15 00:15:03 +00:00
5404d6baef
* Added my UT47.2 Swedish layout with tap dance function. * Move tap dance over to user space * Removed config_common from config file * Changes to workspace with new support for code16. Tested ok * Swedish support * Added code16 version of tapdance to userprofile. * Created 4th layer and updated readme file. Removed ascii rep of layout. * Tabdance updates * Removed duplicated RGB keys. * Added hvp minivan config * Fixed tapdance key maps * Added Planck 1 space base hvp layout * Start of hvp xd75 layout. Way to many keys * Added working config ink test for atreus62 * fixed smaller layout changes * Updated tap dance with option 5 * Added better thump keys * Created lets split layout * Removed not used modes * Updated to correct url * Readme file * Atreus62 readme * Cleanup of keymap file * Added tap dance * Fixed missed adjustment * Added hvp planck setup * Update ascii * will this work better? * removed ascii * Planck 1 space setup * Fixed ascii local * Added Corne setup * Changes for lets split * Atreus62 config * Added Lily58 * Setup corne * Setup planck * Updated lets split * UT47 setup * Setup a The Vanboard. * Alt Ctrl * #define D_NAVI MT(MOD_LCTL | MOD_LSFT, KC_D) * Fix D_NAVI & plank midi * Fixed PR comments * Added pragma * Moved def to user space * Removed not used endif * Added def to users space * Added rules to van * Removed not used part of config * Removed not used layout * Removed not needed comments * Remove not needed keymap_config_t * Removed broken ascii from readme files and removed not needed rules * Added spaces to readme file * Removed xd75 from branch
103 lines
No EOL
2.6 KiB
C
103 lines
No EOL
2.6 KiB
C
#include "tap_dances.h"
|
|
|
|
// Tap dance function for enable swedish characters on first layer. Unregister to not let tap bleed over to next keypress.
|
|
// Tap dance 1
|
|
void dance_1_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
tap_code(KC_SCLN);
|
|
} else {
|
|
tap_code16(ALGR(KC_A));
|
|
}
|
|
}
|
|
|
|
void dance_1_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
unregister_code(KC_SCLN);
|
|
} else {
|
|
unregister_code16(ALGR(KC_A));
|
|
}
|
|
}
|
|
|
|
// Tap dance 2
|
|
void dance_2_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
tap_code(KC_QUOT);
|
|
} else {
|
|
tap_code16(ALGR(KC_W));
|
|
}
|
|
}
|
|
|
|
void dance_2_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
unregister_code(KC_QUOT);
|
|
} else {
|
|
unregister_code16(ALGR(KC_W));
|
|
}
|
|
}
|
|
|
|
// Tap dance 3
|
|
void dance_3_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|
// if (state->count == 2)
|
|
if (state->count == 2) {
|
|
tap_code(KC_SLSH);
|
|
} else {
|
|
tap_code16(ALGR(KC_O));
|
|
}
|
|
}
|
|
|
|
void dance_3_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
unregister_code(KC_SLSH);
|
|
} else {
|
|
unregister_code16(ALGR(KC_O));
|
|
}
|
|
}
|
|
|
|
// Tap dance 4
|
|
void dance_4_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|
// if (state->count == 2)
|
|
if (state->count == 2) {
|
|
tap_code(KC_DOT);
|
|
} else {
|
|
tap_code16(ALGR(KC_W));
|
|
}
|
|
}
|
|
|
|
void dance_4_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
unregister_code(KC_DOT);
|
|
} else {
|
|
unregister_code16(ALGR(KC_W));
|
|
}
|
|
}
|
|
|
|
// Tap dance 5
|
|
void dance_5_finished(qk_tap_dance_state_t *state, void *user_data) {
|
|
// if (state->count == 2)
|
|
if (state->count == 2) {
|
|
tap_code(KC_DOT);
|
|
} else {
|
|
tap_code16(ALGR(KC_O));
|
|
}
|
|
}
|
|
|
|
void dance_5_reset(qk_tap_dance_state_t *state, void *user_data) {
|
|
if (state->count == 2) {
|
|
unregister_code(KC_DOT);
|
|
} else {
|
|
unregister_code16(ALGR(KC_O));
|
|
}
|
|
}
|
|
|
|
// Tap Dance Definitions
|
|
qk_tap_dance_action_t tap_dance_actions[] = {
|
|
// simple tap dance
|
|
[TD1] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_1_finished, dance_1_reset),
|
|
|
|
[TD2] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_2_finished, dance_2_reset),
|
|
|
|
[TD3] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_3_finished, dance_3_reset),
|
|
|
|
[TD4] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_4_finished, dance_4_reset),
|
|
|
|
[TD5] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_5_finished, dance_5_reset)}; |