File tree 1 file changed +10
-3
lines changed
1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -219,9 +219,16 @@ fn should_prevent_default_for_key(
219
219
// * cmd-shift-C (debug tools)
220
220
// * cmd/ctrl-c/v/x (lest we prevent copy/paste/cut events)
221
221
222
- // Prevent ctrl-P from opening the print dialog. Users may want to use it for a command palette.
223
- if egui_key == egui:: Key :: P && ( modifiers. ctrl || modifiers. command || modifiers. mac_cmd ) {
224
- return true ;
222
+ // Prevent cmd/ctrl plus these keys from triggering the default browser action:
223
+ let keys = [
224
+ egui:: Key :: O , // open
225
+ egui:: Key :: P , // print (cmd-P is common for command palette)
226
+ egui:: Key :: S , // save
227
+ ] ;
228
+ for key in keys {
229
+ if egui_key == key && ( modifiers. ctrl || modifiers. command || modifiers. mac_cmd ) {
230
+ return true ;
231
+ }
225
232
}
226
233
227
234
if egui_key == egui:: Key :: Space && !runner. text_agent . has_focus ( ) {
You can’t perform that action at this time.
0 commit comments