Toolverse
All skills

hotkey

by lobehub

Guide for adding keyboard shortcuts. Use when implementing new hotkeys, registering shortcuts, or working with keyboard interactions. Triggers on hotkey implementation or keyboard shortcut tasks.

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
lobehub
Category
Mobile
Views
2

About this skill

Guide for adding keyboard shortcuts. Use when implementing new hotkeys, registering shortcuts, or working with keyboard interactions. Triggers on hotkey implementation or keyboard shortcut tasks.

How to use

  1. Otwórz plik src/types/hotkey.ts i dodaj nową stałą do obiektu HotkeyEnum, na przykład ClearChat: 'clearChat'. To zdefiniuje unikalny identyfikator dla twojego skrótu.

  2. W pliku src/const/hotkeys.ts zarejestruj domyślne przypisanie klawiszy. Utwórz nowy wpis w tablicy HOTKEYS_REGISTRATION ze wskazaniem grupy (np. Conversation), identyfikatora hotkeya, kombinacji klawiszy za pomocą combineKeys i zakresu (np. Chat).

  3. Dodaj tłumaczenia w src/locales/default/hotkey.ts. Utwórz obiekt z polami desc (opis) i title (nazwa) dla nowego skrótu.

  4. Stwórz hook w src/hooks/useHotkeys/chatScope.ts (lub odpowiednim pliku zakresu). Hook powinien używać useHotkeyById z identyfikatorem hotkeya i funkcją, którą chcesz wykonać.

  5. Zarejestruj hook w funkcji useRegisterChatHotkeys lub analogicznej dla twojego zakresu, aby skrót został aktywowany.

  6. Opcjonalnie: dodaj tooltip do przycisku, który wyzwala akcję. Pobierz skrót z useUserStore i przekaż go do komponentu Tooltip razem z tytułem z tłumaczeń.

Related skills

react-native-design

by wshobson

Master React Native styling, navigation, and Reanimated animations for cross-platform mobile development. Use when building React Native apps, implementing navigation patterns, or creating performant animations.

Mobile
1964

unreal-engine-cpp-pro

by sickn33

Expert guide for Unreal Engine 5.x C++ development, covering UObject hygiene, performance patterns, and best practices.

Mobile
2582

create-plan

by antinomyhq

Generate detailed implementation plans for complex tasks. Creates comprehensive strategic plans in Markdown format with objectives, step-by-step implementation tasks using checkbox format, verification criteria, risk assessments, and alternative approaches. Use when users need

Mobile
13108

interactive-portfolio

by davila7

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities. Use when: portfolio,

Mobile
1823

godot

by bfollington

This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI

Mobile
547680

mobile-ios-design

by wshobson

Master iOS Human Interface Guidelines and SwiftUI patterns for building native iOS apps. Use when designing iOS interfaces, implementing SwiftUI views, or ensuring apps follow Apple's design principles.

Mobile
107284