Skip to content

Commit 919d451

Browse files
committed
Insert subtitle when shift is held
1 parent f4edff7 commit 919d451

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<KeyBinding Key="Tab" Command="{Binding ReplaceQueryWithResult}" />
4545
<KeyBinding
4646
Key="Tab"
47-
Command="{Binding SelectPrevItemCommand}"
47+
Command="{Binding ReplaceQueryWithResult}"
4848
Modifiers="Shift" />
4949
<KeyBinding
5050
Key="I"

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,14 @@ private void InitializeKeyCommands()
240240
var result = results.SelectedItem?.Result;
241241
if (result != null) // SelectedItem returns null if selection is empty.
242242
{
243-
ChangeQueryText(result.InsertText);
243+
string _newText = String.Empty;
244+
_newText = result.Title;
245+
var SpecialKeyState = GlobalHotkey.Instance.CheckModifiers();
246+
if (SpecialKeyState.ShiftPressed)
247+
{
248+
_newText = result.SubTitle;
249+
}
250+
ChangeQueryText(_newText);
244251
}
245252
});
246253

0 commit comments

Comments
 (0)