Skip to content

Conversation

Copy link

Copilot AI commented Oct 30, 2025

Users can now customize keyboard shortcuts through the UI and have them persist across sessions.

Changes

State Management

  • hotkeysSlice: New Redux slice storing custom hotkey mappings, persisted via redux-remember
  • useHotkeyData: Modified to merge custom hotkeys from store with defaults, adds defaultHotkeys field for reset functionality

UI Components

  • HotkeyEditor: Inline editor component with save/cancel/reset, validates comma-separated input
  • HotkeysModal: Added Edit/View mode toggle and "Reset All" button
  • HotkeyListItem: Conditional rendering based on showEditor prop

Translation & Documentation

  • Added i18n keys: editMode, viewMode, editHotkey, resetToDefault, resetAll, enterHotkeys, save, cancel
  • Created CUSTOMIZABLE_HOTKEYS.md with architecture overview and usage guide

Usage

// Custom hotkeys work automatically with existing hook
useRegisteredHotkeys({
  id: 'invoke',
  category: 'app',
  callback: handleInvoke,
  options: { enabled: true },
});
// Hook now uses custom hotkey from store if set, falls back to default

Hotkey format follows react-hotkeys-hook syntax: mod+enter, shift+x, or comma-separated ctrl+k, cmd+k for multiple bindings.

Original prompt

We've got an ask for customizable hotkeys in the frontend, which we previously have not supported. Should be possible to do with composition though.

Hotkeys are something that users won't want to reset between sessions, so come up with a way that a hotkey editor can be exposed that allows users to update the hotkeys in their current frontend experience, but also save them to a file so that they are retained next time the app loads.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits October 30, 2025 18:04
Co-authored-by: dunkeroni <3298737+dunkeroni@users.noreply.github.com>
Co-authored-by: dunkeroni <3298737+dunkeroni@users.noreply.github.com>
Co-authored-by: dunkeroni <3298737+dunkeroni@users.noreply.github.com>
Co-authored-by: dunkeroni <3298737+dunkeroni@users.noreply.github.com>
Co-authored-by: dunkeroni <3298737+dunkeroni@users.noreply.github.com>
Copilot AI changed the title [WIP] Add customizable hotkeys support in frontend Add customizable hotkeys with persistent storage Oct 30, 2025
Copilot AI requested a review from dunkeroni October 30, 2025 18:20
Copilot finished work on behalf of dunkeroni October 30, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants