1414using System . Threading . Channels ;
1515using System . Xml ;
1616using Windows . ApplicationModel . Core ;
17+ using System . Windows . Input ;
1718
1819namespace Flow . Launcher . Plugin . Program . Programs
1920{
@@ -422,12 +423,16 @@ public Result Result(string query, IPublicAPI api)
422423 ContextData = this ,
423424 Action = e =>
424425 {
425- var elevated = (
426- e . SpecialKeyState . CtrlPressed &&
427- e . SpecialKeyState . ShiftPressed &&
428- ! e . SpecialKeyState . AltPressed &&
429- ! e . SpecialKeyState . WinPressed
430- ) ;
426+ // Ctrl + Enter to open containing folder
427+ bool openFolder = e . SpecialKeyState . ToModifierKeys ( ) == ModifierKeys . Control ;
428+ if ( openFolder )
429+ {
430+ Main . Context . API . OpenDirectory ( Location ) ;
431+ return true ;
432+ }
433+
434+ // Ctrl + Shift + Enter to run elevated
435+ bool elevated = e . SpecialKeyState . ToModifierKeys ( ) == ( ModifierKeys . Control | ModifierKeys . Shift ) ;
431436
432437 bool shouldRunElevated = elevated && CanRunElevated ;
433438 _ = Task . Run ( ( ) => Launch ( shouldRunElevated ) ) . ConfigureAwait ( false ) ;
@@ -459,7 +464,8 @@ public List<Result> ContextMenus(IPublicAPI api)
459464
460465 return true ;
461466 } ,
462- IcoPath = "Images/folder.png"
467+ IcoPath = "Images/folder.png" ,
468+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xe838 " ) ,
463469 }
464470 } ;
465471
@@ -473,7 +479,8 @@ public List<Result> ContextMenus(IPublicAPI api)
473479 Task . Run ( ( ) => Launch ( true ) ) . ConfigureAwait ( false ) ;
474480 return true ;
475481 } ,
476- IcoPath = "Images/cmd.png"
482+ IcoPath = "Images/cmd.png" ,
483+ Glyph = new GlyphInfo ( FontFamily : "/Resources/#Segoe Fluent Icons" , Glyph : "\xe7ef " )
477484 } ) ;
478485 }
479486
0 commit comments