feat: keybinds
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user