summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2018-04-20 17:53:19 -0700
committerGitHub <noreply@github.com>2018-04-20 17:53:19 -0700
commit1bb77c087502de19fe5e403f519be321ba2c85f5 (patch)
tree90c7e0c619bd526a0fa61313943dbacee399dea4 /users
parent4e4101efdf1e1d954ccec4aa9be05234e2a699fa (diff)
Update to drashna keymaps and userspace (#2756)
* Re-add NO_SECRETS option * Add Thumb Clusters defines for default layout * Minor tweaks * More Minor tweaks * Revert Orthodox layers and move function keys around * Fix keymap so it will compile under the Infinity Since I haven't added 'pretty' layouts to it yet * Cleanup of userspace * Cleanup keymaps * OMG fix Workman * Move mods layer key around * Reduce debounce in Ergodox EZ * Fix Infinity layers * Add list of pins used by Ergdox EZ for easy reference * Revert "Reduce debounce in Ergodox EZ" This reverts commit 8a3db2673b419ef8032c40a6d29156cef632f9cd. * Add Clicky toggle to Orthodox * Fix Audio Clicky keycode * Enable Faux Clicky by default * Add Unicode stuff
Diffstat (limited to 'users')
-rw-r--r--users/drashna/config.h7
-rw-r--r--users/drashna/drashna.c68
-rw-r--r--users/drashna/drashna.h125
-rw-r--r--users/drashna/rules.mk4
4 files changed, 171 insertions, 33 deletions
diff --git a/users/drashna/config.h b/users/drashna/config.h
index f9b0d4d17a..e48f72355b 100644
--- a/users/drashna/config.h
+++ b/users/drashna/config.h
@@ -4,6 +4,7 @@
#ifdef AUDIO_ENABLE
#define AUDIO_CLICKY
+#define AUDIO_CLICKY_ON
#define STARTUP_SONG SONG(E1M1_DOOM)
#define GOODBYE_SONG SONG(SONIC_RING)
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
@@ -16,7 +17,7 @@
#ifdef RGBLIGHT_ENABLE
#ifndef KEYBOARD_ergodox_ez
#define RGBLIGHT_SLEEP
- #endif
+ #endif // !KEYBOARD_ergodox_ez
#endif // RGBLIGHT_ENABLE
@@ -51,8 +52,8 @@
#ifdef TAPPING_TERM
#undef TAPPING_TERM
-#endif
-#define TAPPING_TERM 160
+#endif // TAPPING_TERM
+#define TAPPING_TERM 176
// Disable action_get_macro and fn_actions, since we don't use these
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 73bd249e4c..d9d412b086 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -41,8 +41,13 @@ float fauxclicky_pressed[][2] = SONG(S__NOTE(_A6)); // change to you
float fauxclicky_released[][2] = SONG(S__NOTE(_A6)); // change to your tastes
#endif // FAUXCLICKY_ENABLE
+float tone_copy[][2] = SONG(SCROLL_LOCK_ON_SOUND);
+float tone_paste[][2] = SONG(SCROLL_LOCK_OFF_SOUND);
+
+
bool faux_click_enabled = false;
bool is_overwatch = false;
+static uint16_t copy_paste_timer;
#ifdef RGBLIGHT_ENABLE
bool rgb_layer_change = true;
#endif
@@ -198,17 +203,21 @@ void matrix_scan_user(void) {
matrix_scan_keymap();
}
+void tap(uint16_t keycode){
+ register_code(keycode);
+ unregister_code(keycode);
+};
+
// This block is for all of the gaming macros, as they were all doing
// the same thing, but with differring text sent.
bool send_game_macro(const char *str, keyrecord_t *record, bool override) {
if (!record->event.pressed || override) {
clear_keyboard();
- register_code(is_overwatch ? KC_BSPC : KC_ENTER);
- unregister_code(is_overwatch ? KC_BSPC : KC_ENTER);
+ tap(is_overwatch ? KC_BSPC : KC_ENTER);
wait_ms(50);
send_string(str);
- register_code(KC_ENTER);
- unregister_code(KC_ENTER);
+ wait_ms(50);
+ tap(KC_ENTER);
}
if (override) wait_ms(3000);
return false;
@@ -402,6 +411,56 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
}
return true; break;
#endif // RGBLIGHT_ENABLE
+
+
+ case KC_CCCV: // One key copy/paste
+ if(record->event.pressed){
+ copy_paste_timer = timer_read();
+ } else {
+ if (timer_elapsed(copy_paste_timer) > TAPPING_TERM) { // Hold, copy
+ register_code(KC_LCTL);
+ tap(KC_C);
+ unregister_code(KC_LCTL);
+#ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_copy);
+#endif
+ } else { // Tap, paste
+ register_code(KC_LCTL);
+ tap(KC_V);
+ unregister_code(KC_LCTL);
+#ifdef AUDIO_ENABLE
+ PLAY_SONG(tone_paste);
+#endif
+ }
+ }
+ return false;
+ break;
+
+#ifdef UNICODE_ENABLE
+ case UC_FLIP: // (╯°□°)╯ ︵ ┻━┻
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ tap(KC_9);
+ unregister_code(KC_RSFT);
+ process_unicode((0x256F | QK_UNICODE), record); // Arm
+ process_unicode((0x00B0 | QK_UNICODE), record); // Eye
+ process_unicode((0x25A1 | QK_UNICODE), record); // Mouth
+ process_unicode((0x00B0 | QK_UNICODE), record); // Eye
+ register_code(KC_RSFT);
+ tap(KC_0);
+ unregister_code(KC_RSFT);
+ process_unicode((0x256F | QK_UNICODE), record); // Arm
+ tap(KC_SPC);
+ process_unicode((0x0361 | QK_UNICODE), record); // Flippy
+ tap(KC_SPC);
+ process_unicode((0x253B | QK_UNICODE), record); // Table
+ process_unicode((0x2501 | QK_UNICODE), record); // Table
+ process_unicode((0x253B | QK_UNICODE), record); // Table
+ }
+ return false;
+ break;
+#endif // UNICODE_ENABLE
+
}
return process_record_keymap(keycode, record);
}
@@ -413,6 +472,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
uint32_t layer_state_set_user(uint32_t state) {
#ifdef RGBLIGHT_ENABLE
uint8_t default_layer = eeconfig_read_default_layer();
+
if (rgb_layer_change) {
switch (biton32(state)) {
case _NAV:
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index b7cbaa44af..746c7e20a0 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -20,25 +20,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "quantum.h"
// Define layer names
-#define _QWERTY 0
-#define _NUMLOCK 0
-#define _COLEMAK 1
-#define _DVORAK 2
-#define _WORKMAN 3
-#define _MODS 4
-//#define _MISC 5
-#define _NAV 6
-#define _COVECUBE 7
-#define _SYMB 8
-#define _GAMEPAD 9
-#define _DIABLO 10
-#define _MOUS 11
-#define _MACROS 12
-#define _MEDIA 13
-#define _LOWER 14
-#define _RAISE 15
-#define _ADJUST 16
-
+enum userspace_layers {
+ _QWERTY = 0,
+ _NUMLOCK = 0,
+ _COLEMAK,
+ _DVORAK,
+ _WORKMAN,
+ _MODS,
+ _NAV,
+ _COVECUBE,
+ _SYMB,
+ _GAMEPAD,
+ _DIABLO,
+ _MOUS,
+ _MACROS,
+ _MEDIA,
+ _LOWER,
+ _RAISE,
+ _ADJUST,
+};
//define modifiers
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
@@ -83,6 +83,10 @@ enum userspace_custom_keycodes {
KC_SECRET_3,
KC_SECRET_4,
KC_SECRET_5,
+ KC_CCCV,
+#ifdef UNICODE_ENABLE
+ UC_FLIP,
+#endif //UNICODE_ENABLE
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
};
@@ -107,6 +111,72 @@ enum {
};
#endif // TAP_DANCE_ENABLE
+#ifdef UNICODEMAP_ENABLE
+
+/* use X(n) to call the */
+
+
+enum unicode_name {
+ THINK, // thinking face 🤔
+ GRIN, // grinning face 😊
+ SMRK, // smirk 😏
+ WEARY, // good shit 😩
+ UNAMU, // unamused 😒
+
+ SNEK, // snke 🐍
+ PENGUIN, // 🐧
+ DRAGON, // 🐉
+ MONKEY, // 🐒
+ CHICK, // 🐥
+
+ OKOK, // 👌
+ EFFU, // 🖕
+ INUP, // 👆
+ THUP, // 👍
+ THDN, // 👎
+
+ BBB, // dat B 🅱
+ POO, // poop 💩
+ HUNDR, // 100 💯
+ EGGPL, // EGGPLANT 🍆
+ WATER, // wet 💦
+ TUMBLER, // 🥃
+
+ LIT, // fire 🔥
+ IRONY, // ‽
+ DEGREE, // °
+};
+
+
+const uint32_t PROGMEM unicode_map[] = {
+ [THINK] = 0x1F914,
+ [GRIN] = 0x1F600,
+ [BBB] = 0x1F171,
+ [POO] = 0x1F4A9,
+ [HUNDR] = 0x1F4AF,
+ [SMRK] = 0x1F60F,
+ [WEARY] = 0x1F629,
+ [EGGPL] = 0x1F346,
+ [WATER] = 0x1F4A6,
+ [LIT] = 0x1F525,
+ [UNAMU] = 0x1F612,
+ [SNEK] = 0x1F40D,
+ [PENGUIN] = 0x1F427,
+ [BOAR] = 0x1F417,
+ [MONKEY] = 0x1F412,
+ [CHICK] = 0x1F425,
+ [DRAGON] = 0x1F409,
+ [OKOK] = 0x1F44C,
+ [EFFU] = 0x1F595,
+ [INUP] = 0x1F446,
+ [THDN] = 0x1F44E,
+ [THUP] = 0x1F44D,
+ [TUMBLER] = 0x1F943,
+ [IRONY] = 0x0203D,
+ [DEGREE] = 0x000B0,
+ };
+
+#endif //UNICODEMAP_ENABLE
// Custom Keycodes for Diablo 3 layer
// But since TD() doesn't work when tap dance is disabled
@@ -199,13 +269,13 @@ enum {
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
-#define _________________WORKMAN_L1________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
-#define _________________WORKMAN_L2________________ KC_A, KC_O, KC_E, KC_U, KC_I
-#define _________________WORKMAN_L3________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
+#define _________________WORKMAN_L1________________ KC_Q, KC_D, KC_R, KC_W, KC_B
+#define _________________WORKMAN_L2________________ KC_A, KC_S, KC_H, KC_T, KC_G
+#define _________________WORKMAN_L3________________ CTL_T(KC_Z), KC_X, KC_M, KC_C, KC_V
-#define _________________WORKMAN_R1________________ KC_F, KC_G, KC_C, KC_R, KC_L
-#define _________________WORKMAN_R2________________ KC_D, KC_H, KC_T, KC_N, KC_S
-#define _________________WORKMAN_R3________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
+#define _________________WORKMAN_R1________________ KC_J, KC_F, KC_U, KC_P, KC_SCLN
+#define _________________WORKMAN_R2________________ KC_Y, KC_N, KC_E, KC_O, KC_I
+#define _________________WORKMAN_R3________________ KC_K, KC_L, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K
@@ -226,4 +296,9 @@ enum {
#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+#define __________________ERGODOX_THUMB_CLUSTER_____________________ ALT_T(KC_APP), KC_LGUI, KC_RGUI, CTL_T(KC_ESCAPE), \
+ KC_HOME, KC_PGUP, \
+ KC_SPACE,KC_BSPC, KC_END, KC_PGDN, KC_DEL, KC_ENTER
+
+
#endif
diff --git a/users/drashna/rules.mk b/users/drashna/rules.mk
index 062ecd3c49..123c0cc70a 100644
--- a/users/drashna/rules.mk
+++ b/users/drashna/rules.mk
@@ -2,4 +2,6 @@
SRC += drashna.c
EXTRAFLAGS += -flto
-
+ifeq ($(strip $(NO_SECRETS)), yes)
+ OPT_DEFS += -DNO_SECRETS
+endif