Skip to content

Commit

Permalink
Sort shortcuts alphabetically (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhabib committed Feb 28, 2024
1 parent d2b9f50 commit 3890607
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/Playroom/SettingsPanel/SettingsPanel.tsx
Expand Up @@ -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<EditorPosition, ReactChild> = {
Expand Down

0 comments on commit 3890607

Please sign in to comment.