2017-11-17 19:59:54 +00:00
|
|
|
/*
|
|
|
|
Copyright 2017 Christopher Courtney <drashna@live.com> @drashna
|
|
|
|
|
|
|
|
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/>.
|
|
|
|
*/
|
|
|
|
|
2017-11-07 05:11:08 +00:00
|
|
|
#ifndef USERSPACE
|
|
|
|
#define USERSPACE
|
|
|
|
#include "quantum.h"
|
|
|
|
|
2018-03-25 20:01:15 +00:00
|
|
|
// Define layer names
|
2018-04-21 00:53:19 +00:00
|
|
|
enum userspace_layers {
|
|
|
|
_QWERTY = 0,
|
|
|
|
_NUMLOCK = 0,
|
|
|
|
_COLEMAK,
|
|
|
|
_DVORAK,
|
|
|
|
_WORKMAN,
|
|
|
|
_MODS,
|
|
|
|
_NAV,
|
|
|
|
_COVECUBE,
|
|
|
|
_SYMB,
|
|
|
|
_GAMEPAD,
|
|
|
|
_DIABLO,
|
|
|
|
_MOUS,
|
|
|
|
_MACROS,
|
|
|
|
_MEDIA,
|
|
|
|
_LOWER,
|
|
|
|
_RAISE,
|
|
|
|
_ADJUST,
|
|
|
|
};
|
2017-11-07 05:11:08 +00:00
|
|
|
|
|
|
|
//define modifiers
|
|
|
|
#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))
|
|
|
|
#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL))
|
|
|
|
#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT))
|
2017-11-17 19:59:54 +00:00
|
|
|
#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI))
|
2017-11-07 05:11:08 +00:00
|
|
|
|
2018-04-01 02:38:06 +00:00
|
|
|
// 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
|
2017-11-07 05:11:08 +00:00
|
|
|
|
2017-11-11 03:58:53 +00:00
|
|
|
extern bool is_overwatch;
|
2017-11-17 19:59:54 +00:00
|
|
|
extern bool rgb_layer_change;
|
2017-11-07 05:11:08 +00:00
|
|
|
|
2017-12-14 05:02:48 +00:00
|
|
|
enum userspace_custom_keycodes {
|
|
|
|
EPRM = SAFE_RANGE, // can always be here
|
2017-11-07 05:11:08 +00:00
|
|
|
VRSN,
|
|
|
|
KC_QWERTY,
|
|
|
|
KC_COLEMAK,
|
|
|
|
KC_DVORAK,
|
|
|
|
KC_WORKMAN,
|
|
|
|
LOWER,
|
|
|
|
RAISE,
|
|
|
|
ADJUST,
|
|
|
|
KC_DIABLO_CLEAR,
|
|
|
|
KC_OVERWATCH,
|
|
|
|
KC_SALT,
|
|
|
|
KC_MORESALT,
|
|
|
|
KC_SALTHARD,
|
|
|
|
KC_GOODGAME,
|
|
|
|
KC_SYMM,
|
|
|
|
KC_JUSTGAME,
|
|
|
|
KC_GLHF,
|
|
|
|
KC_TORB,
|
|
|
|
KC_AIM,
|
2017-11-17 19:59:54 +00:00
|
|
|
KC_C9,
|
|
|
|
KC_GGEZ,
|
2017-11-07 05:11:08 +00:00
|
|
|
KC_MAKE,
|
|
|
|
KC_RESET,
|
2017-11-17 19:59:54 +00:00
|
|
|
KC_RGB_T,
|
2017-12-06 02:45:42 +00:00
|
|
|
KC_SECRET_1,
|
|
|
|
KC_SECRET_2,
|
|
|
|
KC_SECRET_3,
|
|
|
|
KC_SECRET_4,
|
|
|
|
KC_SECRET_5,
|
2018-04-21 00:53:19 +00:00
|
|
|
KC_CCCV,
|
|
|
|
#ifdef UNICODE_ENABLE
|
|
|
|
UC_FLIP,
|
|
|
|
#endif //UNICODE_ENABLE
|
2017-11-17 19:59:54 +00:00
|
|
|
NEW_SAFE_RANGE //use "NEWPLACEHOLDER for keymap specific codes
|
|
|
|
};
|
|
|
|
|
2018-03-25 20:01:15 +00:00
|
|
|
#define KC_SEC1 KC_SECRET_1
|
|
|
|
#define KC_SEC2 KC_SECRET_2
|
|
|
|
#define KC_SEC3 KC_SECRET_3
|
|
|
|
#define KC_SEC4 KC_SECRET_4
|
|
|
|
#define KC_SEC5 KC_SECRET_5
|
|
|
|
|
2018-04-01 02:38:06 +00:00
|
|
|
#define QWERTY KC_QWERTY
|
|
|
|
#define DVORAK KC_DVORAK
|
|
|
|
#define COLEMAK KC_COLEMAK
|
|
|
|
#define WORKMAN KC_WORKMAN
|
|
|
|
#define KC_RST KC_RESET
|
|
|
|
|
2017-11-17 19:59:54 +00:00
|
|
|
#ifdef TAP_DANCE_ENABLE
|
|
|
|
enum {
|
|
|
|
TD_D3_1 = 0,
|
|
|
|
TD_D3_2,
|
|
|
|
TD_D3_3,
|
|
|
|
TD_D3_4
|
2017-11-07 05:11:08 +00:00
|
|
|
};
|
2018-03-01 15:46:57 +00:00
|
|
|
#endif // TAP_DANCE_ENABLE
|
|
|
|
|
2018-04-21 00:53:19 +00:00
|
|
|
#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
|
2017-11-17 19:59:54 +00:00
|
|
|
|
2018-03-01 15:46:57 +00:00
|
|
|
// Custom Keycodes for Diablo 3 layer
|
2018-03-25 20:01:15 +00:00
|
|
|
// But since TD() doesn't work when tap dance is disabled
|
|
|
|
// We use custom codes here, so we can substitute the right stuff
|
2018-01-01 22:21:01 +00:00
|
|
|
#ifdef TAP_DANCE_ENABLE
|
|
|
|
#define KC_D3_1 TD(TD_D3_1)
|
|
|
|
#define KC_D3_2 TD(TD_D3_2)
|
|
|
|
#define KC_D3_3 TD(TD_D3_3)
|
|
|
|
#define KC_D3_4 TD(TD_D3_4)
|
2018-03-01 15:46:57 +00:00
|
|
|
#else // TAP_DANCE_ENABLE
|
2018-01-01 22:21:01 +00:00
|
|
|
#define KC_D3_1 KC_1
|
|
|
|
#define KC_D3_2 KC_2
|
|
|
|
#define KC_D3_3 KC_3
|
|
|
|
#define KC_D3_4 KC_4
|
2018-03-01 15:46:57 +00:00
|
|
|
#endif // TAP_DANCE_ENABLE
|
|
|
|
|
|
|
|
// OSM keycodes, to keep things clean and easy to change
|
|
|
|
#define KC_MLSF OSM(MOD_LSFT)
|
|
|
|
#define KC_MRSF OSM(MOD_RSFT)
|
2017-11-17 19:59:54 +00:00
|
|
|
|
2017-11-07 05:11:08 +00:00
|
|
|
|
2018-01-01 22:21:01 +00:00
|
|
|
|
2018-03-25 20:01:15 +00:00
|
|
|
// If we're still using the official Faux Clicky feature, substitute codes
|
2018-03-01 15:46:57 +00:00
|
|
|
// so that we don't have any unused/blank keys.
|
2018-01-17 19:28:23 +00:00
|
|
|
#ifdef FAUXCLICKY_ENABLE
|
|
|
|
#define AUD_ON FC_ON
|
|
|
|
#define AUD_OFF FC_OFF
|
2018-03-01 15:46:57 +00:00
|
|
|
#else // FAUXCLICKY_ENABLE
|
2018-01-17 19:28:23 +00:00
|
|
|
#define AUD_ON AU_ON
|
|
|
|
#define AUD_OFF AU_OFF
|
2018-03-01 15:46:57 +00:00
|
|
|
#endif // FAUXCLICKY_ENABLE
|
2018-01-17 19:28:23 +00:00
|
|
|
|
2018-02-04 18:44:02 +00:00
|
|
|
|
|
|
|
|
2018-03-25 20:01:15 +00:00
|
|
|
// Since our quirky block definitions are basically a list of comma separated
|
|
|
|
// arguments, we need a wrapper in order for these definitions to be
|
2018-02-04 18:44:02 +00:00
|
|
|
// expanded before being used as arguments to the LAYOUT_xxx macro.
|
2018-03-25 20:01:15 +00:00
|
|
|
#if (!defined(LAYOUT) && defined(KEYMAP))
|
|
|
|
#define LAYOUT KEYMAP
|
|
|
|
#endif
|
|
|
|
|
2018-02-04 18:44:02 +00:00
|
|
|
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
2018-03-20 20:57:53 +00:00
|
|
|
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
|
2018-03-25 20:01:15 +00:00
|
|
|
#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__)
|
2018-04-01 02:38:06 +00:00
|
|
|
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
2018-02-04 18:44:02 +00:00
|
|
|
|
2018-03-01 15:46:57 +00:00
|
|
|
|
2018-02-04 18:44:02 +00:00
|
|
|
// Blocks for each of the four major keyboard layouts
|
|
|
|
// Organized so we can quickly adapt and modify all of them
|
|
|
|
// at once, rather than for each keyboard, one at a time.
|
2018-03-25 20:01:15 +00:00
|
|
|
// And this allows for much cleaner blocks in the keymaps.
|
2018-02-04 18:44:02 +00:00
|
|
|
// For instance Tap/Hold for Control on all of the layouts
|
|
|
|
|
2018-03-01 15:46:57 +00:00
|
|
|
// NOTE: These are all the same length. If you do a search/replace
|
|
|
|
// then you need to add/remove underscores to keep the
|
2018-03-25 20:01:15 +00:00
|
|
|
// lengths consistent.
|
2018-03-01 15:46:57 +00:00
|
|
|
|
2018-02-04 18:44:02 +00:00
|
|
|
#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_________________ CTL_T(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, CTL_T(KC_SLASH)
|
|
|
|
|
|
|
|
|
|
|
|
#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________________ CTL_T(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, CTL_T(KC_SLASH)
|
|
|
|
|
2018-03-25 20:01:15 +00:00
|
|
|
#define ______________COLEMAK_MOD_DH_L1____________ KC_Q, KC_W, KC_F, KC_P, KC_B
|
|
|
|
#define ______________COLEMAK_MOD_DH_L2____________ KC_A, KC_R, KC_S, KC_T, KC_G
|
|
|
|
#define ______________COLEMAK_MOD_DH_L3____________ CTL_T(KC_Z), KC_X, KC_C, KC_D, KC_V
|
|
|
|
|
|
|
|
#define ______________COLEMAK_MOD_DH_R1____________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN
|
|
|
|
#define ______________COLEMAK_MOD_DH_R2____________ KC_K, KC_N, KC_E, KC_I, KC_O
|
|
|
|
#define ______________COLEMAK_MOD_DH_R3____________ KC_M, KC_H, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
|
|
|
|
2018-02-04 18:44:02 +00:00
|
|
|
|
|
|
|
#define _________________DVORAK_L1_________________ KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y
|
|
|
|
#define _________________DVORAK_L2_________________ KC_A, KC_O, KC_E, KC_U, KC_I
|
|
|
|
#define _________________DVORAK_L3_________________ CTL_T(KC_SCLN),KC_Q, KC_J, KC_K, KC_X
|
|
|
|
|
|
|
|
#define _________________DVORAK_R1_________________ KC_F, KC_G, KC_C, KC_R, KC_L
|
|
|
|
#define _________________DVORAK_R2_________________ KC_D, KC_H, KC_T, KC_N, KC_S
|
|
|
|
#define _________________DVORAK_R3_________________ KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z)
|
|
|
|
|
|
|
|
|
2018-04-21 00:53:19 +00:00
|
|
|
#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
|
2018-02-04 18:44:02 +00:00
|
|
|
|
2018-04-21 00:53:19 +00:00
|
|
|
#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)
|
2018-02-04 18:44:02 +00:00
|
|
|
|
|
|
|
|
2018-03-25 20:01:15 +00:00
|
|
|
#define _________________NORMAN_L1_________________ KC_Q, KC_W, KC_D, KC_F, KC_K
|
|
|
|
#define _________________NORMAN_L2_________________ KC_A, KC_S, KC_E, KC_T, KC_G
|
|
|
|
#define _________________NORMAN_L3_________________ CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B
|
|
|
|
|
|
|
|
#define _________________NORMAN_R1_________________ KC_J, KC_U, KC_R, KC_L, KC_SCLN
|
|
|
|
#define _________________NORMAN_R2_________________ KC_J, KC_N, KC_I, KC_O, KC_U
|
|
|
|
#define _________________NORMAN_R3_________________ KC_P, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLASH)
|
|
|
|
|
|
|
|
|
2018-02-04 18:44:02 +00:00
|
|
|
|
|
|
|
// Since we have 4 default layouts (QWERTY, DVORAK, COLEMAK and WORKMAN),
|
|
|
|
// this allows us to quickly modify the bottom row for all of the layouts
|
|
|
|
// so we don't have to alter it 4 times and hope that we haven't missed
|
|
|
|
// anything
|
2018-04-01 02:38:06 +00:00
|
|
|
#define ___________ERGODOX_BOTTOM_LEFT_____________ OSM(MOD_MEH), OSM(MOD_LGUI), KC_LBRC, KC_RBRC
|
2018-02-04 18:44:02 +00:00
|
|
|
#define ___________ERGODOX_BOTTOM_RIGHT____________ KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
2018-02-12 20:46:35 +00:00
|
|
|
|
|
|
|
|
2018-04-21 00:53:19 +00:00
|
|
|
#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
|
|
|
|
|
|
|
|
|
2017-11-07 05:11:08 +00:00
|
|
|
#endif
|