diff options
author | Joel Challis <git@zvecr.com> | 2022-12-10 02:19:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 13:19:31 +1100 |
commit | 1dd3e4633683688e7492e4212a608c418753ffab (patch) | |
tree | d3a69c62391d05c9e7c8070d0bafcc530b634b5a /users | |
parent | d9cba6e978b60d67b00b5f868cf321d2d48e5fc9 (diff) |
Remove broken keymap/userspace (#19271)
Diffstat (limited to 'users')
21 files changed, 0 insertions, 1104 deletions
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 - * along with this program. If not, see <http://www.gnu.org/licenses/>. - */ - -#include "super_alt_tab.h" - -// https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab - -bool is_alt_tab_active = false; -uint16_t alt_tab_timer = 0; - -void matrix_scan_super_alt_tab(void) { - if (is_alt_tab_active) { - if (timer_elapsed(alt_tab_timer) > USER_SUPER_ALT_TAB_TIMEOUT) { - unregister_code(KC_LALT); - is_alt_tab_active = false; - } - } -} - - -bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record) { - if (keycode != SALTTAB) { - return true; - } - - if (record->event.pressed) { - if (!is_alt_tab_active) { - is_alt_tab_active = true; - register_code(KC_LALT); - } - alt_tab_timer = timer_read(); - register_code(KC_TAB); - } - else { - unregister_code(KC_TAB); - } - - return false; -} diff --git a/users/replicaJunction/features/super_alt_tab.h b/users/replicaJunction/features/super_alt_tab.h deleted file mode 100644 index 8bdf2bc22e..0000000000 --- a/users/replicaJunction/features/super_alt_tab.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" - -#ifndef USER_SUPER_ALT_TAB_TIMEOUT -# define USER_SUPER_ALT_TAB_TIMEOUT 500 -#endif - -void matrix_scan_super_alt_tab(void); - -bool process_record_super_alt_tab(uint16_t keycode, const keyrecord_t *record); diff --git a/users/replicaJunction/keycode_aliases.h b/users/replicaJunction/keycode_aliases.h deleted file mode 100644 index b1006a863c..0000000000 --- a/users/replicaJunction/keycode_aliases.h +++ /dev/null @@ -1,85 +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 - -// Transparent, but indicates that this key must be blocked (for example, a layer shift key) -#define ooooooo KC_TRNS - - -#define SFT_TAB LSFT(KC_TAB) -#define WIN_TAB LGUI(KC_TAB) -#define WIN_L LGUI(KC_L) -#define WIN_V LGUI(KC_V) -#define ALT_F4 LALT(KC_F4) -#define CTL_DEL LCTL_T(KC_DEL) -#define CTL_ESC CTL_T(KC_ESC) -#define ALT_ENT ALT_T(KC_ENT) -#define ALT_TAB ALT_T(KC_TAB) - -#define OSM_LSF OSM(MOD_LSFT) -#define OSM_RSF OSM(MOD_RSFT) - -// OS shortcuts (Windows) -#define OS_COPY LCTL(KC_C) -#define OS_PAST LCTL(KC_V) -#define OS_CUT LCTL(KC_X) -#define OS_UNDO LCTL(KC_Z) -#define OS_SALL LCTL(KC_A) -#define OS_FIND LCTL(KC_F) - - -// Home row modifiers -#define GUI_A LGUI_T(KC_A) -#define ALT_R LALT_T(KC_R) -#define SFT_S LSFT_T(KC_S) -#define CRT_T LCTL_T(KC_T) // we can't call this CTL_T because that name is taken! - -#define CRT_N RCTL_T(KC_N) -#define SFT_E RSFT_T(KC_E) -#define ALT_I RALT_T(KC_I) -#define GUI_O RGUI_T(KC_O) - - -// Mouse keys -#define M_UP KC_MS_UP -#define M_DOWN KC_MS_DOWN -#define M_LEFT KC_MS_LEFT -#define M_RIGHT KC_MS_RIGHT -#define M_LCLIK KC_MS_BTN1 -#define M_RCLIK KC_MS_BTN2 -#define M_MCLIK KC_MS_BTN3 -#define M_WHLUP KC_WH_U -#define M_WHLDN KC_WH_D - - -// Windows 10 shortcuts: change desktop to the left/right -#define DESKLFT LCTL(LGUI(KC_LEFT)) -#define DESKRGT LCTL(LGUI(KC_RGHT)) - - -// Application-specific shortcuts - -// Search: defined in Everything Search Engine as the keypress to show/hide the window -#define SEARCH HYPR(KC_S) - -// Microsoft PowerToys hotkeys -// https://github.com/microsoft/PowerToys -#define PTYRUN LALT(KC_SPC) // PowerToys Run -#define PTYZONE LGUI(KC_GRV) // PowerToys FancyZones -#define PTYCOLR LGUI(LSFT(KC_C)) // PowerToys ColorPicker diff --git a/users/replicaJunction/matrix_scan.c b/users/replicaJunction/matrix_scan.c deleted file mode 100644 index 969799550a..0000000000 --- a/users/replicaJunction/matrix_scan.c +++ /dev/null @@ -1,35 +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 QMK_KEYBOARD_H -#include "replicaJunction.h" - -__attribute__ ((weak)) -void matrix_scan_user_kb(void) { } - -// Runs on every matrix scan. Be careful what goes here - you can really impact the -// responsiveness of your keyboard if you add too much in this function. -void matrix_scan_user(void) { -#ifdef USER_MOUSE_JIGGLE_ENABLE - matrix_scan_mouse_jiggle(); -#endif - -#ifdef USER_SUPER_ALT_TAB_ENABLE - matrix_scan_super_alt_tab(); -#endif - - matrix_scan_user_kb(); -} diff --git a/users/replicaJunction/process_records.c b/users/replicaJunction/process_records.c deleted file mode 100644 index abce215261..0000000000 --- a/users/replicaJunction/process_records.c +++ /dev/null @@ -1,149 +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 QMK_KEYBOARD_H -#include "process_records.h" - -uint8_t mod_state; - - -__attribute__ ((weak)) -bool process_record_user_kb(uint16_t keycode, keyrecord_t *record) { - return true; -} - -// Runs for each key down or up event. -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // Returning true here will cause QMK to continue handling the key normally. - // Returning false indicates that we've handled everything the keycode should do, and QMK - // should not continue handling the keypress. - // - // NOTE: There is also a process_record_kb function that can be defined in the keyboard- - // specific code. This allows the keyboard to have its own process_record function. - // This is supposed to be "higher" than the user function, meaning the kb function - // is shared for all keymaps for the keyboard. - // - // For this reason, I add my own function, called process_record_user_kb, and at the end - // of this function, I defer to that one if it exists. - // return process_record_user(keycode, record); - - - // Custom keycode / function handling, based on the core function - // process_record_quantum - // https://github.com/qmk/qmk_firmware/blob/master/quantum/quantum.c - - if (!( -#ifdef USER_CAPS_WORD_ENABLE - process_record_caps_word(keycode, record) && -#endif -#ifdef USER_MOUSE_JIGGLE_ENABLE - process_record_mouse_jiggle(keycode, record) && -#endif -#ifdef USER_NUM_WORD_ENABLE - process_record_num_word(keycode, record) && -#endif -#ifdef USER_SECRETS_ENABLE - process_record_secrets(keycode, record) && -#endif -#ifdef USER_SUPER_ALT_TAB_ENABLE - process_record_super_alt_tab(keycode, record) && -#endif - true)) { - return false; - } - - - // Miscellaneous keycode handling - mod_state = get_mods(); - - switch(keycode) - { - case QK_MAKE: { - if (record->event.pressed) - SEND_STRING("qmk compile --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP); - return false; - } - case QK_FLSH: { - if (record->event.pressed) { - SEND_STRING("qmk flash --keyboard " QMK_KEYBOARD " --keymap " QMK_KEYMAP); - } - return false; - } - case QK_VERS: { - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE); - } - return false; - } - case PRG_EQ: { - if (record->event.pressed) { - SEND_STRING("=="); - } - return false; - } - case PRG_NE: { - if (record->event.pressed) { - SEND_STRING("!="); - } - return false; - } - case PRG_GEQ: { - if (record->event.pressed) { - SEND_STRING(">="); - } - return false; - } - case PRG_LEQ: { - if (record->event.pressed) { - SEND_STRING("<="); - } - return false; - } - case PRG_ARR: { - if (record->event.pressed) { - SEND_STRING("=>"); - } - return false; - } - - case PS_ITEM: { - if (record->event.pressed) { - SEND_STRING("$_"); - } - return false; - } - case FS_PIPE: { - if (record->event.pressed) { - SEND_STRING("|>"); - } - return false; - } - case FS_ARR: { - if (record->event.pressed) { - SEND_STRING("->"); - } - return false; - } - case SHEBANG: { - if (record->event.pressed) { - SEND_STRING("#!"); - } - return false; - } - } - - return process_record_user_kb(keycode, record); -} diff --git a/users/replicaJunction/process_records.h b/users/replicaJunction/process_records.h deleted file mode 100644 index 224bc6f4ff..0000000000 --- a/users/replicaJunction/process_records.h +++ /dev/null @@ -1,21 +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 "replicaJunction.h" - -bool process_record_user_kb(uint16_t keycode, keyrecord_t *record); diff --git a/users/replicaJunction/readme.md b/users/replicaJunction/readme.md deleted file mode 100644 index 9d728f9029..0000000000 --- a/users/replicaJunction/readme.md +++ /dev/null @@ -1,93 +0,0 @@ -replicaJunction QMK Userspace -============================= - -# Overview -I alternate between a few keyboards, one of which is the 44-key Keyboardio Atreus. Small keyboards require a liberal use of layers. Even though larger keyboards don't rely on layers as heavily, my muscle memory adapted to my Atreus layout, so I've ended up building several of those features in my keymaps for larger boards as well. - -The result, I believe, is a good compromise between ergonomics and ease of use. - -The code in this userspace is designed to be very modular. I use a few different keyboards, and I'm constantly tweaking one or another, so I want the ability to add and remove features from the firmware at compile-time. While my endgame goal is to get all the layouts to be compatible, in practice, it's been years and I'm still not to that point... - -Modular code also means that it should be easy to identify and adapt specific pieces to your own firmware. - -## Keyboards and Keymaps - -The following keyboards use the files in this userspace: - -* [Atreus](../../keyboards/atreus/keymaps/replicaJunction/readme.md) (42-key) -* [Ergodox](../../layouts/community/ergodox/replicaJunction/readme.md) -* [Keyboardio Atreus](../../keyboards/keyboardio/atreus/keymaps/replicaJunction/readme.md) (44-key) -* [XD75](../../keyboards/xd75/keymaps/replicaJunction/readme.md) - -# Features - -* **Secrets**, as [explained by Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme_secrets.md) -* **CAPSWORD** and **NUMWORD** -* Mouse jiggler -* Super alt-tab - -## Secrets -My implementation of the "secrets" concept is very similar to Drashna's, but I've chosen to allow most of the supporting code to be committed to the repo. The only thing missing is a file called `secret_definitions.h`, which contains the actual text contained in those macros. - -To use my implementation, create a file of that name in the same directory. Make sure you've got a `.gitignore` file in place, and add these contents to the definitions file: - -```c -#pragma once -static const char * const secrets[] = { - "secret1", - "secret2", - "secret3", - "secret4" -} -``` - -Change the quoted text to the text you'd like and you're golden. If you need more (or fewer) items, you'll probably need to adjust the code in `secrets.c` as well, since it looks for up to four items in a switch case. - -## CAPSWORD and NUMWORD -The concept here is simple: more often than you'd think, you need to type a single word in ALL CAPS. An easy example for me, as a programmer, is a constant value; in most programming languages, constants are typed in all caps by convention. - -You typically have a few choices, but each one comes with a drawback. Here are the options I'm aware of: - -* Use proper typing technique and alternate which hand holds Shift for each keypress - * This can often end up requiring you to switch / re-press Shift again and again, making this a tedious process -* Hold a single Shift key down - * This can lead to uncomfortable finger gymnastics -* Hit the Caps Lock key, then hit it again when you're done - * Requires you to remember to hit it again, meaning a higher cognitive load - * In some layouts for smaller keyboards, Caps Lock is not easily accessible (sometimes not mapped at all) - -The solution to this problem is CAPSWORD. When enabled, it activates Caps Lock and begins running an additional callback on each keypress. If the keypress is an alphanumeric key or one of a specific few symbols (such as the underscore), nothing happens. Otherwise, before processing the keypress, Caps Lock is disabled again. - -NUMWORD is a similar concept, but has a slightly more elaborate implementation. There's a bit of extra logic in the NUMWORD code that allows the keycode to act as a tap/hold key as well. Tapping enables NUMWORD while number keys are in use, while holding the key enables a number layer for the duration of the key hold and disables it again afterwards. - -**Note:** The implementation of NUMWORD requires that the keyboard's layer definitions be accessible in a header file. In my case, since I use a fairly standard set of layers, I've declared it in my userspace. - -## Mouse Jiggler -This adds a keycode that will move the mouse cursor on each matrix scan. Used to prevent the screen from locking if you're temporarily doing something else (working on a different machine, reading / writing, etc.). - -When you press the keycode, the keyboard will write the text "Mouse jiggler enabled" to signify that the behavior is active. I suggest opening a Notepad window before pressing the key. - -Pressing any key will automatically disable the feature again. This is because it causes a huge hit to the reliability and performance of the keyboard while it's active (adding stuff to every matrix scan will do that). I kept forgetting to turn it off before trying to use the keyboard again, so I decided to make it automatically disable itself. - -Enable this by setting `USER_MOUSE_JIGGLE_ENABLE = yes` in your `rules.mk` file. The feature also depends on the Mouse Keys feature, so ensure you don't disable `MOUSEKEY_ENABLE`. - -## Super Alt-Tab -Taken [straight out of the QMK documentation](https://docs.qmk.fm/#/feature_macros?id=super-alt%E2%86%AFtab), this is an easy way to shift between a couple different windows. I use it with a very low interval when I'm alternating back and forth between two known windows with no real need for the visual feedback and thought. If you want to be able to browse the open windows before the function releases Alt, I'd suggest raising `USER_SUPER_ALT_TAB_TIMEOUT` to a higher value. - -# Credits -I'm absolutely sure I've missed a few sources here. If you see something in my code that you think is yours and isn't credited here, I sincerely apologize. - -[bpruitt-goddard](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/bpruitt-goddard/readme.md) -* Dynamic macro tap-dance (no longer used, but I did use this for a while) - -[Drashna](https://github.com/qmk/qmk_firmware/blob/master/users/drashna/readme.md) -* Secrets concept and basic implementation -* "Wrappers" concept (no longer used, but I did use this for a while) - -[Treeman](https://github.com/treeman/qmk_firmware/blob/master/keyboards/kyria/keymaps/treeman) -* CAPSWORD and NUMBERWORD concept - * I re-implented some of the code based on my own prefences, but I did use some implementation code from here - * [Treeman's blog post](https://www.jonashietala.se/blog/2021/06/03/the-t-34-keyboard-layout/) provides more context on these features, and is a great read - -[QMK issue #452](https://github.com/qmk/qmk_firmware/issues/452) -* Helped clarify a good organizational structure for the individual features in this userspace diff --git a/users/replicaJunction/replicaJunction.c b/users/replicaJunction/replicaJunction.c deleted file mode 100644 index 55d8b77166..0000000000 --- a/users/replicaJunction/replicaJunction.c +++ /dev/null @@ -1,25 +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 QMK_KEYBOARD_H -#include "replicaJunction.h" - -__attribute__ ((weak)) -void keyboard_post_init_user_kb(void) { } - -void keyboard_post_init_user(void) { - keyboard_post_init_user_kb(); -} diff --git a/users/replicaJunction/replicaJunction.h b/users/replicaJunction/replicaJunction.h deleted file mode 100644 index f3b7bcea0a..0000000000 --- a/users/replicaJunction/replicaJunction.h +++ /dev/null @@ -1,42 +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" -#include "keycode_aliases.h" -#include "version.h" - -#ifdef USER_CAPS_WORD_ENABLE -# include "features/caps_word.h" -#endif - -#ifdef USER_MOUSE_JIGGLE_ENABLE -# include "features/mouse_jiggle.h" -#endif - -#ifdef USER_NUM_WORD_ENABLE -# include "features/num_word.h" -#endif - -#ifdef USER_SECRETS_ENABLE -# include "features/secrets.h" -#endif - -#ifdef USER_SUPER_ALT_TAB_ENABLE -# include "features/super_alt_tab.h" -#endif diff --git a/users/replicaJunction/rj_keycodes.h b/users/replicaJunction/rj_keycodes.h deleted file mode 100644 index fde2698dfe..0000000000 --- a/users/replicaJunction/rj_keycodes.h +++ /dev/null @@ -1,63 +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 - -// Custom keycodes and macros -enum userspace_custom_keycodes { - QK_MAKE = SAFE_RANGE, // QMK make command - QK_FLSH, // QMK flash command - QK_VERS, // QMK version - - // Programming macros - PRG_EQ, // == - PRG_NE, // != - PRG_GEQ, // >= - PRG_LEQ, // <= - PRG_ARR, // => - PS_ITEM, // $_ (PowerShell - $PSItem variable) - FS_PIPE, // |> (F# pipe operator) - FS_ARR, // -> (F# lambda / pattern matching) - SHEBANG, // #! - - // USER_CAPS_WORD_ENABLE - CAPWORD, - -#ifdef USER_NUM_WORD_ENABLE - NUMWORD, -#endif - - // USER_ENABLE_CUSTOM_SHIFT_CODES - // Custom characters that send different symbols than usual when shifted - KCC_COM, // , or ! - KCC_DOT, // . or @ - KCC_QUO, // ' or ~ - - // USER_MOUSE_JIGGLE_ENABLE - MS_JIGL, - - // USER_ENABLE_SUPER_ALT_TAB - SALTTAB, - - // USER_ENABLE_SECRETS - K_SECR1, - K_SECR2, - K_SECR3, - K_SECR4, - - DYNAMIC_MACRO_RANGE -}; diff --git a/users/replicaJunction/rj_layers.h b/users/replicaJunction/rj_layers.h deleted file mode 100644 index f6296af053..0000000000 --- a/users/replicaJunction/rj_layers.h +++ /dev/null @@ -1,40 +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 - -enum rj_layers { - L_BASE, - -#ifdef USER_INCLUDE_QWERTY - L_QWERTY, -#endif - -#ifdef USER_INCLUDE_GAMING_LAYER - L_GAMING, -#endif - - L_NUMBERS, - L_SYMBOLS, - L_NAVIGATION, - L_FN, - -#ifdef USER_INCLUDE_MACRO_LAYER - L_MACROS, -#endif - - _LAYER_SAFE_RANGE -}; diff --git a/users/replicaJunction/rules.mk b/users/replicaJunction/rules.mk deleted file mode 100644 index addaa04d97..0000000000 --- a/users/replicaJunction/rules.mk +++ /dev/null @@ -1,33 +0,0 @@ -SRC += replicaJunction.c - -# Only load these source files if the features are enabled. Keyboards can -# enable or disable these features in their own rules.mk files. - -ifeq ($(strip $(USER_CAPS_WORD_ENABLE)), yes) - SRC += features/caps_word.c - OPT_DEFS += -DUSER_CAPS_WORD_ENABLE -endif - -ifeq ($(strip $(USER_MOUSE_JIGGLE_ENABLE)), yes) - SRC += features/mouse_jiggle.c - OPT_DEFS += -DUSER_MOUSE_JIGGLE_ENABLE -endif - -ifeq ($(strip $(USER_NUM_WORD_ENABLE)), yes) - SRC += features/num_word.c - OPT_DEFS += -DUSER_NUM_WORD_ENABLE -endif - -ifeq ($(strip $(USER_SECRETS_ENABLE)), yes) - SRC += features/secrets.c - OPT_DEFS += -DUSER_SECRETS_ENABLE -endif - -ifeq ($(strip $(USER_SUPER_ALT_TAB_ENABLE)), yes) - SRC += features/super_alt_tab.c - OPT_DEFS += -DUSER_SUPER_ALT_TAB_ENABLE -endif - -# Define these last so any other logic can set up some defines first -SRC += matrix_scan.c \ - process_records.c |