Using the usb kybd…
I know I can detect Tab using (checking for) the representation \t …it works fine
How can shift-tab or CTRL-tab be detected?
Using the usb kybd…
I know I can detect Tab using (checking for) the representation \t …it works fine
How can shift-tab or CTRL-tab be detected?
follow the key up and key down events. shift and control are keys.
I am following the keyboard event…when I detect “\t” I know its a Tab & & “\b” is backspace…they work fine.
What should I use to detect a shift-TAB?
you have to follow the key up and down events as I said. When you get a key down event you need to see if it is the shift key. If it is, set a variable to true. When then you get a key up event, for the shift key, set the shift variable to false. Then when you get the tab, you can check the shift variables and see if you have shift-tab.
When you detect tab key,call GetKeyStatemethod and pass the value for required shift or control key to check if it is down as well.
Thanks…worked like a champ
static void CharDown(USBH_Keyboard sender, USBH_KeyboardEventArgs args)
{
USBH_Keyboard ddd = (USBH_Keyboard)sender;
bool shiftPressed = ddd.GetKeyState(USBH_Key.LeftShift) == USBH_KeyState.Down;
shiftPressed |= ddd.GetKeyState(USBH_Key.RightShift) == USBH_KeyState.Down; //either shift key sets true condition
nuchar = args.KeyAscii.ToString();
getintkybdval(nuchar,shiftPressed);
}