Using KeyPreview to handle form shortcut keys

If you need to trap shortcut keys in your application to perform misc tasks, use the following code to set KeyPreview to true and then in the KeyDown event handle the actual clicks:

 private void Form_OnLoad(object sender, EventArgs e)
{
KeyPreview
= true;
}

private void form_KeyDown(object sender, KeyEventArgs e)
{

if (e.Alt && e.KeyCode.ToString() == “L”)
{

//DO Something            
}
}