Commit 7220fd8 1 parent 77741fe commit 7220fd8 Copy full SHA for 7220fd8
File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,7 @@ class Editor {
81
81
private router : Router ,
82
82
errorHandler : ErrorHandler ,
83
83
private editorService : EditorService ,
84
+ private channel : Channel ,
84
85
) {
85
86
iconRegistry . setDefaultFontSetClass ( 'material-symbols-rounded' ) ;
86
87
( errorHandler as GlobalErrorHandlerService ) . setOnError ( ( error ) => {
@@ -143,7 +144,9 @@ class Editor {
143
144
this . editorService . clearFocusedComponent ( ) ;
144
145
return ;
145
146
}
146
- // Bind these combinations:
147
+ // Hotkey for toggle selection mode
148
+ //
149
+ // Binds:
147
150
// cmd + shift + e (MacOs)
148
151
// ctrl + shift + e (Other platforms)
149
152
if (
@@ -152,6 +155,22 @@ class Editor {
152
155
event . shiftKey
153
156
) {
154
157
this . editorService . toggleSelectionMode ( ) ;
158
+ event . preventDefault ( ) ;
159
+ return ;
160
+ }
161
+ // Hotkey for hot reload
162
+ //
163
+ // Binds:
164
+ // cmd + shift + r (MacOs)
165
+ // ctrl + shift + r (Other platforms)
166
+ if (
167
+ event . key === 'r' &&
168
+ ( isMac ( ) ? event . metaKey : event . ctrlKey ) &&
169
+ event . shiftKey
170
+ ) {
171
+ this . channel . hotReload ( ) ;
172
+ event . preventDefault ( ) ;
173
+ return ;
155
174
}
156
175
}
157
176
}
You can’t perform that action at this time.
0 commit comments