From 38906074ac5b52309bb910de34919f57ace76494 Mon Sep 17 00:00:00 2001 From: Felix Habib <33821218+felixhabib@users.noreply.github.com> Date: Thu, 29 Feb 2024 10:04:02 +1100 Subject: [PATCH] Sort shortcuts alphabetically (#331) --- src/Playroom/SettingsPanel/SettingsPanel.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Playroom/SettingsPanel/SettingsPanel.tsx b/src/Playroom/SettingsPanel/SettingsPanel.tsx index e1875ad5..0618ae76 100644 --- a/src/Playroom/SettingsPanel/SettingsPanel.tsx +++ b/src/Playroom/SettingsPanel/SettingsPanel.tsx @@ -24,18 +24,21 @@ const getKeyBindings = () => { const metaKeySymbol = isMac() ? '⌘' : 'Ctrl'; const altKeySymbol = isMac() ? '⌥' : 'Alt'; + // Sort shortcuts alphabetically + /* eslint sort-keys: "error" */ return { - 'Format code': [metaKeySymbol, 'S'], - 'Swap line up': [altKeySymbol, '↑'], - 'Swap line down': [altKeySymbol, '↓'], - 'Duplicate line up': ['⇧', altKeySymbol, '↑'], - 'Duplicate line down': ['⇧', altKeySymbol, '↓'], - 'Add cursor to prev line': [metaKeySymbol, altKeySymbol, '↑'], 'Add cursor to next line': [metaKeySymbol, altKeySymbol, '↓'], + 'Add cursor to prev line': [metaKeySymbol, altKeySymbol, '↑'], + 'Duplicate line down': ['⇧', altKeySymbol, '↓'], + 'Duplicate line up': ['⇧', altKeySymbol, '↑'], + 'Format code': [metaKeySymbol, 'S'], 'Select next occurrence': [metaKeySymbol, 'D'], - 'Wrap selection in tag': [metaKeySymbol, '⇧', ','], + 'Swap line down': [altKeySymbol, '↓'], + 'Swap line up': [altKeySymbol, '↑'], 'Toggle comment': [metaKeySymbol, '/'], + 'Wrap selection in tag': [metaKeySymbol, '⇧', ','], }; + /* eslint-disable sort-keys */ }; const positionIcon: Record = {