diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-07-18 11:51:47 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-07-18 11:51:47 +0200 |
| commit | f8ccb673bfd327e9001d5b7ba1ff77f303c2ec49 (patch) | |
| tree | 2352bfdb3598c88c9e1ffcbcc04a213dcd73854c /apps/web/src/hooks | |
| parent | 74e7d427aaed3517ce578c2192f783dacffc02fc (diff) | |
| download | opencut-f8ccb673bfd327e9001d5b7ba1ff77f303c2ec49.tar.gz | |
style: match editing experience to match capcut
Diffstat (limited to 'apps/web/src/hooks')
| -rw-r--r-- | apps/web/src/hooks/use-keyboard-shortcuts-help.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/web/src/hooks/use-keyboard-shortcuts-help.ts b/apps/web/src/hooks/use-keyboard-shortcuts-help.ts index bd8beffc..c7de8466 100644 --- a/apps/web/src/hooks/use-keyboard-shortcuts-help.ts +++ b/apps/web/src/hooks/use-keyboard-shortcuts-help.ts @@ -114,7 +114,13 @@ export const useKeyboardShortcutsHelp = () => { } }); - return result; + // Sort shortcuts by category first, then by description to ensure consistent ordering + return result.sort((a, b) => { + if (a.category !== b.category) { + return a.category.localeCompare(b.category); + } + return a.description.localeCompare(b.description); + }); }, [keybindings]); return { |
