mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-19 05:55:34 +09:00
refactor: remove dead code (#3337)
This commit is contained in:
1 parent
a19002652b
commit
93d1f8af46
1527 files changed
+21170
-73846
No files matched your search
@@ -110,14 +110,6 @@ const normalizeKeyboardShortcutKey = (key: string): string => {
|
||||
if (key === 'Break') return 'pause';
|
||||
return key.toLowerCase();
|
||||
};
|
||||
|
||||
export {comboToCombokeysStrings} from '@app/features/app/keybindings/utils/ComboShortcutStrings';
|
||||
export {keyNameForGlobalHook, physicalKeyNameForGlobalHook} from '@app/features/app/keybindings/utils/GlobalHookKeys';
|
||||
export {
|
||||
shouldSuppressLocalShortcutForModalFocus,
|
||||
shouldSuppressShortcutForFullscreenMedia,
|
||||
} from '@app/features/app/keybindings/utils/ModalSuppression';
|
||||
|
||||
const ROUTE_ALLOWED_ACTIONS = new Set<KeybindCommand>(['system_open_theme_studio_popout']);
|
||||
const GAMEPAD_POLL_INTERVAL_MS = 50;
|
||||
const PORTAL_SOURCE_ID_PREFIX = 'portal:';
|
||||
|
||||
@@ -138,7 +138,7 @@ export const physicalKeyNameForGlobalHook = (combo: KeyCombo): string | null =>
|
||||
if (combo.mouseButton != null || combo.gamepadButton != null || combo.modifierOnly) return null;
|
||||
return keyNameForGlobalHookCode(combo.code);
|
||||
};
|
||||
export const keyNameForGlobalHookCode = (code: string | undefined): string | null => {
|
||||
const keyNameForGlobalHookCode = (code: string | undefined): string | null => {
|
||||
if (!code) return null;
|
||||
const mapped = globalHookCodeKeyMap[code];
|
||||
if (mapped) return mapped;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import type {KeybindCommand, KeyCombo} from '@app/features/input/state/InputKeybind';
|
||||
|
||||
export function comboModifierSignature(combo: KeyCombo): string {
|
||||
function comboModifierSignature(combo: KeyCombo): string {
|
||||
return [
|
||||
combo.ctrlOrMeta ? 'mod' : '',
|
||||
combo.ctrl ? 'ctrl' : '',
|
||||
|
||||
@@ -5,7 +5,6 @@ import {resolveKeybindCommand} from '@app/features/input/state/input_keybind/Key
|
||||
import {isActiveCustomKeybind, keyComboHasTriggerInput} from '@app/features/input/state/KeybindResolution';
|
||||
|
||||
export {
|
||||
comboModifierSignature,
|
||||
hookShortcutIdForAction,
|
||||
hookShortcutIdForKeybind,
|
||||
} from '@app/features/app/keybindings/utils/HookShortcutIds';
|
||||
@@ -46,15 +45,11 @@ export function gamepadSourceIdForKeybind(keybind: {id: string | null; action: K
|
||||
return `gamepad:${keybind.id}`;
|
||||
}
|
||||
|
||||
export function hasTriggerKey(combo: KeyCombo): boolean {
|
||||
return (combo.key ?? '') !== '' || (combo.code ?? '') !== '';
|
||||
}
|
||||
|
||||
export function hasTriggerInput(combo: KeyCombo): boolean {
|
||||
function hasTriggerInput(combo: KeyCombo): boolean {
|
||||
return keyComboHasTriggerInput(combo);
|
||||
}
|
||||
|
||||
export function isEnabledDefaultCombo(combo: KeyCombo): boolean {
|
||||
function isEnabledDefaultCombo(combo: KeyCombo): boolean {
|
||||
return (combo.enabled ?? true) !== false && hasTriggerInput(combo);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user