diff --git a/SourceGen/WpfGui/EditLocalVariableTable.xaml b/SourceGen/WpfGui/EditLocalVariableTable.xaml index 471cdf7..81fde37 100644 --- a/SourceGen/WpfGui/EditLocalVariableTable.xaml +++ b/SourceGen/WpfGui/EditLocalVariableTable.xaml @@ -25,7 +25,8 @@ limitations under the License. Title="Edit Local Variable Table" SizeToContent="WidthAndHeight" ResizeMode="NoResize" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" - Loaded="Window_Loaded"> + Loaded="Window_Loaded" + PreviewKeyDown="Window_KeyEventHandler"> Are you sure you want to delete the entire table? diff --git a/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs b/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs index a94ddcf..e7f66f4 100644 --- a/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs +++ b/SourceGen/WpfGui/EditLocalVariableTable.xaml.cs @@ -274,6 +274,12 @@ namespace SourceGen.WpfGui { DialogResult = true; } + private void Window_KeyEventHandler(object sender, KeyEventArgs e) { + if (e.Key == Key.Return && Keyboard.Modifiers.HasFlag(ModifierKeys.Control)) { + OkButton_Click(null, null); + } + } + private void DeleteTableButton_Click(object sender, RoutedEventArgs e) { MessageBoxResult result = MessageBox.Show((string)FindResource("str_ConfirmDelete"), (string)FindResource("str_ConfirmDeleteCaption"),