From ba13127c045d653929b554d2444ce31caba59502 Mon Sep 17 00:00:00 2001 From: starcalleramethyst <58349097+starcalleramethyst@users.noreply.github.com> Date: Fri, 13 Dec 2019 11:12:45 -0600 Subject: New RGBKB Zen Rev1 keymap (#7609) * adding my zen 1 keymap updated layers and custom keycodes * added slack + paste defined custom keycode S_H_P and added to layer 3 * added custom keycodes defined and inserted T_H_B and T_H_T * enabled tap dance adjusted rules to include tap dance * tap dance enumeration and timing added a TD key to send space on press and . on double tap. added tapping term to set tap detection time. * added custom keycode added E_SS to print string * added mouskey + enum keycode added in mousekey to rules. added custom code DC_C to double click and copy. * updated custom keycode string added a space into the output string for S_H_P * removed colemak layer colemak commented out, started adjusting MOs * added 1 key copy paste used from https://github.com/qmk/qmk_firmware/blob/master/users/drashna/process_records.c#L116-L130 * updated rgb and copyright line * updated tapcode KC_CCCV * Update keyboards/rgbkb/zen/rev1/keymaps/starcaller_v1.1/config.h Co-Authored-By: Drashna Jaelre * updated keymap folder name to my username --- .../zen/rev1/keymaps/starcalleramethyst/config.h | 38 ++++++ .../zen/rev1/keymaps/starcalleramethyst/keymap.c | 148 +++++++++++++++++++++ .../zen/rev1/keymaps/starcalleramethyst/rules.mk | 3 + 3 files changed, 189 insertions(+) create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c create mode 100644 keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h new file mode 100644 index 0000000000..d3d1a60ca9 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h @@ -0,0 +1,38 @@ +/* +Copyright 2019 starcalleramethyst + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#pragma once + + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define TAPPING_TERM 200 diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c new file mode 100644 index 0000000000..b9b21102b1 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/keymap.c @@ -0,0 +1,148 @@ +#include QMK_KEYBOARD_H + +uint16_t copy_paste_timer; + +enum custom_keycodes { + S_H = SAFE_RANGE, // slack here + S_H_P, // slack here + paste + T_H_B, // ticket header bike + T_H_T, // ticket header tread + E_OP, // email open + E_CL, // email close + E_FU, // email follow up + E_SS, // email service schedule + SCRN_C, // screen clip + DC_C, // double click + copy + KC_CCCV, // one key copy/paste + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + case S_H: + if (record->event.pressed) { + SEND_STRING("@HERE"); + } + break; + + case S_H_P: + if (record->event.pressed) { + SEND_STRING("@HERE" SS_TAP(X_SPC) SS_LCTL("v")); + } + break; + + case T_H_B: + if (record->event.pressed) { + SEND_STRING("Your Peloton Bike - "); + } + break; + + case T_H_T: + if (record->event.pressed) { + SEND_STRING("Your Peloton Tread - "); + } + break; + + case E_OP: + if (record->event.pressed) { + // when keycode E_OP is pressed + SEND_STRING("Hi , "SS_TAP(X_ENTER)SS_TAP(X_ENTER)"Thank you for contacting Peloton."SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + } +break; + + case E_CL: + if (record->event.pressed) { + SEND_STRING("Please let me know if you have any other questions."SS_TAP(X_ENTER)SS_TAP(X_ENTER)"Thank you for being the best part of Peloton."); + } +break; + + case E_FU: + if (record->event.pressed) { + SEND_STRING("I will be personally watching this issue and will reach out to you after this is complete to make sure everything went smoothly."SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + } +break; + + case E_SS: + if (record->event.pressed) { + SEND_STRING("Please click here to schedule your service."SS_TAP(X_ENTER)SS_TAP(X_ENTER)); + } +break; + + case SCRN_C: + if (record->event.pressed) { + tap_code16(C(S(KC_F5))); + } +break; + + case DC_C: + if (record->event.pressed) { + tap_code(KC_BTN1); + tap_code(KC_BTN1); + tap_code16(C(KC_C)); + } +break; + + 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 + tap_code16(C(KC_C)); + } else { // Tap, paste + tap_code16(C(KC_V)); + } + } +break; + + } + return true; +}; + +//Tap Dance Declarations +enum { + TD_SPC_DOT = 0 +}; + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for Esc, twice for Caps Lock + [TD_SPC_DOT] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_PDOT) +// Other declarations would go here, separated by commas, if you have them +}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( +KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, +KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, +KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, +KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SFTENT, +KC_CCCV, KC_LGUI, KC_LALT, RGB_TOG, MO(1), TD(TD_SPC_DOT), KC_BSPC, KC_ENT, TD(TD_SPC_DOT), MO(2), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN), + + [1] = LAYOUT( +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_TRNS, RGB_SAI, RGB_VAI, RGB_SAD, RESET, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME, +KC_CAPS, RGB_HUD, RGB_VAD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END, +KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, +KC_NO, KC_LGUI, KC_LALT, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, KC_VOLD), + +/* [2] = LAYOUT( +KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6,KC_7, KC_8, KC_9, KC_0, KC_BSLS, +KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, +KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, +KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, +KC_LCTL, KC_LGUI, KC_LALT, KC_NO, TO(0), KC_SPC, KC_BSPC, KC_ENT, KC_SPC, TO(0), KC_MINS, KC_EQL, KC_PGUP, KC_PGDN), +*/ + [2] = LAYOUT( +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +KC_NO, KC_NO, KC_NO, KC_NO, S_H_P, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +KC_NO, E_CL, E_FU, E_OP, S_H, SCRN_C, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +KC_NO, DC_C, E_SS, T_H_T, T_H_B, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, +KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO) + +}; + + diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk new file mode 100644 index 0000000000..8e3e215142 --- /dev/null +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/rules.mk @@ -0,0 +1,3 @@ +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes +MOUSEKEY_ENABLE = yes \ No newline at end of file -- cgit v1.2.1