Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 5 additions & 0 deletions Files/Views/ColumnShellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
Invoked="KeyboardAccelerator_Invoked"
IsEnabled="{x:Bind IsCurrentInstance, Mode=OneWay}"
Modifiers="Control" />
<KeyboardAccelerator
Key="C"
Invoked="KeyboardAccelerator_Invoked"
IsEnabled="{x:Bind IsCurrentInstance, Mode=OneWay}"
Modifiers="Control,Shift" />
<KeyboardAccelerator
Key="N"
Invoked="KeyboardAccelerator_Invoked"
Expand Down
24 changes: 24 additions & 0 deletions Files/Views/ColumnShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using System.Threading;
using System.Threading.Tasks;
using Windows.ApplicationModel.Core;
using Windows.ApplicationModel.DataTransfer;
using Windows.ApplicationModel.Resources.Core;
using Windows.Storage;
using Windows.System;
Expand Down Expand Up @@ -598,6 +599,29 @@ private async void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, Keybo
}
break;

case (true, true, false, true, VirtualKey.C):
{
DataPackage dataPackage = null;

if (!InstanceViewModel.IsPageTypeSearchResults && ContentPage.SelectedItem != null)
{
dataPackage = new DataPackage();
dataPackage.SetText(this.FilesystemViewModel.WorkingDirectory);
}
else
{
dataPackage = new DataPackage();
dataPackage.SetText(ContentPage.SelectedItem.ItemPath);
}

if (dataPackage != null)
{
Clipboard.SetContent(dataPackage);
Clipboard.Flush();
}
break;
}

case (true, true, false, true, VirtualKey.N): // ctrl + shift + n, new item
if (InstanceViewModel.CanCreateFileInPage)
{
Expand Down
5 changes: 5 additions & 0 deletions Files/Views/ModernShellPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
Invoked="KeyboardAccelerator_Invoked"
IsEnabled="{x:Bind IsCurrentInstance, Mode=OneWay}"
Modifiers="Control" />
<KeyboardAccelerator
Key="C"
Invoked="KeyboardAccelerator_Invoked"
IsEnabled="{x:Bind IsCurrentInstance, Mode=OneWay}"
Modifiers="Control,Shift" />
<KeyboardAccelerator
Key="N"
Invoked="KeyboardAccelerator_Invoked"
Expand Down
24 changes: 24 additions & 0 deletions Files/Views/ModernShellPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
using System.Threading;
using System.Threading.Tasks;
using Windows.ApplicationModel.Core;
using Windows.ApplicationModel.DataTransfer;
using Windows.ApplicationModel.Resources.Core;
using Windows.Storage;
using Windows.System;
Expand Down Expand Up @@ -638,6 +639,29 @@ private async void KeyboardAccelerator_Invoked(KeyboardAccelerator sender, Keybo
}
break;

case (true, true, false, true, VirtualKey.C):
{
DataPackage dataPackage = null;

if (!InstanceViewModel.IsPageTypeSearchResults && ContentPage.SelectedItem != null)
{
dataPackage = new DataPackage();
dataPackage.SetText(this.FilesystemViewModel.WorkingDirectory);
}
else
{
dataPackage = new DataPackage();
dataPackage.SetText(ContentPage.SelectedItem.ItemPath);
}

if (dataPackage != null)
{
Clipboard.SetContent(dataPackage);
Clipboard.Flush();
}
break;
}

case (false, false, false, true, VirtualKey.F3): //f3
case (true, false, false, true, VirtualKey.F): // ctrl + f
NavToolbarViewModel.SwitchSearchBoxVisibility();
Expand Down