Skip to content

Commit

Permalink
feat: add region:visibility-all shortcut (ctrl+h)
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisJULIEN committed Aug 19, 2024
1 parent 34d8d4a commit 39efce4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions web/libs/editor/src/core/settings/keymap.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@
"key": "alt+h",
"description": "Toggle selected region visibility"
},
"region:visibility-all": {
"key": "ctrl+h",
"mac": "command+h",
"description": "Toggle all regions visibility"
},
"region:lock": {
"key": "alt+l",
"description": "Lock selected region"
Expand Down
5 changes: 5 additions & 0 deletions web/libs/editor/src/stores/AppStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ export default types
}
});

hotkeys.addNamed("region:visibility-all", () => {
const { selected } = self.annotationStore;
selected.regionStore.toggleVisibility();
});

hotkeys.addNamed("annotation:undo", () => {
const annotation = self.annotationStore.selected;

Expand Down

0 comments on commit 39efce4

Please sign in to comment.