diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 5ad3c04a..b0292f1d 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -278,6 +278,13 @@ namespace v2rayN.Views { switch (e.Key) { + case Key.V: + if (Keyboard.FocusedElement is TextBox) return; + var clipboardData = WindowsUtils.GetClipboardData(); + var service = Locator.Current.GetService(); + if (service != null) _ = service.AddServerViaClipboardAsync(clipboardData); + break; + case Key.S: ScanScreenTaskAsync().ContinueWith(_ => { }); break; diff --git a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs index cf512349..b838cd56 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -223,12 +223,6 @@ namespace v2rayN.Views { switch (e.Key) { - case Key.V: - var clipboardData = WindowsUtils.GetClipboardData(); - var service = Locator.Current.GetService(); - if (service != null) _ = service.AddServerViaClipboardAsync(clipboardData); - break; - case Key.A: menuSelectAll_Click(null, null); break;