Skip to content

Commit

Permalink
Merge pull request #3402 from storybooks/dd/deprecate-shortcuts
Browse files Browse the repository at this point in the history
#3377 remove old keyboard shortcuts
  • Loading branch information
Hypnosphi authored Apr 12, 2018
2 parents 030d380 + 0bb5670 commit 908ac7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
8 changes: 8 additions & 0 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@
- [Packages renaming](#packages-renaming)
- [Deprecated embedded addons](#deprecated-embedded-addons)

## From 3.4.x to 4.0

* Keyboard shortcuts have been moved:
- Addon Panel to `Z`
- Stories Panel to `X`
- Show Search to `O`
- Addon Panel right side to `G`

## From version 3.3.x to 3.4.x

There are no expected breaking changes in the 3.4.x release, but 3.4 contains a major refactor to make it easier to support new frameworks, and we will document any breaking changes here if they arise.
Expand Down
9 changes: 0 additions & 9 deletions lib/ui/src/libs/key_events.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-fallthrough */
import keycode from 'keycode';

export const features = {
Expand Down Expand Up @@ -42,13 +41,9 @@ export default function handle(e) {
e.preventDefault();
return features.FULLSCREEN;
case keycode('Z'):
// 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;
case keycode('right'):
Expand All @@ -58,13 +53,9 @@ export default function handle(e) {
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;
default:
Expand Down

0 comments on commit 908ac7a

Please sign in to comment.