diff --git a/lib/ui/src/libs/key_events.js b/lib/ui/src/libs/key_events.js index c1cd9765b67..e86fb8a0c35 100755 --- a/lib/ui/src/libs/key_events.js +++ b/lib/ui/src/libs/key_events.js @@ -1,3 +1,4 @@ +/* eslint-disable no-fallthrough */ import keycode from 'keycode'; export const features = { @@ -40,9 +41,13 @@ export default function handle(e) { case keycode('F'): e.preventDefault(); return features.FULLSCREEN; + case keycode('C'): + // backward-compatibility case keycode('D'): e.preventDefault(); return features.ADDON_PANEL; + case keycode('X'): + // backward-compatibility case keycode('L'): e.preventDefault(); return features.STORIES_PANEL; @@ -52,9 +57,13 @@ export default function handle(e) { case keycode('left'): e.preventDefault(); return features.PREV_STORY; + case keycode('O'): + // backward-compatibility case keycode('P'): e.preventDefault(); return features.SHOW_SEARCH; + case keycode('G'): + // backward-compatibility case keycode('J'): e.preventDefault(); return features.ADDON_PANEL_IN_RIGHT; diff --git a/lib/ui/src/modules/ui/components/shortcuts_help.js b/lib/ui/src/modules/ui/components/shortcuts_help.js index 752d157002c..87cf72eb517 100755 --- a/lib/ui/src/modules/ui/components/shortcuts_help.js +++ b/lib/ui/src/modules/ui/components/shortcuts_help.js @@ -39,22 +39,22 @@ export function getShortcuts(platform) { // if it is mac platform if (platform && platform.indexOf('mac') !== -1) { return [ - { name: 'Show Search Box', keys: ['⌘ ⇧ P', '⌃ ⇧ P'] }, - { name: 'Toggle Addon panel position', keys: ['⌘ ⇧ J', '⌃ ⇧ J'] }, + { name: 'Show Search Box', keys: ['⌘ ⇧ O', '⌃ ⇧ O'] }, + { name: 'Toggle Addon panel position', keys: ['⌘ ⇧ G', '⌃ ⇧ G'] }, { name: 'Toggle Fullscreen Mode', keys: ['⌘ ⇧ F', '⌃ ⇧ F'] }, - { name: 'Toggle Stories Panel', keys: ['⌘ ⇧ L', '⌃ ⇧ L'] }, - { name: 'Toggle Addon panel', keys: ['⌘ ⇧ D', '⌃ ⇧ D'] }, + { name: 'Toggle Stories Panel', keys: ['⌘ ⇧ X', '⌃ ⇧ X'] }, + { name: 'Toggle Addon panel', keys: ['⌘ ⇧ C', '⌃ ⇧ C'] }, { name: 'Next Story', keys: ['⌘ ⇧ →', '⌃ ⇧ →'] }, { name: 'Previous Story', keys: ['⌘ ⇧ ←', '⌃ ⇧ ←'] }, ]; } return [ - { name: 'Show Search Box', keys: ['Ctrl + Shift + P'] }, - { name: 'Toggle Addon panel position', keys: ['Ctrl + Shift + J'] }, + { name: 'Show Search Box', keys: ['Ctrl + Shift + O'] }, + { name: 'Toggle Addon panel position', keys: ['Ctrl + Shift + G'] }, { name: 'Toggle Fullscreen Mode', keys: ['Ctrl + Shift + F'] }, - { name: 'Toggle Stories Panel', keys: ['Ctrl + Shift + L'] }, - { name: 'Toggle Addon panel', keys: ['Ctrl + Shift + D'] }, + { name: 'Toggle Stories Panel', keys: ['Ctrl + Shift + X'] }, + { name: 'Toggle Addon panel', keys: ['Ctrl + Shift + C'] }, { name: 'Next Story', keys: ['Ctrl + Shift + →'] }, { name: 'Previous Story', keys: ['Ctrl + Shift + ←'] }, ];