[Keymap] Add Draevin userspace and maps (#10581)

* Initial userspace

* DZ60 map

* Quefrency map

* Sinc map

* Set up MAKE key for all personal maps

* Light userspace cleanup

* Formatting and comments zzz...

* Licensing and userspace README

* Swap: EXTRAFLAGS -> LTO_ENABLE in userspace rules.mk

Co-authored-by: Ryan <fauxpark@gmail.com>

* Improve KC_MAKE: KC_ENT -> \n

Co-authored-by: Ryan <fauxpark@gmail.com>

* Swap left grouping on _FN for pairs

* Add '?' -> backslash on _FN

* Remove commented code

* Organize lines in rules.mk

* Add left hand scroll keys

* Move configs to config.h

* License blitz

Co-authored-by: Ryan <fauxpark@gmail.com>
master
Draevin 2020-10-22 19:46:46 -07:00 committed by GitHub
parent 2b9b267e8e
commit 619eb0071e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 391 additions and 0 deletions

View File

@ -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
)
};

View File

@ -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);
}
}
}

View File

@ -0,0 +1 @@
EXTRAKEY_ENABLE = yes

View File

@ -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___________________, _______, _______, _______
),
};

14
users/draevin/LICENSE Normal file
View File

@ -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/>.

38
users/draevin/README.md Normal file
View File

@ -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

26
users/draevin/config.h Normal file
View File

@ -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

59
users/draevin/draevin.c Normal file
View File

@ -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
};

39
users/draevin/draevin.h Normal file
View File

@ -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
};

12
users/draevin/rules.mk Normal file
View File

@ -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

49
users/draevin/wrappers.h Normal file
View File

@ -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