Skip to content

Commit dbb33eb

Browse files
committed
Remove useless keyboard input
1 parent 1418599 commit dbb33eb

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: Flow.Launcher.Infrastructure/Win32Helper.cs

+6-6
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,12 @@ private static bool DirFileJump(string dirPath, string filePath, nint dialog, bo
636636
// Get the handle of the dialog window
637637
var dialogHandle = new HWND(dialog);
638638

639+
// Directly edit file name input box.
640+
if (editFileName)
641+
{
642+
return DirFileJumpForFileName(filePath, dialogHandle);
643+
}
644+
639645
// Alt-D or Ctrl-L to focus on the path input box
640646
if (altD)
641647
{
@@ -646,12 +652,6 @@ private static bool DirFileJump(string dirPath, string filePath, nint dialog, bo
646652
_inputSimulator.Keyboard.ModifiedKeyStroke(VirtualKeyCode.LCONTROL, VirtualKeyCode.VK_L);
647653
}
648654

649-
// Directly edit file name
650-
if (editFileName)
651-
{
652-
return DirFileJumpForFileName(filePath, dialogHandle);
653-
}
654-
655655
// Get the handle of the path input box and then set the text.
656656
// The window with class name "ComboBoxEx32" is not visible when the path input box is not with the keyboard focus.
657657
var controlHandle = PInvoke.FindWindowEx(new(dialogHandle), HWND.Null, "WorkerW", null);

0 commit comments

Comments
 (0)