diff options
-rw-r--r-- | keyboards/dz60/keymaps/draevin/keymap.c | 46 | ||||
-rw-r--r-- | keyboards/keebio/quefrency/keymaps/draevin/keymap.c | 60 | ||||
-rw-r--r-- | keyboards/keebio/quefrency/keymaps/draevin/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/keebio/sinc/keymaps/draevin/keymap.c | 47 | ||||
-rw-r--r-- | users/draevin/LICENSE | 14 | ||||
-rw-r--r-- | users/draevin/README.md | 38 | ||||
-rw-r--r-- | users/draevin/config.h | 26 | ||||
-rw-r--r-- | users/draevin/draevin.c | 59 | ||||
-rw-r--r-- | users/draevin/draevin.h | 39 | ||||
-rw-r--r-- | users/draevin/rules.mk | 12 | ||||
-rw-r--r-- | users/draevin/wrappers.h | 49 |
11 files changed, 391 insertions, 0 deletions
diff --git a/keyboards/dz60/keymaps/draevin/keymap.c b/keyboards/dz60/keymaps/draevin/keymap.c new file mode 100644 index 0000000000..b22dfb5561 --- /dev/null +++ b/keyboards/dz60/keymaps/draevin/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "draevin.h" + +#define LAYOUT_wrapped(...) LAYOUT(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_CM] = LAYOUT_wrapped ( + HYPR_T(KC_ESC), ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_LBRC, KC_RBRC, KC_BSLS, + KC_BSPC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_ENT, + TD(TD_CAPS), XXXXXXX, _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_RSFT, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_RCTL, KC_RALT, XXXXXXX, KC_RGUI, KC_HYPR + ), + + [_QW] = LAYOUT_wrapped ( + HYPR_T(KC_ESC), ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, KC_BSLS, + KC_BSPC, _________________QWERTY_L2_________________, _________________QWERTY_L2_________________, KC_QUOT, KC_ENT, + TD(TD_CAPS), XXXXXXX, _________________QWERTY_L3_________________, _________________QWERTY_L3_________________, KC_RSFT, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_SPC, KC_RCTL, KC_RALT, XXXXXXX, KC_RGUI, KC_HYPR + ), + + [_FN] = LAYOUT_wrapped ( + KC_GRV, _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, _______, _______, + _______, ___________________FN_L1___________________, ___________________FN_R1___________________, _______, _______, KC_MAKE, + _______, ___________________FN_L2___________________, ___________________FN_R2___________________, _______, _______, + _______, XXXXXXX, ___________________BLANK___________________, ___________________FN_R3___________________, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CM_QW + ) +}; diff --git a/keyboards/keebio/quefrency/keymaps/draevin/keymap.c b/keyboards/keebio/quefrency/keymaps/draevin/keymap.c new file mode 100644 index 0000000000..7e6291579a --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/draevin/keymap.c @@ -0,0 +1,60 @@ +/* Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "draevin.h" + +#define LAYOUT_65wm_wrapped(...) LAYOUT_65_with_macro(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_CM] = LAYOUT_65wm_wrapped( + HYPR_T(KC_MPLY), KC_ESC, KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_MPRV, KC_MNXT, KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_F15, KC_F16, KC_BSPC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_ENT, KC_END, + KC_F17, KC_F18, TD(TD_CAPS), _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_RSFT, KC_UP, MO(_FN), + KC_F19, KC_F20, KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_QW] = LAYOUT_65wm_wrapped( + HYPR_T(KC_MPLY), KC_ESC, KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_MPRV, KC_MNXT, KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_F15, KC_F16, KC_BSPC, _________________QWERTY_L2_________________, _________________QWERTY_L2_________________, KC_QUOT, KC_ENT, KC_END, + KC_F17, KC_F18, TD(TD_CAPS), _________________QWERTY_L3_________________, _________________QWERTY_L3_________________, KC_RSFT, KC_UP, MO(_FN), + KC_F19, KC_F20, KC_LCTL, KC_LGUI, KC_LALT, MO(_FN), KC_SPC, XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_65wm_wrapped( + _______, _______, _______, _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, XXXXXXX, _______, _______, + RGB_TOG, RGB_MOD, _______, ___________________FN_L1___________________, ___________________FN_R1___________________, _______, _______, KC_MAKE, KC_PGUP, + _______, _______, KC_DEL, ___________________FN_L2___________________, ___________________FN_R2___________________, _______, _______, KC_PGDN, + _______, _______, _______, ___________________BLANK___________________, ___________________FN_R3___________________, _______, _______, _______, + _______, CM_QW, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______//_______ + ), +}; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (layer_state_is(_FN)) { + if (clockwise) { + tap_code(KC_PGDN); + } else { + tap_code(KC_PGUP); + } + } else { + if (clockwise) { + tap_code(KC_VOLU); + } else { + tap_code(KC_VOLD); + } + } +} diff --git a/keyboards/keebio/quefrency/keymaps/draevin/rules.mk b/keyboards/keebio/quefrency/keymaps/draevin/rules.mk new file mode 100644 index 0000000000..fcfd2225bc --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/draevin/rules.mk @@ -0,0 +1 @@ +EXTRAKEY_ENABLE = yes diff --git a/keyboards/keebio/sinc/keymaps/draevin/keymap.c b/keyboards/keebio/sinc/keymaps/draevin/keymap.c new file mode 100644 index 0000000000..d9d4be1b2b --- /dev/null +++ b/keyboards/keebio/sinc/keymaps/draevin/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "draevin.h" + +#define LAYOUT_80_wrapper(...) LAYOUT_80(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_CM] = LAYOUT_80_wrapper( + HYPR_T(KC_ESC), _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, KC_F13, KC_HYPR, + KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_TAB, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_BSPC, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, KC_ENT, KC_END, + TD(TD_CAPS), _________________COLEMAK_L3________________, _________________COLEMAK_R3________________, KC_RSFT, KC_UP, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, MO(_FN), XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_QW] = LAYOUT_80_wrapper( + HYPR_T(KC_ESC), _________________FROW_LEFT_________________, _________________FROW_RIGHT________________, KC_F11, KC_F12, KC_F13, KC_HYPR, + KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_DEL, + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_L1_________________, KC_LBRC, KC_RBRC, KC_BSLS, KC_HOME, + KC_BSPC, _________________QWERTY_L2_________________, _________________QWERTY_L2_________________, KC_QUOT, KC_ENT, KC_END, + TD(TD_CAPS), _________________QWERTY_L3_________________, _________________QWERTY_L3_________________, KC_RSFT, KC_UP, MO(_FN), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, XXXXXXX, MO(_FN), XXXXXXX, KC_SPC, KC_RCTL, KC_RALT, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = LAYOUT_80_wrapper( + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, _______, CM_QW, + _______, ___________________BLANK___________________, ___________________BLANK___________________, ___________________BLANK___________________, + _______, ___________________FN_L1___________________, ___________________FN_R1___________________, _______, _______, KC_MAKE, KC_PGUP, + _______, ___________________FN_L2___________________, ___________________FN_R2___________________, _______, _______, KC_PGDN, + _______, ___________________BLANK___________________, ___________________FN_R3___________________, _______, _______, _______, + _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, _______ + ), +}; diff --git a/users/draevin/LICENSE b/users/draevin/LICENSE new file mode 100644 index 0000000000..33c17847d9 --- /dev/null +++ b/users/draevin/LICENSE @@ -0,0 +1,14 @@ +Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + +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 <http://www.gnu.org/licenses/>. diff --git a/users/draevin/README.md b/users/draevin/README.md new file mode 100644 index 0000000000..e635fdf22f --- /dev/null +++ b/users/draevin/README.md @@ -0,0 +1,38 @@ +# Userspace - Draevin + +## Notable Files + +- [draevin.h](draevin.h) - Standard layers, keys, and tap dance key and config for all my boards +- [draevin.c](draevin.c) - Colemak/QWERTY switch, KC_MAKE, and Shift/CAPS TD +- [wrappers](wrappers.h) - QWERTY, Colemak, F Row, Num Row, and `_FN` layer layout wrappers + +## Keymap themes + +Some general ideas shared between my maps + +- Colemak and QWERTY layouts + - In wrappers + - All are Colemak default with `CM_QW` switch +- Nav and punctuation `_FN` layer + - In wrappers + - Right hand home arrows + - Pinky `HOME`/`END` for ***speed*** + - Inner grouping symbols to decrease reach +- Split space + - Left thumb `MO(_FN)` is standard, but on the wrong side in the Quefrency map (silly soldering error, but not bad enough to fix) + - Quefrency is still *technically* split though, right? `*<:^)` +- Re-organized right mods + - Personal preference on wanting easier right thumb `CTRL` +- Real `DEL` key + - I can't seem to get away from it with layering, so all my maps have a delete key + - Sinc/Quefrency have it in the +5 column on the right + - DZ60 has it in the split backspace +- `KC_MAKE` + +## Keymaps + +- [DZ60](../../keyboards/dz60/keymaps/draevin/keymap.c) +- [Sinc 80](../../keyboards/keebio/sinc/keymaps/draevin/keymap.c) +- [Quefrency 65 w/ Macro](../../keyboards/keebio/quefrency/keymaps/draevin/keymap.c) + - Horribly under-utilized macro block because I thought I needed more keys than I actually do (so sad) + - Left side volume and paging rotary diff --git a/users/draevin/config.h b/users/draevin/config.h new file mode 100644 index 0000000000..9a3bb74374 --- /dev/null +++ b/users/draevin/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#define TAPPING_TOGGLE 2 +#define TAPPING_TERM 150 + +#define MOUSEKEY_WHEEL_DELAY 20 +#define MOUSEKEY_WHEEL_INTERVAL 80 +#define MOUSEKEY_WHEEL_MAX_SPEED 4 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 30
\ No newline at end of file diff --git a/users/draevin/draevin.c b/users/draevin/draevin.c new file mode 100644 index 0000000000..95570bf377 --- /dev/null +++ b/users/draevin/draevin.c @@ -0,0 +1,59 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + +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 <http://www.gnu.org/licenses/>. +*/ + +#include "draevin.h" + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CM_QW: // Switch between Colemak and QWERTY + if (record->event.pressed) { + layer_invert(_CM); + layer_invert(_QW); + } + return false; + case KC_MAKE: + if (!record->event.pressed) { + SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP ":flash\n"); + reset_keyboard(); + } + break; + case PRNPAIR: + if (record->event.pressed) { + SEND_STRING("()"); + tap_code(KC_LEFT); + } + break; + case BRCPAIR: + if (record->event.pressed) { + uint8_t shifted = get_mods() & (MOD_MASK_SHIFT); + if (shifted) { + unregister_code(KC_LSFT); + unregister_code(KC_RSFT); + SEND_STRING("{}"SS_TAP(X_LEFT)); + } + else { + SEND_STRING("[]"SS_TAP(X_LEFT)); + } + } + break; + } + return true; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) // shift/caps TD +}; diff --git a/users/draevin/draevin.h b/users/draevin/draevin.h new file mode 100644 index 0000000000..20dc77d993 --- /dev/null +++ b/users/draevin/draevin.h @@ -0,0 +1,39 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include QMK_KEYBOARD_H +#include "wrappers.h" + +enum my_layers { + _CM, + _QW, + _FN, +}; + +enum my_keycodes { + CM_QW = SAFE_RANGE, // Switch between Colemak and QWERTY + KC_MAKE, + PRNPAIR, + BRCPAIR, + NEW_SAFE_RANGE +}; + +enum my_taps { + TD_CAPS // shift/caps TD +}; diff --git a/users/draevin/rules.mk b/users/draevin/rules.mk new file mode 100644 index 0000000000..7d67404930 --- /dev/null +++ b/users/draevin/rules.mk @@ -0,0 +1,12 @@ +SRC += draevin.c + +LTO_ENABLE = yes +MOUSEKEY_ENABLE = yes +RGBLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes + +AUDIO_ENABLE = no +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +CONSOLE_ENABLE = no +SLEEP_LED_ENABLE = no
\ No newline at end of file diff --git a/users/draevin/wrappers.h b/users/draevin/wrappers.h new file mode 100644 index 0000000000..006a9aa996 --- /dev/null +++ b/users/draevin/wrappers.h @@ -0,0 +1,49 @@ +/* +Copyright 2020 Copyright 2020 Draevin Luke <contact@drae.vin> @draevin + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#define ___________________BLANK___________________ _______, _______, _______, _______, _______ + +#define _________________FROW_LEFT_________________ KC_F1, KC_F2, KC_F3, KC_F4, KC_F5 +#define _________________FROW_RIGHT________________ KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 + +#define ________________NUMBER_LEFT________________ KC_1, KC_2, KC_3, KC_4, KC_5 +#define ________________NUMBER_RIGHT_______________ KC_6, KC_7, KC_8, KC_9, KC_0 + +#define _________________COLEMAK_L1________________ KC_Q, KC_W, KC_F, KC_P, KC_G +#define _________________COLEMAK_L2________________ KC_A, KC_R, KC_S, KC_T, KC_D +#define _________________COLEMAK_L3________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________COLEMAK_R1________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _________________COLEMAK_R2________________ KC_H, KC_N, KC_E, KC_I, KC_O +#define _________________COLEMAK_R3________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define _________________QWERTY_L1_________________ KC_Q, KC_W, KC_E, KC_R, KC_T +#define _________________QWERTY_L2_________________ KC_A, KC_S, KC_D, KC_F, KC_G +#define _________________QWERTY_L3_________________ KC_Z, KC_X, KC_C, KC_V, KC_B + +#define _________________QWERTY_R1_________________ KC_Y, KC_U, KC_I, KC_O, KC_P +#define _________________QWERTY_R2_________________ KC_H, KC_J, KC_K, KC_L, KC_SCLN +#define _________________QWERTY_R3_________________ KC_N, KC_M, KC_COMM, KC_DOT, KC_SLASH + +#define ___________________FN_L1___________________ _______, _______, KC_WH_U, _______, BRCPAIR +#define ___________________FN_L2___________________ KC_HOME, _______, KC_WH_D, _______, PRNPAIR + +#define ___________________FN_R1___________________ KC_RBRC, _______, KC_UP, _______, _______ +#define ___________________FN_R2___________________ KC_RPRN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END +#define ___________________FN_R3___________________ _______, _______, RGB_TOG, RGB_MOD, KC_BSLS |