keymap.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include QMK_KEYBOARD_H
  2. enum tapdance_keycodes {
  3. TD_KEY_1,
  4. TD_KEY_2,
  5. };
  6. void dance_key_one (qk_tap_dance_state_t *state, void *user_data) {
  7. if (state->count == 1) {
  8. send_unicode_string("¯\\_(ツ)_/¯");
  9. tap_code(KC_ENTER);
  10. reset_tap_dance (state);
  11. } else if (state->count == 2) {
  12. cycle_unicode_input_mode(+1);
  13. reset_tap_dance (state);
  14. }
  15. }
  16. void dance_key_two (qk_tap_dance_state_t *state, void *user_data) {
  17. if (state->count == 1) {
  18. send_unicode_string("ಠ_ಠ");
  19. tap_code(KC_ENTER);
  20. reset_tap_dance (state);
  21. } else if (state->count == 2) {
  22. send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻");
  23. tap_code(KC_ENTER);
  24. reset_tap_dance (state);
  25. } else if (state->count == 3) {
  26. send_unicode_string("╭∩╮(-_-)╭∩╮");
  27. tap_code(KC_ENTER);
  28. reset_tap_dance (state);
  29. } else if (state->count == 4) {
  30. send_unicode_string("(づ ̄ ³ ̄)づ");
  31. tap_code(KC_ENTER);
  32. reset_tap_dance (state);
  33. } else if (state->count == 5) {
  34. send_unicode_string("(︺︹︺)");
  35. tap_code(KC_ENTER);
  36. reset_tap_dance (state);
  37. }
  38. }
  39. qk_tap_dance_action_t tap_dance_actions[] = {
  40. [TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one),
  41. [TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two),
  42. };
  43. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  44. [0] = LAYOUT(
  45. TD(TD_KEY_1),
  46. TD(TD_KEY_2)
  47. ),
  48. };