aboutsummaryrefslogtreecommitdiffstats
path: root/users/drashna
diff options
context:
space:
mode:
authorGravatar Drashna Jaelre <drashna@live.com>2018-05-08 18:46:29 -0700
committerGravatar skullydazed <skullydazed@users.noreply.github.com>2018-09-25 13:28:36 -0700
commite72e4b6920299176a322a2862f930b7ee5f73dff (patch)
tree1bd34f2b6fe46d08589699d5b47c984fc66d26f7 /users/drashna
parentb7e25f9ec4203670f2434e82608554ba284cf1f3 (diff)
downloadqmk_firmware-e72e4b6920299176a322a2862f930b7ee5f73dff.tar.gz
Store Clicky status in EEPROM
Diffstat (limited to 'users/drashna')
-rw-r--r--users/drashna/drashna.c28
-rw-r--r--users/drashna/drashna.h3
2 files changed, 21 insertions, 10 deletions
diff --git a/users/drashna/drashna.c b/users/drashna/drashna.c
index 20df2f4de..7bb272a26 100644
--- a/users/drashna/drashna.c
+++ b/users/drashna/drashna.c
@@ -133,9 +133,6 @@ void led_set_keymap(uint8_t usb_led) {}
void matrix_init_user(void) {
userspace_config.raw = eeprom_read_byte(EECONFIG_USERSPACE);
-#ifdef AUDIO_CLICKY
- clicky_enable = userspace_config.clicky_enable;
-#endif
#ifdef BOOTLOADER_CATERINA
DDRD &= ~(1<<5);
@@ -145,7 +142,6 @@ void matrix_init_user(void) {
PORTB &= ~(1<<0);
#endif
-
#if (defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE))
set_unicode_input_mode(UC_WINC);
#endif //UNICODE_ENABLE
@@ -338,11 +334,27 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return false; break;
- case CLICKY_TOGGLE:
-#ifdef AUDIO_CLICKY
- userspace_config.clicky_enable = clicky_enable;
- eeprom_update_byte(EECONFIG_USERSPACE, userspace_config.raw);
+ 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: // (╯°□°)╯ ︵ ┻━┻
diff --git a/users/drashna/drashna.h b/users/drashna/drashna.h
index dd0d1c0d7..de8c3ba94 100644
--- a/users/drashna/drashna.h
+++ b/users/drashna/drashna.h
@@ -49,7 +49,7 @@ enum userspace_layers {
// RGB color codes are no longer located here anymore. Instead, you will want to
// head to https://github.com/qmk/qmk_firmware/blob/master/quantum/rgblight_list.h
-extern bool clicky_enable;
+extern bool rgb_layer_change;
#ifdef RGBLIGHT_ENABLE
void rgblight_sethsv_default_helper(uint8_t index);
@@ -64,7 +64,6 @@ bool mod_key_press (uint16_t code, uint16_t mod_code, bool pressed, uint16_t thi
typedef union {
uint8_t raw;
struct {
- bool clicky_enable :1;
bool rgb_layer_change :1;
bool is_overwatch :1;
bool nuke_switch :1;