Extends shortcut for opening & closing the studio
- Should support alt + \ in most cases - Corrects the shortcut in log message when the studio is hidden
This commit is contained in:
parent
2e4ae0c860
commit
81578f7925
2 changed files with 7 additions and 2 deletions
|
@ -71,7 +71,7 @@ export default function UIRoot() {
|
|||
useEffect(() => {
|
||||
if (visiblityState === 'everythingIsHidden') {
|
||||
console.warn(
|
||||
`Theatre Studio is hidden. You can restore it by either hitting alt/option+\` or calling studio.ui.restore()`,
|
||||
`Theatre Studio is hidden. Use the keyboard shortcut 'alt + \\' to restore the studio, or call studio.ui.restore().`,
|
||||
)
|
||||
}
|
||||
return () => {}
|
||||
|
|
|
@ -44,7 +44,12 @@ export default function useKeyboardShortcuts() {
|
|||
} else {
|
||||
return
|
||||
}
|
||||
} else if (e.key === `'` && e.altKey) {
|
||||
}
|
||||
// alt + \
|
||||
else if (
|
||||
e.altKey &&
|
||||
(e.key === '\\' || e.code === 'Backslash' || e.code === 'IntlBackslash')
|
||||
) {
|
||||
studio.transaction(({stateEditors, drafts}) => {
|
||||
stateEditors.studio.ahistoric.setVisibilityState(
|
||||
drafts.ahistoric.visibilityState === 'everythingIsHidden'
|
||||
|
|
Loading…
Reference in a new issue