You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

584 lines
19 KiB

  1. // Copyright 2022 Ulrich Spörlein (@uqs)
  2. // SPDX-License-Identifier: GPL-2.0-or-later
  3. // vi:et sw=4:
  4. #include "uqs.h"
  5. // LOG:
  6. // late Jan 2020, got Ohkeycaps Dactyl Manuform 5x6
  7. // https://play.typeracer.com shows about 75-80wpm (en) or ~400cpm (de) on my classic keeb.
  8. // Never did proper touch typing, basically didn't use ring finger much, mostly index/middle and pinky (only to hold down modifiers, really).
  9. // Feb 2020, switching to Colemak DH after 30 years of Qwerty, uh oh...
  10. // mid Feb, 20wpm/87% on monkeytype.com (no punct, numbers)
  11. // early March, 28wpm/90% on MT (plus punct./numbers from here on); 25wpm on typeracer
  12. // early April, 35wpm/92% on MT; 41wpm on typeracer
  13. // early May, 45wpm/96% on MT; 46wpm on typeracer; my qwerty is deteriorating, I need to look at the keys more and more o_O
  14. // early June, 49wpm/95% on MT (sigh ...); 50wpm on typeracer;
  15. // early July, 50wpm/96% on MT (...); 52wpm/96% on typeracer;
  16. // early August, 55wpm/96% on MT; 55wpm/98% on typeracer;
  17. // early September, 57wpm/97% on MT; 58wpm/97% on typeracer;
  18. // early October, 59wpm/96% on MT; 61wpm/97% on typeracer;
  19. // November, 56wpm/97% on MT; 62wpm/98% on typeracer;
  20. // December, 62wpm/96% on MT; 66wpm/98% on typeracer;
  21. // January, 61wpm/97% on MT; 65wpm/98% on typeracer;
  22. // February, 64wpm/97% on MT; 67wpm/98% on typeracer; my qwerty on the laptop is still fine, but I miss my shortcuts badly.
  23. //
  24. // So that's one year on Colemak. Was it worth the switch? Probably not, though
  25. // I also had to first learn proper technique, but that was actually swift, as
  26. // the keyboard nicely forces that on you. I really like home row mods though,
  27. // they are so comfy. Need to rethink my combos some more, still.
  28. #ifdef RGBLIGHT_LAYERS
  29. layer_state_t default_layer_state_set_user(layer_state_t state) {
  30. rgblight_set_layer_state(L_QWER, layer_state_cmp(state, L_QWER));
  31. rgblight_set_layer_state(L_WASD, layer_state_cmp(state, L_WASD));
  32. rgblight_set_layer_state(L_COLM, layer_state_cmp(state, L_COLM));
  33. return state;
  34. }
  35. #endif
  36. layer_state_t layer_state_set_user(layer_state_t state) {
  37. #if 0
  38. // defining layer L_FUNC when both keys are pressed
  39. state = update_tri_layer_state(state, L_EXTD, L_NUM, L_FUNC);
  40. #endif
  41. #ifdef RGBLIGHT_LAYERS
  42. rgblight_set_layer_state(L_EXTD, layer_state_cmp(state, L_EXTD));
  43. rgblight_set_layer_state(L_NUM, layer_state_cmp(state, L_NUM));
  44. rgblight_set_layer_state(L_FUNC, layer_state_cmp(state, L_FUNC));
  45. rgblight_set_layer_state(L_MOUSE, layer_state_cmp(state, L_MOUSE));
  46. #else
  47. #endif
  48. return state;
  49. }
  50. #ifdef RGBLIGHT_LAYERS
  51. // NOTE: at most 2 elements, last one needs to be RGBLIGHT_END_SEGMENTS
  52. typedef rgblight_segment_t rgblight_layer_t[3];
  53. const rgblight_layer_t PROGMEM my_rgb_segments[] = {
  54. [L_QWER] = {{0, RGBLED_NUM, HSV_WHITE}, RGBLIGHT_END_SEGMENTS},
  55. [L_WASD] = {{0, RGBLED_NUM/2, HSV_RED}, {RGBLED_NUM/2, RGBLED_NUM/2, HSV_OFF}, RGBLIGHT_END_SEGMENTS},
  56. [L_COLM] = {{0, RGBLED_NUM, HSV_GREEN}, RGBLIGHT_END_SEGMENTS},
  57. [L_EXTD] = {{0, RGBLED_NUM, HSV_BLUE}, RGBLIGHT_END_SEGMENTS},
  58. [L_NUM] = {{0, RGBLED_NUM, HSV_ORANGE}, RGBLIGHT_END_SEGMENTS},
  59. [L_FUNC] = {{0, RGBLED_NUM, HSV_YELLOW}, RGBLIGHT_END_SEGMENTS},
  60. [L_MOUSE]= {{0, RGBLED_NUM, HSV_PURPLE}, RGBLIGHT_END_SEGMENTS},
  61. };
  62. // This array needs pointers, :/
  63. const rgblight_segment_t* const PROGMEM my_rgb_layers[] = {
  64. my_rgb_segments[L_QWER],
  65. my_rgb_segments[L_WASD],
  66. my_rgb_segments[L_COLM],
  67. my_rgb_segments[L_EXTD],
  68. my_rgb_segments[L_NUM],
  69. my_rgb_segments[L_FUNC],
  70. my_rgb_segments[L_MOUSE],
  71. };
  72. _Static_assert(sizeof(my_rgb_layers) / sizeof(my_rgb_layers[0]) ==
  73. sizeof(my_rgb_segments) / sizeof(my_rgb_segments[0]),
  74. "Number of rgb_segment definitions does not match up!");
  75. #endif
  76. #ifdef COMBO_ENABLE
  77. enum combo_events {
  78. C_AUML,
  79. C_OUML,
  80. C_UUML,
  81. C_SZ,
  82. C_CBR,
  83. C_PRN,
  84. C_BRC,
  85. };
  86. // Maybe use this?
  87. // #define COMBO_ONLY_FROM_LAYER L_COLM
  88. // The official way has way too much duplication and intermediate names for my taste...
  89. const uint16_t PROGMEM my_action_combos[][3] = {
  90. [C_AUML] = {KC_G_A, KC_W, COMBO_END},
  91. [C_OUML] = {KC_G_O, KC_Y, COMBO_END},
  92. [C_UUML] = {KC_C_N, KC_U, COMBO_END},
  93. [C_SZ] = {KC_S_S, KC_Z, COMBO_END},
  94. [C_CBR] = {KC_COLN, KC_LCBR, COMBO_END},
  95. [C_PRN] = {KC_LCBR, KC_LPRN, COMBO_END},
  96. [C_BRC] = {KC_LPRN, KC_LBRC, COMBO_END},
  97. };
  98. const uint16_t PROGMEM my_combos[][4] = {
  99. {KC_LPRN, KC_F, KC_P, COMBO_END},
  100. {KC_RPRN, KC_C, KC_D, COMBO_END},
  101. {KC_LCBR, KC_W, KC_F, COMBO_END},
  102. {KC_RCBR, KC_X, KC_C, COMBO_END},
  103. {KC_TAB, KC_G_A, KC_A_R, COMBO_END},
  104. {KC_BSLS, KC_B, KC_J, COMBO_END}, // remove this?
  105. {KC_BSLS, KC_F, KC_U, COMBO_END},
  106. {LSFT(KC_BSLS), KC_P, KC_L, COMBO_END},
  107. {KC_MINUS, KC_C_T, KC_C_N, COMBO_END},
  108. {LSFT(KC_MINUS), KC_D, KC_H, COMBO_END},
  109. {KC_GRV, KC_Q, KC_W, COMBO_END}, // remove this?
  110. {KC_GRV, KC_C, KC_COMM, COMBO_END},
  111. {LSFT(KC_GRV), KC_G, KC_M, COMBO_END},
  112. {KC_BTN3, KC_BTN1, KC_BTN2, COMBO_END},
  113. {KC_BTN1, KC_BTN2, KC_BTN3, COMBO_END},
  114. };
  115. const uint16_t COMBO_LEN = sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0]);
  116. #define MY_ACTION_COMBO(ck) \
  117. [ck] = { .keys = &(my_action_combos[ck][0]) }
  118. #define MY_COMBO(ck) \
  119. { .keys = &(my_combos[ck][1]), .keycode = my_combos[ck][0] }
  120. // NOTE: while my_combos can live in PROGMEM, the key_combos data also
  121. // contains state that is tweaked at runtime, so we need to indirect. Ugh.
  122. #define COMBO_STATICALLY
  123. #ifdef COMBO_STATICALLY
  124. // TODO: fill this at runtime with a loop?
  125. combo_t key_combos[] = {
  126. MY_ACTION_COMBO(0),
  127. MY_ACTION_COMBO(1),
  128. MY_ACTION_COMBO(2),
  129. MY_ACTION_COMBO(3),
  130. MY_ACTION_COMBO(4),
  131. MY_ACTION_COMBO(5),
  132. MY_ACTION_COMBO(6),
  133. MY_COMBO(0),
  134. MY_COMBO(1),
  135. MY_COMBO(2),
  136. MY_COMBO(3),
  137. MY_COMBO(4),
  138. MY_COMBO(5),
  139. MY_COMBO(6),
  140. MY_COMBO(7),
  141. MY_COMBO(8),
  142. MY_COMBO(9),
  143. MY_COMBO(10),
  144. MY_COMBO(11),
  145. MY_COMBO(12),
  146. MY_COMBO(13),
  147. MY_COMBO(14),
  148. };
  149. _Static_assert(sizeof(key_combos) / sizeof(key_combos[0]) ==
  150. (sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0])),
  151. "Number of combo definitions does not match up!");
  152. #else
  153. combo_t key_combos[sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0])];
  154. #endif
  155. void process_combo_event(uint16_t combo_index, bool pressed) {
  156. switch (combo_index) {
  157. case C_AUML:
  158. if (pressed) {
  159. tap_code16(KC_RALT);
  160. tap_code16(LSFT(KC_QUOT));
  161. tap_code16(KC_A);
  162. }
  163. break;
  164. case C_OUML:
  165. if (pressed) {
  166. tap_code16(KC_RALT);
  167. tap_code16(LSFT(KC_QUOT));
  168. tap_code16(KC_O);
  169. }
  170. break;
  171. case C_UUML:
  172. if (pressed) {
  173. tap_code16(KC_RALT);
  174. tap_code16(LSFT(KC_QUOT));
  175. tap_code16(KC_U);
  176. }
  177. break;
  178. case C_SZ:
  179. if (pressed) {
  180. tap_code16(KC_RALT);
  181. tap_code16(KC_S);
  182. tap_code16(KC_S);
  183. }
  184. break;
  185. case C_CBR:
  186. if (pressed) {
  187. tap_code16(KC_LCBR);
  188. tap_code16(KC_RCBR);
  189. tap_code16(KC_LEFT);
  190. }
  191. break;
  192. case C_PRN:
  193. if (pressed) {
  194. tap_code16(KC_LPRN);
  195. tap_code16(KC_RPRN);
  196. tap_code16(KC_LEFT);
  197. }
  198. break;
  199. case C_BRC:
  200. if (pressed) {
  201. tap_code16(KC_LBRC);
  202. tap_code16(KC_RBRC);
  203. tap_code16(KC_LEFT);
  204. }
  205. break;
  206. }
  207. }
  208. #endif
  209. void keyboard_post_init_user(void) {
  210. #ifndef KEYBOARD_preonic_rev3
  211. default_layer_set(1ul << L_COLM);
  212. #endif
  213. #ifdef RGBLIGHT_LAYERS
  214. // Enable the LED layers
  215. rgblight_layers = my_rgb_layers;
  216. rgblight_set_layer_state(0, true);
  217. #endif
  218. #if defined(COMBO_ENABLE) && !defined(COMBO_STATICALLY)
  219. uint8_t i = 0;
  220. for (; i < sizeof(my_action_combos) / sizeof(my_action_combos[0]); i++) {
  221. key_combos[i].keys = &(my_action_combos[i][0]);
  222. }
  223. for (uint8_t j = 0; j < sizeof(my_combos) / sizeof(my_combos[0]); j++, i++) {
  224. key_combos[i].keycode = my_combos[j][0];
  225. key_combos[i].keys = &(my_combos[j][1]);
  226. }
  227. #endif
  228. }
  229. uint16_t key_timer;
  230. bool delkey_registered;
  231. bool num_layer_was_used;
  232. bool extd_layer_was_used;
  233. // These keep state about the long-press-means-umlaut keys.
  234. bool auml_pressed;
  235. bool ouml_pressed;
  236. bool uuml_pressed;
  237. void maybe_send_umlaut(uint16_t keycode, bool *is_pressed) {
  238. // Some other key did _not_ already re-arm this key, so now we need to do
  239. // that ourselves.
  240. if (*is_pressed) {
  241. *is_pressed = false;
  242. // If released within the timer, then just KC_A, KC_O, KC_U
  243. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  244. tap_code16(keycode);
  245. } else {
  246. tap_code16(KC_RALT);
  247. tap_code16(LSFT(KC_QUOT));
  248. tap_code16(keycode);
  249. }
  250. }
  251. }
  252. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  253. // TODO: why not use key_timer here? is it dynamic or not?
  254. static uint16_t extd_layer_timer;
  255. if (layer_state_is(L_EXTD) && record->event.pressed) {
  256. extd_layer_was_used = true;
  257. }
  258. if (layer_state_is(L_NUM) && record->event.pressed) {
  259. num_layer_was_used = true;
  260. }
  261. // An umlaut key was pressed previously (but will only emit the key on
  262. // release), but we've pressed a different key now, so fire the regular key,
  263. // re-arm it and continue with whatever actual key was pressed just now.
  264. if (record->event.pressed) {
  265. if (auml_pressed) {
  266. tap_code16(KC_A);
  267. auml_pressed = false;
  268. }
  269. if (ouml_pressed) {
  270. tap_code16(KC_O);
  271. ouml_pressed = false;
  272. }
  273. if (uuml_pressed) {
  274. tap_code16(KC_U);
  275. uuml_pressed = false;
  276. }
  277. }
  278. switch (keycode) {
  279. // From https://github.com/qmk/qmk_firmware/issues/6053
  280. case LT_EXTD_ESC:
  281. if (record->event.pressed) {
  282. extd_layer_was_used = false;
  283. extd_layer_timer = timer_read();
  284. layer_on(L_EXTD);
  285. } else {
  286. layer_off(L_EXTD);
  287. unregister_mods(MOD_BIT(KC_LALT)); // undo what ALT_TAB might've set
  288. // NOTE: need to track whether we made use of the extd layer and
  289. // that all happened within the tapping term. Otherwise we'd emit
  290. // that layer key code _plus_ an extra Esc.
  291. if (timer_elapsed(extd_layer_timer) < TAPPING_TERM && !extd_layer_was_used) {
  292. tap_code(KC_ESC);
  293. }
  294. }
  295. return true;
  296. case LT_NUM_BSPC:
  297. if (record->event.pressed){
  298. num_layer_was_used = false;
  299. extd_layer_timer = timer_read();
  300. layer_on(L_NUM);
  301. } else {
  302. layer_off(L_NUM);
  303. // NOTE: Custom LT method so that any press of a key on that layer will prevent the backspace.
  304. if (timer_elapsed(extd_layer_timer) < TAPPING_TERM && !num_layer_was_used) {
  305. tap_code(KC_BSPC);
  306. }
  307. }
  308. return true;
  309. case LT_MOUSE_ALT_SHIFT_INS:
  310. if (record->event.pressed) {
  311. key_timer = timer_read();
  312. layer_on(L_MOUSE);
  313. } else {
  314. layer_off(L_MOUSE);
  315. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  316. tap_code16(LALT(LSFT(KC_INS)));
  317. }
  318. }
  319. return true;
  320. case LT_FUNC_SHIFT_INS:
  321. if (record->event.pressed) {
  322. key_timer = timer_read();
  323. layer_on(L_FUNC);
  324. } else {
  325. layer_off(L_FUNC);
  326. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  327. tap_code16(LSFT(KC_INS));
  328. }
  329. }
  330. return true;
  331. #if 1
  332. /* Looks like PERMISSIVE_HOLD on LT and OSM doesn't work properly. This
  333. * is probaby https://github.com/qmk/qmk_firmware/issues/8971
  334. */
  335. case OSM_GUI:
  336. /* OSM(MOD_LGUI) is delaying the event, but I need immediate triggering
  337. * of the modifier to move windows around with the mouse. If only
  338. * tapped, however, have it be a win OSM */
  339. if (record->event.pressed) {
  340. key_timer = timer_read();
  341. register_mods(MOD_BIT(KC_LGUI));
  342. } else {
  343. unregister_mods(MOD_BIT(KC_LGUI));
  344. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  345. add_oneshot_mods(MOD_BIT(KC_LGUI));
  346. } else {
  347. del_oneshot_mods(MOD_BIT(KC_LGUI));
  348. }
  349. }
  350. return true;
  351. // Why do I have to roll my own? It seems the original ones work on
  352. // keyrelease, at which time I might have let go of the layer tap
  353. // already, so I cannot roll them fast...
  354. case OSM_SFT:
  355. if (record->event.pressed) {
  356. key_timer = timer_read();
  357. register_mods(MOD_BIT(KC_LSFT));
  358. } else {
  359. unregister_mods(MOD_BIT(KC_LSFT));
  360. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  361. add_oneshot_mods(MOD_BIT(KC_LSFT));
  362. } /*else {
  363. del_oneshot_mods(MOD_BIT(KC_LSFT));
  364. }*/
  365. }
  366. return true;
  367. case OSM_CTL:
  368. if (record->event.pressed) {
  369. key_timer = timer_read();
  370. register_mods(MOD_BIT(KC_LCTL));
  371. } else {
  372. unregister_mods(MOD_BIT(KC_LCTL));
  373. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  374. add_oneshot_mods(MOD_BIT(KC_LCTL));
  375. } /*else {
  376. del_oneshot_mods(MOD_BIT(KC_LCTL));
  377. }*/
  378. }
  379. return true;
  380. case OSM_ALT:
  381. if (record->event.pressed) {
  382. key_timer = timer_read();
  383. register_mods(MOD_BIT(KC_LALT));
  384. } else {
  385. unregister_mods(MOD_BIT(KC_LALT));
  386. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  387. add_oneshot_mods(MOD_BIT(KC_LALT));
  388. } /*else {
  389. del_oneshot_mods(MOD_BIT(KC_LALT));
  390. }*/
  391. }
  392. return true;
  393. #else
  394. #define OSM_ALT OSM(MOD_LALT)
  395. #define OSM_CTL OSM(MOD_LCTL)
  396. #define OSM_GUI OSM(MOD_LGUI)
  397. #define OSM_SFT OSM(MOD_LSFT)
  398. #endif
  399. // Obsoleted by using combos for umlauts now.
  400. case KC_A_AE:
  401. if (record->event.pressed) {
  402. key_timer = timer_read();
  403. auml_pressed = true;
  404. } else {
  405. maybe_send_umlaut(KC_A, &auml_pressed);
  406. }
  407. break;
  408. case KC_O_OE:
  409. if (record->event.pressed) {
  410. key_timer = timer_read();
  411. ouml_pressed = true;
  412. } else {
  413. maybe_send_umlaut(KC_O, &ouml_pressed);
  414. }
  415. break;
  416. case KC_U_UE:
  417. if (record->event.pressed) {
  418. key_timer = timer_read();
  419. uuml_pressed = true;
  420. } else {
  421. maybe_send_umlaut(KC_U, &uuml_pressed);
  422. }
  423. break;
  424. case MINS_UNDSCR:
  425. if (record->event.pressed) {
  426. key_timer = timer_read();
  427. } else {
  428. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  429. // Can't send KC_KP_MINUS, it doesn't compose to, say →
  430. tap_code16(KC_MINUS);
  431. } else {
  432. tap_code16(KC_UNDERSCORE);
  433. }
  434. }
  435. break;
  436. case ALT_TAB:
  437. if (record->event.pressed) {
  438. register_mods(MOD_BIT(KC_LALT));
  439. tap_code16(KC_TAB);
  440. }
  441. break;
  442. case INS_HARD:
  443. // Do Alt-Shift-Ins first to have xdotool copy from SELECTION to CLIPBOARD, then Shift-Ins to paste.
  444. if (record->event.pressed) {
  445. tap_code16(LSFT(LALT(KC_INS)));
  446. } else {
  447. tap_code16(LSFT(KC_INS));
  448. }
  449. break;
  450. case SHIFT_INS:
  451. if (record->event.pressed) {
  452. // when keycode is pressed
  453. key_timer = timer_read();
  454. // Shift when held ...
  455. register_mods(MOD_BIT(KC_RSFT));
  456. } else {
  457. // If released within the timer, then Shift+Ins
  458. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  459. tap_code16(KC_INS);
  460. }
  461. unregister_mods(MOD_BIT(KC_RSFT));
  462. }
  463. break;
  464. case ALT_SHIFT_INS:
  465. if (record->event.pressed) {
  466. key_timer = timer_read();
  467. // Shift when held ...
  468. register_mods(MOD_BIT(KC_LSFT));
  469. } else {
  470. // If released within the timer, then Shift+Alt+Ins
  471. if (timer_elapsed(key_timer) < TAPPING_TERM) {
  472. register_mods(MOD_BIT(KC_LALT));
  473. tap_code16(KC_INS);
  474. }
  475. // Note: this makes xev(1) see KeyPress for Meta_L but KeyRelease for Alt_L
  476. unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LALT));
  477. }
  478. break;
  479. /*
  480. * Obsoleted by making tmux understand Ctrl-(Shift)-Tab natively.
  481. case TM_NEXT:
  482. if (record->event.pressed) SEND_STRING(SS_LCTRL("a") "n");
  483. break;
  484. case TM_PREV:
  485. if (record->event.pressed) SEND_STRING(SS_LCTRL("a") "p");
  486. break;
  487. */
  488. // TODO: use key overrides to turn, e.g. Win+Ctrl-Tab into VIM_NEXT.
  489. // Not sure why Ctrl-Pgup works in vim, but not in vim-inside-tmux.
  490. case VIM_NEXT:
  491. if (record->event.pressed) SEND_STRING(SS_TAP(X_ESC) SS_TAP(X_G) SS_TAP(X_T));
  492. break;
  493. case VIM_PREV:
  494. if (record->event.pressed) SEND_STRING(SS_TAP(X_ESC) SS_TAP(X_G) SS_LSFT("t"));
  495. break;
  496. case WIN_LEFT:
  497. if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_H));
  498. break;
  499. case WIN_DN:
  500. if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_J));
  501. break;
  502. case WIN_UP:
  503. if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_K));
  504. break;
  505. case WIN_RGHT:
  506. if (record->event.pressed) SEND_STRING(SS_LCTRL("w") SS_TAP(X_L));
  507. break;
  508. }
  509. return true;
  510. }
  511. #ifdef LEADER_ENABLE
  512. LEADER_EXTERNS();
  513. void matrix_scan_user(void) {
  514. LEADER_DICTIONARY() {
  515. leading = false;
  516. leader_end();
  517. #ifdef UCIS_ENABLE
  518. SEQ_ONE_KEY(KC_U) {
  519. qk_ucis_start();
  520. }
  521. #endif
  522. SEQ_ONE_KEY(KC_H) {
  523. send_unicode_string("ᕕ( ᐛ )ᕗ"); // happy
  524. }
  525. SEQ_ONE_KEY(KC_D) {
  526. send_unicode_string("ಠ_ಠ"); // disapproval
  527. }
  528. SEQ_ONE_KEY(KC_L) {
  529. send_unicode_string("( ͡° ͜ʖ ͡°)"); // lenny
  530. }
  531. SEQ_ONE_KEY(KC_S) {
  532. send_unicode_string("¯\\_(ツ)_/¯"); // shrug
  533. }
  534. // tableflip (LEADER - TF)
  535. SEQ_TWO_KEYS(KC_T, KC_F) {
  536. //set_unicode_input_mode(UC_LNX);
  537. //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
  538. send_unicode_string("(╯°□°)╯︵ ┻━┻");
  539. }
  540. // untableflip
  541. SEQ_THREE_KEYS(KC_U, KC_T, KC_F) {
  542. //set_unicode_input_mode(UC_LNX);
  543. //send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B");
  544. send_unicode_string("┬─┬ノ( º _ ºノ)");
  545. }
  546. }
  547. }
  548. #endif
  549. #ifdef UCIS_ENABLE
  550. // 3 codepoints at most, otherwise increase UCIS_MAX_CODE_POINTS
  551. const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE(
  552. UCIS_SYM("poop", 0x1F4A9), // 💩
  553. UCIS_SYM("rofl", 0x1F923), // 🤣
  554. UCIS_SYM("look", 0x0CA0, 0x005F, 0x0CA0) // ಠ_ಠ
  555. );
  556. #endif