From c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 29 Dec 2021 20:17:34 -0800 Subject: [Keymap] Reorganization, cleanup and readmes for drashna code (#15617) --- users/drashna/keyrecords/process_records.h | 37 +++++++++++++++++------------- 1 file changed, 21 insertions(+), 16 deletions(-) (limited to 'users/drashna/keyrecords/process_records.h') diff --git a/users/drashna/keyrecords/process_records.h b/users/drashna/keyrecords/process_records.h index df506b3647..d7a81d4607 100644 --- a/users/drashna/keyrecords/process_records.h +++ b/users/drashna/keyrecords/process_records.h @@ -1,18 +1,5 @@ -/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@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 . - */ +// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "drashna.h" @@ -58,6 +45,7 @@ enum userspace_custom_keycodes { KC_ZALGO, KC_ACCEL, AUTO_CTN, // Toggle Autocorrect status + REBOOT, NEW_SAFE_RANGE // use "NEWPLACEHOLDER for keymap specific codes }; @@ -66,7 +54,6 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record); void post_process_record_keymap(uint16_t keycode, keyrecord_t *record); #ifdef CUSTOM_UNICODE_ENABLE bool process_record_unicode(uint16_t keycode, keyrecord_t *record); -void matrix_init_unicode(void); #endif #define LOWER MO(_LOWER) @@ -140,3 +127,21 @@ void matrix_init_unicode(void); #define ALT_APP ALT_T(KC_APP) #define MG_NKRO MAGIC_TOGGLE_NKRO + + +/* +Custom Keycodes for Diablo 3 layer +But since TD() doesn't work when tap dance is disabled +We use custom codes here, so we can substitute the right stuff +*/ +#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) +#else // TAP_DANCE_ENABLE +# define KC_D3_1 KC_1 +# define KC_D3_2 KC_2 +# define KC_D3_3 KC_3 +# define KC_D3_4 KC_4 +#endif // TAP_DANCE_ENABLE -- cgit v1.2.3