diff options
Diffstat (limited to 'users')
40 files changed, 34 insertions, 1158 deletions
diff --git a/users/bcat/config.h b/users/bcat/config.h index 7bb5d71bae..b9eac74ff6 100644 --- a/users/bcat/config.h +++ b/users/bcat/config.h @@ -35,7 +35,7 @@ /* Turn off key repeat support of the tap keycode for tap-hold keys, enabling * holds to work correctly in quick succession after taps. */ -#define TAPPING_FORCE_HOLD +#define QUICK_TAP_TERM 0 #if defined(OLED_ENABLE) /* The built-in OLED timeout wakes the OLED screen every time the buffer is diff --git a/users/cwebster2/config.h b/users/cwebster2/config.h index 78733687cc..313e6d533f 100644 --- a/users/cwebster2/config.h +++ b/users/cwebster2/config.h @@ -18,7 +18,7 @@ #define TAPPING_TOGGLE 1 #define TAPPING_TERM 200 #define TAPPING_TERM_PER_KEY -//#define TAPPING_FORCE_HOLD +//#define QUICK_TAP_TERM 0 #undef PERMISSIVE_HOLD #define IGNORE_MOD_TAP_INTERRUPT #define NO_ACTION_ONESHOT diff --git a/users/danielo515/danielo515.c b/users/danielo515/danielo515.c index 9b09aed9d7..ea91ec55bf 100644 --- a/users/danielo515/danielo515.c +++ b/users/danielo515/danielo515.c @@ -7,9 +7,9 @@ bool onMac = true; LEADER_EXTERNS(); # ifdef RGBLIGHT_ENABLE -void leader_start() { rgblight_setrgb_range(5, 100, 199, 10, 15); }; +void leader_start_user() { rgblight_setrgb_range(5, 100, 199, 10, 15); }; -void leader_end() { rgblight_setrgb_range(200, 200, 255, 10, 15); }; +void leader_end_user() { rgblight_setrgb_range(200, 200, 255, 10, 15); }; # endif void matrix_scan_user(void) { diff --git a/users/drashna/config.h b/users/drashna/config.h index 5c5c131e36..9edbfff56b 100644 --- a/users/drashna/config.h +++ b/users/drashna/config.h @@ -81,9 +81,8 @@ #endif // !ONESHOT_TIMEOUT #if defined(PER_KEY_TAPPING) -# define IGNORE_MOD_TAP_INTERRUPT_PER_KEY # define PERMISSIVE_HOLD_PER_KEY -# define TAPPING_FORCE_HOLD_PER_KEY +# define QUICK_TAP_TERM_PER_KEY # define HOLD_ON_OTHER_KEY # define RETRO_TAPPING_PER_KEY # define HOLD_ON_OTHER_KEY_PRESS_PER_KEY diff --git a/users/drashna/keyrecords/tapping.c b/users/drashna/keyrecords/tapping.c index 7496610c2f..6a26a02aca 100644 --- a/users/drashna/keyrecords/tapping.c +++ b/users/drashna/keyrecords/tapping.c @@ -42,29 +42,14 @@ __attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyreco } #endif // HOLD_ON_OTHER_KEY_PRESS_PER_KEY -#ifdef IGNORE_MOD_TAP_INTERRUPT_PER_KEY -__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) { - // Do not force the mod-tap key press to be handled as a modifier - // if any other key was pressed while the mod-tap key is held down. - // return true; - // Force the mod-tap key press to be handled as a modifier if any - // other key was pressed while the mod-tap key is held down. - // return false; - switch (keycode) { - default: - return true; - } -} -#endif // IGNORE_MOD_TAP_INTERRUPT_PER_KEY - -#ifdef TAPPING_FORCE_HOLD_PER_KEY -__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { +#ifdef QUICK_TAP_TERM_PER_KEY +__attribute__((weak)) uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { default: - return false; + return QUICK_TAP_TERM; } } -#endif // TAPPING_FORCE_HOLD_PER_KEY +#endif // QUICK_TAP_TERM_PER_KEY #ifdef RETRO_TAPPING_PER_KEY __attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) { diff --git a/users/dshields/config.h b/users/dshields/config.h index 1420a9178f..279bcf217b 100644 --- a/users/dshields/config.h +++ b/users/dshields/config.h @@ -6,7 +6,7 @@ #define ONESHOT_TIMEOUT 3000 #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD_PER_KEY -#define TAPPING_FORCE_HOLD_PER_KEY +#define QUICK_TAP_TERM_PER_KEY #define TAPPING_TERM 200 #define BACKLIGHT_BREATHING #define DYNAMIC_MACRO_NO_NESTING diff --git a/users/dshields/dshields.c b/users/dshields/dshields.c index 46f0b33cd3..a8e1333104 100644 --- a/users/dshields/dshields.c +++ b/users/dshields/dshields.c @@ -29,7 +29,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { +uint16_t get_quick_tap_term(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case MT_A: case MT_S: @@ -39,9 +39,9 @@ bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) { case MT_K: case MT_L: case MT_SCLN: - return true; + return 0; default: - return false; + return QUICK_TAP_TERM; } } @@ -55,4 +55,3 @@ bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) { return false; } } - diff --git a/users/kuchosauronad0/config.h b/users/kuchosauronad0/config.h index 9315f879ae..bc0fe67df8 100644 --- a/users/kuchosauronad0/config.h +++ b/users/kuchosauronad0/config.h @@ -70,7 +70,7 @@ // actually sends Ctrl-x. That's bad.) #define IGNORE_MOD_TAP_INTERRUPT #undef PERMISSIVE_HOLD -//#define TAPPING_FORCE_HOLD +//#define QUICK_TAP_TERM 0 //#define RETRO_TAPPING #ifndef TAPPING_TOGGLE diff --git a/users/kuchosauronad0/leader.c b/users/kuchosauronad0/leader.c index ac2a6599a1..e8935ec401 100644 --- a/users/kuchosauronad0/leader.c +++ b/users/kuchosauronad0/leader.c @@ -93,7 +93,7 @@ void matrix_scan_user(void) { // matrix_scan_keymap(); } -void leader_start(void) { +void leader_start_user(void) { #ifdef RGBLIGHT_ENABLE rgblight_savebase(); rgblight_mode_noeeprom(1); @@ -101,7 +101,7 @@ void leader_start(void) { #endif } -void leader_end(void) { +void leader_end_user(void) { // pick color depending of success /fail // fade leader_start from 100 to 0 // fade new color from 0 to 100 to 0 diff --git a/users/manna-harbour_miryoku/config.h b/users/manna-harbour_miryoku/config.h index 920003598e..429e08493d 100644 --- a/users/manna-harbour_miryoku/config.h +++ b/users/manna-harbour_miryoku/config.h @@ -15,7 +15,7 @@ #define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -#define TAPPING_FORCE_HOLD +#define QUICK_TAP_TERM 0 // Auto Shift #define NO_AUTO_SHIFT_ALPHA @@ -40,4 +40,3 @@ #define COMBO_TERM 200 #define EXTRA_SHORT_COMBOS #endif - diff --git a/users/muppetjones/config.h b/users/muppetjones/config.h index 3dd4d1b1b6..583567d4f3 100644 --- a/users/muppetjones/config.h +++ b/users/muppetjones/config.h @@ -34,7 +34,7 @@ # define IGNORE_MOD_TAP_INTERRUPT // Enable rapid switch from tap to hold, disables double tap hold auto-repeat. -# define TAPPING_FORCE_HOLD +# define QUICK_TAP_TERM 0 #endif diff --git a/users/replicaJunction/features/.gitignore b/users/replicaJunction/features/.gitignore deleted file mode 100644 index 9b590ee802..0000000000 --- a/users/replicaJunction/features/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -# Do not include the secrets definitions -secret_definitions.h diff --git a/users/replicaJunction/features/caps_word.c b/users/replicaJunction/features/caps_word.c deleted file mode 100644 index 536da81ec7..0000000000 --- a/users/replicaJunction/features/caps_word.c +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 "caps_word.h" - -static bool is_caps_word_on = false; - -bool is_caps_word_enabled(void) { - return is_caps_word_on; -} - -void enable_caps_word(void) { - if (is_caps_word_on) return; - is_caps_word_on = true; - tap_code(KC_CAPS); -} - -void disable_caps_word(void) { - if (!is_caps_word_on) return; - is_caps_word_on = false; - tap_code(KC_CAPS); -} - -void toggle_caps_word(void) { - if (is_caps_word_on) { - disable_caps_word(); - } - else { - enable_caps_word(); - } -} - -bool should_terminate_caps_word(uint16_t keycode, const keyrecord_t *record) { - switch (keycode) { - // Keycodes which should not disable caps word mode - case KC_A ... KC_Z: - case KC_1 ... KC_0: - case KC_MINS: - case KC_UNDS: - case KC_BSPC: - return false; - - default: - if (record->event.pressed) { - return true; - } - return false; - } - - // Should be unreachable - return false; -} - - -bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record) { - // Nothing in this function acts on key release - if (!record->event.pressed) { - return true; - } - - // Handle the custom keycodes that go with this feature - if (keycode == CAPWORD) { - enable_caps_word(); - return false; - } - - // If the behavior isn't enabled and the keypress isn't a keycode to - // toggle the behavior, allow QMK to handle the keypress as usual - if (!is_caps_word_on) { - return true; - } - - // Get the base keycode of a mod or layer tap key - switch (keycode) { - case QK_MOD_TAP ... QK_MOD_TAP_MAX: - case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: - case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: - // Earlier return if this has not been considered tapped yet - if (record->tap.count == 0) - return true; - keycode = keycode & 0xFF; - break; - default: - break; - } - - if (should_terminate_caps_word(keycode, record)) { - disable_caps_word(); - } - - return true; -} diff --git a/users/replicaJunction/features/caps_word.h b/users/replicaJunction/features/caps_word.h deleted file mode 100644 index 4182ce5829..0000000000 --- a/users/replicaJunction/features/caps_word.h +++ /dev/null @@ -1,26 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 "rj_keycodes.h" - -bool is_caps_word_enabled(void); -void enable_caps_word(void); -void disable_caps_word(void); -void toggle_caps_word(void); - -bool process_record_caps_word(uint16_t keycode, const keyrecord_t *record); diff --git a/users/replicaJunction/features/mouse_jiggle.c b/users/replicaJunction/features/mouse_jiggle.c deleted file mode 100644 index b2c451d33e..0000000000 --- a/users/replicaJunction/features/mouse_jiggle.c +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 "mouse_jiggle.h" - -bool is_mouse_jiggle_active = false; - -void matrix_scan_mouse_jiggle(void) { - if (is_mouse_jiggle_active) { - tap_code(KC_MS_UP); - tap_code(KC_MS_DOWN); - } -} - -bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record) { - if (!record->event.pressed) { - return true; - } - - if (is_mouse_jiggle_active) { - // If active, quit whenever another key is pressed - is_mouse_jiggle_active = false; - return true; - } - - if (keycode != MS_JIGL) { - return true; - } - - is_mouse_jiggle_active = true; - SEND_STRING("Mouse jiggler enabled"); - return false; -} diff --git a/users/replicaJunction/features/mouse_jiggle.h b/users/replicaJunction/features/mouse_jiggle.h deleted file mode 100644 index ba2c6e7570..0000000000 --- a/users/replicaJunction/features/mouse_jiggle.h +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 "rj_keycodes.h" - -void matrix_scan_mouse_jiggle(void); - -bool process_record_mouse_jiggle(uint16_t keycode, const keyrecord_t *record); diff --git a/users/replicaJunction/features/num_word.c b/users/replicaJunction/features/num_word.c deleted file mode 100644 index 4cca5c19ae..0000000000 --- a/users/replicaJunction/features/num_word.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 "num_word.h" - -static uint16_t num_word_timer = 0; -static bool is_num_word_on = false; - -bool is_num_word_enabled(void) { - return is_num_word_on; -} - -void enable_num_word(void) { - if (is_num_word_on) return; - is_num_word_on = true; - layer_on(L_NUMBERS); -} - -void disable_num_word(void) { - if (!is_num_word_on) return; - is_num_word_on = false; - layer_off(L_NUMBERS); -} - -void toggle_num_word(void) { - if (is_num_word_on) { - disable_num_word(); - } - else { - enable_num_word(); - } -} - -bool should_terminate_num_word(uint16_t keycode, const keyrecord_t *record) { - switch (keycode) { - // Keycodes which should not disable num word mode. - // We could probably be more brief with these definitions by using - // a couple more ranges, but I believe "explicit is better than - // implicit" - case KC_1 ... KC_0: - case KC_EQL: - case KC_SCLN: - case KC_MINS: - case KC_DOT: - - // Numpad keycodes - case KC_P1 ... KC_P0: - case KC_PSLS ... KC_PPLS: - case KC_PDOT: - - // Misc - case KC_UNDS: - case KC_BSPC: - return false; - - default: - if (record->event.pressed) { - return true; - } - return false; - } - - // Should be unreachable - return false; -} - - -bool process_record_num_word(uint16_t keycode, const keyrecord_t *record) { - // Handle the custom keycodes that go with this feature - if (keycode == NUMWORD) { - if (record->event.pressed) { - enable_num_word(); - num_word_timer = timer_read(); - return false; - } - else { - if (timer_elapsed(num_word_timer) > TAPPING_TERM) { - // If the user held the key longer than TAPPING_TERM, - // consider it a hold, and disable the behavior on - // key release. - disable_num_word(); - return false; - } - } - } - - // Other than the custom keycodes, nothing else in this feature will - // activate if the behavior is not on, so allow QMK to handle the - // event as usual - if (!is_num_word_on) return true; - - // Nothing else acts on key release, either - if (!record->event.pressed) { - return true; - } - - // Get the base keycode of a mod or layer tap key - switch (keycode) { - case QK_MOD_TAP ... QK_MOD_TAP_MAX: - case QK_LAYER_TAP ... QK_LAYER_TAP_MAX: - case QK_TAP_DANCE ... QK_TAP_DANCE_MAX: - // Earlier return if this has not been considered tapped yet - if (record->tap.count == 0) - return true; - keycode = keycode & 0xFF; - break; - default: - break; - } - - if (should_terminate_num_word(keycode, record)) { - disable_num_word(); - } - - return true; -} diff --git a/users/replicaJunction/features/num_word.h b/users/replicaJunction/features/num_word.h deleted file mode 100644 index 194c4e2e0d..0000000000 --- a/users/replicaJunction/features/num_word.h +++ /dev/null @@ -1,27 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 "rj_keycodes.h" -#include "rj_layers.h" - -bool is_num_word_enabled(void); -void enable_num_word(void); -void disable_num_word(void); -void toggle_num_word(void); - -bool process_record_num_word(uint16_t keycode, const keyrecord_t *record); diff --git a/users/replicaJunction/features/secrets.c b/users/replicaJunction/features/secrets.c deleted file mode 100644 index 3e1ea283dc..0000000000 --- a/users/replicaJunction/features/secrets.c +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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/>. - */ - -// Before you can compile with this feature, you'll need to manually -// create a file in this directory called "secret_definitions.h" -// containing the data to be added. -// -// Example implementation: -// -// #pragma once -// static const char * const secrets[] = { -// "secret1", -// "secret2", -// "secret3", -// "secret4" -// } - -#include QMK_KEYBOARD_H -#include "replicaJunction.h" -#include "secrets.h" -#include "secret_definitions.h" - -#ifndef MACRO_TIMER -# define MACRO_TIMER 5 -#endif - -bool process_record_secrets(uint16_t keycode, const keyrecord_t *record) { - switch (keycode) { - case K_SECR1 ... K_SECR4: // Secrets! Externally defined strings, not stored in repo - if (!record->event.pressed) { - clear_oneshot_layer_state(ONESHOT_OTHER_KEY_PRESSED); - send_string_with_delay(secrets[keycode - K_SECR1], MACRO_TIMER); - } - return false; - } - - return true; -} diff --git a/users/replicaJunction/features/secrets.h b/users/replicaJunction/features/secrets.h deleted file mode 100644 index ef43962272..0000000000 --- a/users/replicaJunction/features/secrets.h +++ /dev/null @@ -1,30 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 - -// NOTE: In some implementations of the "secrets" functionality, the -// secrets.h file is the file that actually contains secret text. -// -// This is not the case in my implementation. That file is called -// "secret_definitions.h", and it's in a local .gitignore file so it -// does not get committed. -// -// The inclusion of this file is not an error, and there is no sensitive -// text here. - -bool process_record_secrets(uint16_t keycode, const keyrecord_t *record); diff --git a/users/replicaJunction/features/super_alt_tab.c b/users/replicaJunction/features/super_alt_tab.c deleted file mode 100644 index 9759898c87..0000000000 --- a/users/replicaJunction/features/super_alt_tab.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright 2021 Joshua T. - * - * 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 |