feat: keybinds

This commit is contained in:
Frozd
2025-11-28 13:08:18 +01:00
parent bb71806a22
commit d17e1183f9
2 changed files with 27 additions and 8 deletions

View File

@@ -94,5 +94,24 @@ namespace CarManagerV2
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
btnSave.PerformClick();
return true; // Indicate that the key has been handled
}
if (keyData == Keys.Escape)
{
this.Close();
return true; // Indicate that the key has been handled
}
if (keyData == Keys.Delete)
{
btnDelete.PerformClick();
return true; // Indicate that the key has been handled
}
return base.ProcessCmdKey(ref msg, keyData);
}
}
}