How can i catch tab+shift

  • Thread starter Thread starter sytemper
  • Start date Start date
S

sytemper

I write a keydown KeyDown event to catch if tab is press or tab+shift
is press.And i already override the IsInputKey method.
But noe i only can get the tab but no shift+tab. When shift+tab is
press, i only get KeyCode=ShiftKey,and KeyData=65552, but nothing to
show that tab is also pressed.
What should i do now?
 
When KeyCode = Tab, examine the KeyEventArgs.Shift property. It will tell
you if the Shift key is pressed or not

private void Control_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Tab && e.Shift)
// Shift + Tab
else if (e.KeyCode == Keys.Tab && !e.Shift)
// Tab
}

/claes
 
Back
Top