logo

qmk_firmware

custom branch of QMK firmware git clone https://anongit.hacktivis.me/git/qmk_firmware.git

keymap.c (1488B)


  1. #include QMK_KEYBOARD_H
  2. enum tapdance_keycodes {
  3. TD_KEY_1,
  4. TD_KEY_2,
  5. };
  6. void dance_key_one (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. unicode_input_mode_step();
  13. reset_tap_dance (state);
  14. }
  15. }
  16. void dance_key_two (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. 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. };