diff --git a/v2rayN/v2rayN/Views/MainWindow.xaml.cs b/v2rayN/v2rayN/Views/MainWindow.xaml.cs index 0243fcffc62..0dc5991195d 100644 --- a/v2rayN/v2rayN/Views/MainWindow.xaml.cs +++ b/v2rayN/v2rayN/Views/MainWindow.xaml.cs @@ -283,13 +283,6 @@ private void MainWindow_PreviewKeyDown(object sender, KeyEventArgs e) { switch (e.Key) { - case Key.V: - if (_backupAndRestoreView?.IsVisible == true) return; - - var clipboardData = WindowsUtils.GetClipboardData(); - ViewModel?.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 e39c7dffc37..36101b41b09 100644 --- a/v2rayN/v2rayN/Views/ProfilesView.xaml.cs +++ b/v2rayN/v2rayN/Views/ProfilesView.xaml.cs @@ -228,6 +228,12 @@ private void LstProfiles_PreviewKeyDown(object sender, KeyEventArgs e) { 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;