aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/2_milk/keymaps/emoji/config.h2
-rw-r--r--keyboards/2_milk/keymaps/emoji/keymap.c70
-rw-r--r--keyboards/2_milk/keymaps/emoji/readme.md37
-rw-r--r--keyboards/2_milk/keymaps/emoji/rules.mk2
4 files changed, 87 insertions, 24 deletions
diff --git a/keyboards/2_milk/keymaps/emoji/config.h b/keyboards/2_milk/keymaps/emoji/config.h
new file mode 100644
index 000000000..90e4d6310
--- /dev/null
+++ b/keyboards/2_milk/keymaps/emoji/config.h
@@ -0,0 +1,2 @@
1#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC
2#define TAPPING_TERM 300 \ No newline at end of file
diff --git a/keyboards/2_milk/keymaps/emoji/keymap.c b/keyboards/2_milk/keymaps/emoji/keymap.c
index 9b84df5c2..024a6a054 100644
--- a/keyboards/2_milk/keymaps/emoji/keymap.c
+++ b/keyboards/2_milk/keymaps/emoji/keymap.c
@@ -1,31 +1,53 @@
1#include QMK_KEYBOARD_H 1#include QMK_KEYBOARD_H
2 2
3enum custom_keycodes { 3enum tapdance_keycodes {
4 DISSA, 4 TD_KEY_1,
5 SHRUG 5 TD_KEY_2,
6}; 6};
7 7
8const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 8void dance_key_one (qk_tap_dance_state_t *state, void *user_data) {
9 [0] = LAYOUT( 9 if (state->count == 1) {
10 SHRUG, 10 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); // ¯\_(ツ)_/¯
11 DISSA 11 SEND_STRING(SS_TAP(X_ENTER));
12 ) 12 reset_tap_dance (state);
13 } else if (state->count == 2) {
14 cycle_unicode_input_mode(+1);
15 reset_tap_dance (state);
16 }
17}
18
19void dance_key_two (qk_tap_dance_state_t *state, void *user_data) {
20 if (state->count == 1) {
21 send_unicode_hex_string("0CA0 005F 0CA0"); // ಠ_ಠ
22 SEND_STRING(SS_TAP(X_ENTER));
23 reset_tap_dance (state);
24 } else if (state->count == 2) {
25 send_unicode_hex_string("0028 30CE 0CA0 75CA 0CA0 0029 30CE 5F61 253B 2501 253B"); // (ノಠ痊ಠ)ノ彡┻━┻
26 SEND_STRING(SS_TAP(X_ENTER));
27 reset_tap_dance (state);
28 } else if (state->count == 3) {
29 send_unicode_hex_string("256D 2229 256E 0028 002D 005F 002D 0029 256D 2229 256E"); // ╭∩╮(-_-)╭∩╮
30 SEND_STRING(SS_TAP(X_ENTER));
31 reset_tap_dance (state);
32 } else if (state->count == 4) {
33 send_unicode_hex_string("0028 3065 FFE3 0020 00B3 FFE3 0029 3065"); // (づ ̄ ³ ̄)づ
34 SEND_STRING(SS_TAP(X_ENTER));
35 reset_tap_dance (state);
36 } else if (state->count == 5) {
37 send_unicode_hex_string("0028 FE3A FE39 FE3A 0029"); // (︺︹︺)
38 SEND_STRING(SS_TAP(X_ENTER));
39 reset_tap_dance (state);
40 }
41}
42
43qk_tap_dance_action_t tap_dance_actions[] = {
44 [TD_KEY_1] = ACTION_TAP_DANCE_FN(dance_key_one),
45 [TD_KEY_2] = ACTION_TAP_DANCE_FN(dance_key_two),
13}; 46};
14 47
15bool process_record_user(uint16_t keycode, keyrecord_t *record) { 48const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
16 switch (keycode) { 49 [0] = LAYOUT(
17 case SHRUG: 50 TD(TD_KEY_1),
18 if (record->event.pressed) { 51 TD(TD_KEY_2)
19 send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); 52 ),
20 } else {
21 }
22 break;
23 case DISSA:
24 if (record->event.pressed) {
25 send_unicode_hex_string("0CA0 005F 0CA0");
26 } else {
27 }
28 break;
29 }
30 return true;
31}; 53};
diff --git a/keyboards/2_milk/keymaps/emoji/readme.md b/keyboards/2_milk/keymaps/emoji/readme.md
index 980be7dd5..1d5a08730 100644
--- a/keyboards/2_milk/keymaps/emoji/readme.md
+++ b/keyboards/2_milk/keymaps/emoji/readme.md
@@ -1,2 +1,39 @@
1# Emoji Keymap 1# Emoji Keymap
2![Picture](https://i.imgur.com/1zEZ9Lq.png) 2![Picture](https://i.imgur.com/1zEZ9Lq.png)
3
4# Unicode Setup
5
6Unicode input in QMK works by inputting a sequence of characters to the
7OS, sort of like a macro. Unfortunately, the way this is done differs
8for each platform. Specifically, each platform requires a different
9combination of keys to trigger Unicode input. Therefore, a
10corresponding input mode has to be set in QMK.
11
12Documentation: [Feature Unicode](https://beta.docs.qmk.fm/features/feature_unicode#input-modes)
13
14On this keymap the default unicode mode it's `UC_LNX`.
15You can change it permanently tapping 2 times the KeyOne to select the next mode.
16
17## Unicode Mode List
18- UC_LNX
19- UC_OSX
20- UC_WIN
21- UC_WINC
22
23# Keymap
24To add more functionality to this Minimal Keyboard,
25it's implemented the tap dance feature, so pressing the same key
26multiples times will produce different emojis.
27
28## Key One
29
30- 1 Tap: `¯\_(ツ)_/¯`
31- 2 Taps: Switch Unicode Input Type
32
33## Key Two
34
35- 1 Tap: `ಠ_ಠ`
36- 2 Taps: `(ノಠ痊ಠ)ノ彡┻━┻`
37- 3 Taps: `╭∩╮(-_-)╭∩╮`
38- 4 Taps: `(づ ̄ ³ ̄)づ`
39- 5 Taps: `(︺︹︺)` \ No newline at end of file
diff --git a/keyboards/2_milk/keymaps/emoji/rules.mk b/keyboards/2_milk/keymaps/emoji/rules.mk
new file mode 100644
index 000000000..7a64eb902
--- /dev/null
+++ b/keyboards/2_milk/keymaps/emoji/rules.mk
@@ -0,0 +1,2 @@
1UNICODE_ENABLE = yes # Unicode
2TAP_DANCE_ENABLE = yes # Tap Dance \ No newline at end of file