Skip to content

Instantly share code, notes, and snippets.

@riyadparvez
Created December 31, 2012 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riyadparvez/4419614 to your computer and use it in GitHub Desktop.
Save riyadparvez/4419614 to your computer and use it in GitHub Desktop.
Add this code snippet to your class to handle navigational key press
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Up)
{
}
else if (keyData == Keys.Down)
{
}
else if (keyData == Keys.Left)
{
}
else if (keyData == Keys.Right)
{
}
return base.ProcessCmdKey(ref msg, keyData);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment