Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions Flow.Launcher/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,16 @@ private void OnKeyDown(object sender, KeyEventArgs e)
if (specialKeyState.CtrlPressed)
{
if (_viewModel.SelectedIsFromQueryResults()
&& QueryTextBox.CaretIndex == QueryTextBox.Text.Length
&& FilesFolders.IsLocationPathString(QueryTextBox.Text))
&& QueryTextBox.CaretIndex == QueryTextBox.Text.Length)
{

_viewModel.BackspaceCommand.Execute(null);
e.Handled = true;
var queryWithoutActionKeyword =
QueryBuilder.Build(QueryTextBox.Text.Trim(), PluginManager.NonGlobalPlugins).Search;

if (FilesFolders.IsLocationPathString(queryWithoutActionKeyword))
{
_viewModel.BackspaceCommand.Execute(null);
e.Handled = true;
}
}
}
break;
Expand Down
8 changes: 6 additions & 2 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,14 @@ private void InitializeKeyCommands()

BackspaceCommand = new RelayCommand(index =>
{
var path = QueryText;
var query = QueryBuilder.Build(QueryText.Trim(), PluginManager.NonGlobalPlugins);

// GetPreviousExistingDirectory does not require trailing '\', otherwise will return empty string
ChangeQueryText(FilesFolders.GetPreviousExistingDirectory(FilesFolders.IsLocationPathString, path.TrimEnd('\\')));
var path = FilesFolders.GetPreviousExistingDirectory((_) => true, query.Search.TrimEnd('\\'));

var actionKeyword = string.IsNullOrEmpty(query.ActionKeyword) ? string.Empty : $"{query.ActionKeyword} ";

ChangeQueryText($"{actionKeyword}{path}");
});

LoadContextMenuCommand = new RelayCommand(_ =>
Expand Down
2 changes: 1 addition & 1 deletion Flow.Launcher/ViewModel/ResultsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -310,4 +310,4 @@ public void Update(List<ResultViewModel> newItems, CancellationToken token = def
}
}
}
}
}
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,17 +215,18 @@ And you can download <a href="https://github.com/Flow-Launcher/Flow.Launcher/dis

| Hotkey | Description |
| ------------------------------------------------------------ | -------------------------------------------- |
| <kbd>Alt</kbd>+ <kbd>Space</kbd> | Open Search Box (Default and Configurable) |
| <kbd>Alt</kbd>+ <kbd>Space</kbd> | Open Search Box (default and configurable) |
| <kbd>Enter</kbd> | Execute |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter</kbd> | Run As Admin |
| <kbd>↑</kbd><kbd>↓</kbd> | Scroll up & Down |
| <kbd>←</kbd><kbd>→</kbd> | Back to Result / Open Context Menu |
| <kbd>Ctrl</kbd> +<kbd>o</kbd> , <kbd>Shift</kbd> +<kbd>Enter</kbd> | Open Context Menu |
| <kbd>Tab</kbd> | Autocomplete |
| <kbd>Ctrl</kbd> +<kbd>o</kbd> , <kbd>Shift</kbd> +<kbd>Enter</kbd> | Open Context Menu |
| <kbd>Tab</kbd> | Autocomplete |
| <kbd>Esc</kbd> | Back to Result & Close |
| <kbd>Ctrl</kbd> +<kbd>i</kbd> | Open Setting Window |
| <kbd>F5</kbd> | Reload All Plugin Data & Window Search Index |
| <kbd>Ctrl</kbd> + <kbd>h</kbd> | Open Query History |
| <kbd>Ctrl</kbd> + <kbd>Backspace</kbd> | Back to Previous Directory |


## System Command List
Expand Down