This commit is contained in:
stax76
2023-11-03 17:04:26 +01:00
parent aa0e88129b
commit b41ca3cd89
17 changed files with 269 additions and 168 deletions

View File

@@ -102,8 +102,11 @@ public partial class LearnWindow : Window
bool firstEmpty = false;
Keys key = (Keys)vk;
if (key == Keys.ControlKey || key == Keys.ShiftKey ||
key == Keys.Menu || key == Keys.None)
if (key == Keys.ControlKey ||
key == Keys.ShiftKey ||
key == Keys.Menu ||
key == Keys.None ||
key == Keys.Tab)
return;
@@ -189,7 +192,6 @@ public partial class LearnWindow : Window
void SetKey(string? key)
{
NewKey = key!;
MenuTextBlock.Text = InputItem?.Path;
KeyTextBlock.Text = key;
}
@@ -229,6 +231,8 @@ public partial class LearnWindow : Window
Close();
}
void CancelButton_Click(object sender, RoutedEventArgs e) => Close();
void Window_MouseWheel(object sender, MouseWheelEventArgs e)
{
if (e.Delta > 0)
@@ -280,15 +284,6 @@ public partial class LearnWindow : Window
}
}
void Window_PreviewKeyDown(object sender, System.Windows.Input.KeyEventArgs e)
{
if (e.Key == Key.Tab)
{
OnKeyDown((uint)Keys.Tab);
e.Handled = true;
}
}
string GetModifierText()
{
string ret = "";