File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ interface Shortcut {
1717 modifyers : ModifierKey [ ]
1818 key : string
1919}
20+ export const OLD_FULLSCREEN_SHORTCUT : Shortcut = {
21+ modifyers : [ ] ,
22+ key : 'Escape'
23+ }
2024export const FULLSCREEN_SHORTCUT : Shortcut = {
2125 modifyers : [ modKey , 'altKey' ] ,
2226 key : 'f'
@@ -65,8 +69,11 @@ export function useKeyboardShortcuts(bus: Bus): void {
6569 }
6670 }
6771
68- const expandEditor = ( e : KeyboardEvent ) : void => {
69- if ( matchesShortcut ( e , FULLSCREEN_SHORTCUT ) ) {
72+ const fullscreenEditor = ( e : KeyboardEvent ) : void => {
73+ if (
74+ matchesShortcut ( e , FULLSCREEN_SHORTCUT ) ||
75+ matchesShortcut ( e , OLD_FULLSCREEN_SHORTCUT )
76+ ) {
7077 e . preventDefault ( )
7178 trigger ( EXPAND )
7279 }
@@ -79,7 +86,11 @@ export function useKeyboardShortcuts(bus: Bus): void {
7986 }
8087 }
8188
82- const keyboardShortcuts = [ focusEditorOnSlash , expandEditor , cardSizeShortcut ]
89+ const keyboardShortcuts = [
90+ focusEditorOnSlash ,
91+ fullscreenEditor ,
92+ cardSizeShortcut
93+ ]
8394
8495 useEffect ( ( ) => {
8596 keyboardShortcuts . forEach ( shortcut =>
You can’t perform that action at this time.
0 commit comments