summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorNick Choi <iinikchi@gmail.com>2017-05-24 00:35:04 -0400
committerNick Choi <iinikchi@gmail.com>2017-05-24 00:35:04 -0400
commitef1714f443be67103ce9eb6adedef6c8875d17e5 (patch)
treec01ada187fb28e884b860f9bf5694c162e47469b /keyboards
parent6536b1ce2a136b7e1d0d4bbd94ff47e10765f644 (diff)
more emoji function comments
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/config.h3
-rw-r--r--keyboards/frosty_flake/keymaps/nikchi/keymap.c48
2 files changed, 38 insertions, 13 deletions
diff --git a/keyboards/frosty_flake/keymaps/nikchi/config.h b/keyboards/frosty_flake/keymaps/nikchi/config.h
index 45825781df..e91d082c8a 100644
--- a/keyboards/frosty_flake/keymaps/nikchi/config.h
+++ b/keyboards/frosty_flake/keymaps/nikchi/config.h
@@ -3,7 +3,7 @@
#include "../../config.h"
-#define TAPPING_TERM 200
+#define TAPPING_TERM 300
#define LEADER_TIMEOUT 400
#define DISABLE_SPACE_CADET_ROLLOVER
@@ -21,3 +21,4 @@
// place overrides here
#endif
+
diff --git a/keyboards/frosty_flake/keymaps/nikchi/keymap.c b/keyboards/frosty_flake/keymaps/nikchi/keymap.c
index 5bb553de00..c9e2207214 100644
--- a/keyboards/frosty_flake/keymaps/nikchi/keymap.c
+++ b/keyboards/frosty_flake/keymaps/nikchi/keymap.c
@@ -7,10 +7,12 @@
#define _______ KC_TRNS
+
+//declarations for tap dancing emojis
void register_hex32(uint32_t hex);
void cycleEmojis(qk_tap_dance_state_t *state, void *user_data);
void cycleAnimals(qk_tap_dance_state_t *state, void *user_data);
-void resetEmojis(qk_tap_dance_state_t *state, void *user_data);
+void cycleHands(qk_tap_dance_state_t *state, void *user_data);
void tap(uint16_t keycode){
register_code(keycode);
@@ -21,10 +23,11 @@ void tap(uint16_t keycode){
enum taps{
TD_CTCPS = 0,
EMOJIS,
- ANIMAL
+ ANIMAL,
+ HAND
};
-enum unicode_name {
+enum unicode_name { // split every five emojis
THINK = 1, // thinking face 🤔
GRIN, // grinning face 😊
SMRK, // smirk 😏
@@ -37,6 +40,12 @@ enum unicode_name {
MONKEY, // 🐒
CHICK, // 🐥
+ OKOK, // 👌
+ EFFU, // 🖕
+ INUP, // 👆
+ THUP, // 👍
+ THDN, // 👎
+
BBB, // dat B 🅱
POO, // poop 💩
HUNDR, // 100 💯
@@ -66,8 +75,9 @@ enum quick {
qk_tap_dance_action_t tap_dance_actions[] = {
// Tap once for CTRL, twice for Caps Lock
[TD_CTCPS] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_CAPS),
- [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, resetEmojis),
- [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, resetEmojis)
+ [EMOJIS] = ACTION_TAP_DANCE_FN_ADVANCED(cycleEmojis, NULL, NULL),
+ [ANIMAL] = ACTION_TAP_DANCE_FN_ADVANCED(cycleAnimals, NULL, NULL),
+ [HAND] = ACTION_TAP_DANCE_FN_ADVANCED(cycleHands, NULL, NULL)
// Other declarations would go here, separated by commas, if you have them
};
@@ -115,9 +125,13 @@ const uint32_t PROGMEM unicode_map[] = {
[PENGUIN] = 0x1F427,
[MONKEY] = 0x1F412,
[CHICK] = 0x1F425,
- [DRAGON] = 0x1F409
+ [DRAGON] = 0x1F409,
+ [OKOK] = 0x1F44C,
+ [EFFU] = 0x1F595,
+ [INUP] = 0x1F446,
+ [THDN] = 0x1F44E,
+ [THUP] = 0x1F44D
};
-
// Layouts
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP(\
@@ -129,7 +143,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TD(TD_CTCPS),KC_LGUI,KC_LALT, KC_SPC, KC_LEAD,KC_RGUI, KC_APP,MO(1) , KC_LEFT,KC_DOWN,KC_RGHT, KC_P0,KC_PDOT),
[1] = KEYMAP(\
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK,KC_PAUS, \
- TD(EMOJIS),TD(ANIMAL),X(THINK),X(SMRK),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
+ TD(EMOJIS),TD(ANIMAL),TD(HAND),X(SMRK),X(WEARY),X(UNAMU), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL,KC_BSPC, KC_MPRV,KC_MPLY,KC_MNXT, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \
KC_TAB, KC_Q, M(0), KC_E, KC_R,X(EGGPL),X(WATER), KC_U, KC_I, KC_O, KC_P, KC_UP ,KC_RBRC,KC_BSLS, KC_MUTE,KC_VOLD,KC_VOLU, KC_P7, KC_P8, KC_P9,KC_PPLS, \
KC_LCTL, M(1), M(3), M(2), KC_F, X(LIT), X(SNEK), KC_J, KC_K, KC_L,KC_LEFT,KC_RGHT, KC_ENT, KC_P4, KC_P5, KC_P6, \
KC_LSFT,KC_NUBS, KC_Z, KC_X, KC_C, X(HUNDR), X(BBB), X(POO), KC_M,KC_COMM, KC_DOT,KC_DOWN, KC_RSFT, KC_MS_U, KC_P1, KC_P2, KC_P3,KC_PENT, \
@@ -150,7 +164,7 @@ void matrix_scan_user(void) {
leading = false;
leader_end();
- SEQ_TWO_KEYS(KC_A, KC_A) {
+ SEQ_TWO_KEYS(KC_A, KC_A) { // select all and copy
register_code(KC_LCTL);
tap(KC_A);
tap(KC_C);
@@ -180,7 +194,7 @@ void cycleEmojis(qk_tap_dance_state_t *state, void *user_data) {
}
};
-void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
+void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
if(state->count == 1) {
unicode_input_start();
register_hex32(pgm_read_dword(&unicode_map[state->count+5]));
@@ -194,7 +208,17 @@ void cycleAnimals(qk_tap_dance_state_t *state, void *user_data) {
}
};
-void resetEmojis(qk_tap_dance_state_t *state, void *user_data) {
-
+void cycleHands(qk_tap_dance_state_t *state, void *user_data) {
+ if(state->count == 1) {
+ unicode_input_start();
+ register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
+ unicode_input_finish();
+ }
+ else if(state->count <= 5) {
+ tap(KC_BSPC);
+ unicode_input_start();
+ register_hex32(pgm_read_dword(&unicode_map[state->count+10]));
+ unicode_input_finish();
+ }
};