2020-10-17 20:46:57 +02:00
|
|
|
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*/
|
|
|
|
|
2018-12-04 22:27:41 +01:00
|
|
|
#pragma once
|
|
|
|
#include "drashna.h"
|
|
|
|
|
2021-07-01 09:42:32 +02:00
|
|
|
#if defined(KEYBOARD_handwired_tractyl_manuform_5x6_right)
|
2019-07-23 05:22:33 +02:00
|
|
|
# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
|
2018-12-04 22:27:41 +01:00
|
|
|
#else
|
2019-07-23 05:22:33 +02:00
|
|
|
# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
|
2018-12-04 22:27:41 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
enum userspace_custom_keycodes {
|
2021-07-27 02:59:49 +02:00
|
|
|
VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info
|
|
|
|
KC_QWERTY, // Sets default layer to QWERTY
|
|
|
|
FIRST_DEFAULT_LAYER_KEYCODE = KC_QWERTY, // Sets default layer to QWERTY
|
|
|
|
KC_COLEMAK_DH, // Sets default layer to COLEMAK
|
|
|
|
KC_COLEMAK, // Sets default layer to COLEMAK
|
|
|
|
KC_DVORAK, // Sets default layer to DVORAK
|
|
|
|
LAST_DEFAULT_LAYER_KEYCODE = KC_DVORAK, // Sets default layer to WORKMAN
|
|
|
|
KC_DIABLO_CLEAR, // Clears all Diablo Timers
|
|
|
|
KC_MAKE, // Run keyboard's customized make command
|
|
|
|
KC_RGB_T, // Toggles RGB Layer Indication mode
|
|
|
|
RGB_IDL, // RGB Idling animations
|
|
|
|
KC_SECRET_1, // test1
|
|
|
|
KC_SECRET_2, // test2
|
|
|
|
KC_SECRET_3, // test3
|
|
|
|
KC_SECRET_4, // test4
|
|
|
|
KC_SECRET_5, // test5
|
|
|
|
KC_CCCV, // Hold to copy, tap to paste
|
|
|
|
KC_NUKE, // NUCLEAR LAUNCH DETECTED!!!
|
|
|
|
UC_FLIP, // (ಠ痊ಠ)┻━┻
|
|
|
|
UC_TABL, // ┬─┬ノ( º _ ºノ)
|
|
|
|
UC_SHRG, // ¯\_(ツ)_/¯
|
|
|
|
UC_DISA, // ಠ_ಠ
|
2021-11-29 08:41:59 +01:00
|
|
|
UC_IRNY,
|
|
|
|
UC_CLUE,
|
2021-10-16 07:30:23 +02:00
|
|
|
KEYLOCK, // Locks keyboard by unmounting driver
|
2021-11-29 08:41:59 +01:00
|
|
|
KC_NOMODE,
|
|
|
|
KC_WIDE,
|
|
|
|
KC_SCRIPT,
|
|
|
|
KC_BLOCKS,
|
|
|
|
KC_REGIONAL,
|
|
|
|
KC_AUSSIE,
|
|
|
|
KC_ZALGO,
|
|
|
|
NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes
|
2018-12-04 22:27:41 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
|
|
|
|
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
2021-08-21 22:34:44 +02:00
|
|
|
void post_process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
2021-11-29 08:41:59 +01:00
|
|
|
#ifdef CUSTOM_UNICODE_ENABLE
|
|
|
|
bool process_record_unicode(uint16_t keycode, keyrecord_t *record);
|
|
|
|
#endif
|
2018-12-04 22:27:41 +01:00
|
|
|
|
2021-07-27 02:59:49 +02:00
|
|
|
#define LOWER MO(_LOWER)
|
|
|
|
#define RAISE MO(_RAISE)
|
|
|
|
#define ADJUST MO(_ADJUST)
|
|
|
|
#define TG_MODS OS_TOGG
|
|
|
|
#define TG_GAME TG(_GAMEPAD)
|
|
|
|
#define TG_DBLO TG(_DIABLO)
|
|
|
|
#define OS_LWR OSL(_LOWER)
|
|
|
|
#define OS_RSE OSL(_RAISE)
|
|
|
|
|
|
|
|
#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
|
|
|
|
|
|
|
|
#define QWERTY KC_QWERTY
|
|
|
|
#define DVORAK KC_DVORAK
|
|
|
|
#define COLEMAK KC_COLEMAK
|
|
|
|
#define COLEMAKDH KC_COLEMAK_DH
|
|
|
|
|
|
|
|
#define DEFLYR1 FIRST_DEFAULT_LAYER_KEYCODE
|
|
|
|
#define DEFLYR2 (FIRST_DEFAULT_LAYER_KEYCODE + 1)
|
|
|
|
#define DEFLYR3 (FIRST_DEFAULT_LAYER_KEYCODE + 2)
|
|
|
|
#define DEFLYR4 (FIRST_DEFAULT_LAYER_KEYCODE + 3)
|
|
|
|
#if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 3)
|
|
|
|
# define DEFLYR5 (FIRST_DEFAULT_LAYER_KEYCODE + 4)
|
|
|
|
# define DEFLYR6 (FIRST_DEFAULT_LAYER_KEYCODE + 5)
|
|
|
|
# define DEFLYR7 (FIRST_DEFAULT_LAYER_KEYCODE + 6)
|
|
|
|
# define DEFLYR8 (FIRST_DEFAULT_LAYER_KEYCODE + 7)
|
|
|
|
# if LAST_DEFAULT_LAYER_KEYCODE > (FIRST_DEFAULT_LAYER_KEYCODE + 7)
|
|
|
|
# define DEFLYR9 (FIRST_DEFAULT_LAYER_KEYCODE + 8)
|
|
|
|
# define DEFLYR10 (FIRST_DEFAULT_LAYER_KEYCODE + 9)
|
|
|
|
# define DEFLYR11 (FIRST_DEFAULT_LAYER_KEYCODE + 10)
|
|
|
|
# define DEFLYR12 (FIRST_DEFAULT_LAYER_KEYCODE + 11)
|
|
|
|
# endif
|
|
|
|
#endif
|
2018-12-04 22:27:41 +01:00
|
|
|
|
|
|
|
#define KC_RESET RESET
|
2020-04-01 01:26:43 +02:00
|
|
|
#define KC_RST KC_RESET
|
2018-12-04 22:27:41 +01:00
|
|
|
|
|
|
|
#ifdef SWAP_HANDS_ENABLE
|
2019-10-16 22:11:22 +02:00
|
|
|
# define KC_C1R3 SH_T(KC_TAB)
|
|
|
|
#elif defined(DRASHNA_LP)
|
|
|
|
# define KC_C1R3 TG(_GAMEPAD)
|
2021-07-27 02:59:49 +02:00
|
|
|
#else // SWAP_HANDS_ENABLE
|
2019-10-16 22:11:22 +02:00
|
|
|
# define KC_C1R3 KC_TAB
|
2021-07-27 02:59:49 +02:00
|
|
|
#endif // SWAP_HANDS_ENABLE
|
2018-12-04 22:27:41 +01:00
|
|
|
|
|
|
|
#define BK_LWER LT(_LOWER, KC_BSPC)
|
|
|
|
#define SP_LWER LT(_LOWER, KC_SPC)
|
|
|
|
#define DL_RAIS LT(_RAISE, KC_DEL)
|
|
|
|
#define ET_RAIS LT(_RAISE, KC_ENTER)
|
|
|
|
|
|
|
|
/* OSM keycodes, to keep things clean and easy to change */
|
|
|
|
#define KC_MLSF OSM(MOD_LSFT)
|
|
|
|
#define KC_MRSF OSM(MOD_RSFT)
|
|
|
|
|
|
|
|
#define OS_LGUI OSM(MOD_LGUI)
|
|
|
|
#define OS_RGUI OSM(MOD_RGUI)
|
|
|
|
#define OS_LSFT OSM(MOD_LSFT)
|
|
|
|
#define OS_RSFT OSM(MOD_RSFT)
|
|
|
|
#define OS_LCTL OSM(MOD_LCTL)
|
|
|
|
#define OS_RCTL OSM(MOD_RCTL)
|
|
|
|
#define OS_LALT OSM(MOD_LALT)
|
|
|
|
#define OS_RALT OSM(MOD_RALT)
|
2020-04-01 01:26:43 +02:00
|
|
|
#define OS_MEH OSM(MOD_MEH)
|
2018-12-04 22:27:41 +01:00
|
|
|
#define OS_HYPR OSM(MOD_HYPR)
|
|
|
|
|
|
|
|
#define ALT_APP ALT_T(KC_APP)
|
|
|
|
|
|
|
|
#define MG_NKRO MAGIC_TOGGLE_NKRO
|