diff options
author | Joel Challis <git@zvecr.com> | 2023-11-26 18:36:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-27 05:36:45 +1100 |
commit | 1ed03f498fa204178c2696c510ac6a2cd8524e2d (patch) | |
tree | b97c1f983b7e4b57c007d0feedadd3ad3e39062b /users/zyber | |
parent | 4908d4b1ca260efecf3613e6517aa3a6f2034876 (diff) |
Remove userspace keymaps (#22544)
Diffstat (limited to 'users/zyber')
-rw-r--r-- | users/zyber/config.h | 9 | ||||
-rw-r--r-- | users/zyber/rules.mk | 8 | ||||
-rw-r--r-- | users/zyber/zyber.c | 137 | ||||
-rw-r--r-- | users/zyber/zyber.h | 33 |
4 files changed, 0 insertions, 187 deletions
diff --git a/users/zyber/config.h b/users/zyber/config.h deleted file mode 100644 index be005d8008..0000000000 --- a/users/zyber/config.h +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2022 ZyBeR (@ZyberSE) -// SPDX-License-Identifier: GPL-2.0 - -#pragma once - -#undef TAPPING_TERM -#define TAPPING_TERM 152 -#define GRAVE_ESC_GUI_OVERRIDE -#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD diff --git a/users/zyber/rules.mk b/users/zyber/rules.mk deleted file mode 100644 index 83559df609..0000000000 --- a/users/zyber/rules.mk +++ /dev/null @@ -1,8 +0,0 @@ -SRC += zyber.c - -CAPS_WORD_ENABLE = yes -TAP_DANCE_ENABLE = yes -COMMAND_ENABLE = no - -# DISABLE VIA CONFIGURATOR (otherwise QMK won't work properly) -DYNAMIC_KEYMAP_ENABLE = no diff --git a/users/zyber/zyber.c b/users/zyber/zyber.c deleted file mode 100644 index 72852d091a..0000000000 --- a/users/zyber/zyber.c +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright 2022 ZyBeR (@ZyberSE) -// SPDX-License-Identifier: GPL-2.0 - -#include "zyber.h" - - -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -uint16_t key_timer; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - key_timer = timer_read(); - } - - if (!process_caps_word(keycode, record)) { - return false; - } - - switch(keycode) { - case C_BLK: - if (record->event.pressed) { - send_string("```" SS_DELAY(80) SS_LCMD("v") SS_DELAY(80) "```"); - } - break; - - case CTRL_C_UP: - if (record->event.pressed) { - register_mods(MOD_BIT(KC_LEFT_CTRL)); - } else { - unregister_mods(MOD_BIT(KC_LEFT_CTRL)); - if (timer_elapsed(key_timer) < TAPPING_TERM) { - tap_code16(C(KC_UP)); - } - } - return false; - break; - - case L1_EXPL: - if (record->event.pressed) { - layer_on(1); - } else { - layer_off(1); - if (timer_elapsed(key_timer) < TAPPING_TERM) { - tap_code16(C(KC_UP)); - } - } - return false; - break; - - case ROPT_SRH: - if (record->event.pressed) { - register_mods(MOD_BIT(KC_ROPT)); - } else { - unregister_mods(MOD_BIT(KC_ROPT)); - if (timer_elapsed(key_timer) < TAPPING_TERM) { - tap_code16(G(KC_SPC)); - } - } - return false; - break; - } - - return process_record_keymap(keycode, record); -} - -/* Screenshoot */ -void dance_SSHT_finished(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - tap_code16(C(S(G(KC_4)))); - } else { - tap_code(KC_4); - } -} -void dance_SSHT_reset(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code16(C(S(G(KC_4)))); - } else { - unregister_code(KC_4); - } -} - -/* Å */ -void dance_LBRC_finished(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - tap_code16(A(KC_LBRC)); - } else { - tap_code(KC_LBRC); - } -} -void dance_LBRC_reset(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code16(A(KC_LBRC)); - } else { - unregister_code(KC_LBRC); - } -} - -/* Ö */ -void dance_SCLN_finished(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - tap_code16(A(KC_SCLN)); - } else { - tap_code(KC_SCLN); - } -} -void dance_SCLN_reset(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code16(A(KC_SCLN)); - } else { - unregister_code(KC_SCLN); - } -} - -/* Ä */ -void dance_QUOT_finished(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - tap_code16(A(KC_QUOT)); - } else { - tap_code(KC_QUOT); - } -} -void dance_QUOT_reset(tap_dance_state_t *state, void *user_data) { - if (state->count == 2) { - unregister_code16(A(KC_QUOT)); - } else { - unregister_code(KC_QUOT); - } -} - -tap_dance_action_t tap_dance_actions[] = { - [SSHT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_SSHT_finished, dance_SSHT_reset), - [LBRC] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LBRC_finished, dance_LBRC_reset), - [SCLN] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_SCLN_finished, dance_SCLN_reset), - [QUOT] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_QUOT_finished, dance_QUOT_reset), - [END_HOME] = ACTION_TAP_DANCE_DOUBLE(LGUI(KC_LEFT), LGUI(KC_RIGHT)) -}; diff --git a/users/zyber/zyber.h b/users/zyber/zyber.h deleted file mode 100644 index 018d0f5e85..0000000000 --- a/users/zyber/zyber.h +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2022 ZyBeR (@ZyberSE) -// SPDX-License-Identifier: GPL-2.0 - -#pragma once - -#include QMK_KEYBOARD_H -#include "quantum.h" - -enum custom_keycodes { - CTRL_C_UP = SAFE_RANGE, - L1_EXPL, - ROPT_SRH, - C_BLK -}; - -enum tap_dances { - SSHT = 0, - LBRC, - SCLN, - QUOT, - END_HOME -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record); - -void dance_SSHT_finished(tap_dance_state_t *state, void *user_data); -void dance_SSHT_reset(tap_dance_state_t *state, void *user_data); -void dance_LBRC_finished(tap_dance_state_t *state, void *user_data); -void dance_LBRC_reset(tap_dance_state_t *state, void *user_data); -void dance_SCLN_finished(tap_dance_state_t *state, void *user_data); -void dance_SCLN_reset(tap_dance_state_t *state, void *user_data); -void dance_QUOT_finished(tap_dance_state_t *state, void *user_data); -void dance_QUOT_reset(tap_dance_state_t *state, void *user_data); |