Click here to Skip to main content
15,923,006 members

Comments by mayur1112 (Top 1 by date)

mayur1112 31-Mar-12 6:50am View    
[code]
[DllImport("user32.dll", SetLastError = true)]
static extern void keybd_event(byte bVk, byte bScan, int dwFlags, int dwExtraInfo);

public static void test()
{

byte VK_TAB = 0x09; // Windows tab keycode

byte VK_TAB = 0x30; // Mac OS tab keycode

const int KEYEVENTF_KEYUP = 0x2;

const int KEYEVENTF_KEYDOWN = 0x0;

keybd_event(VK_TAB, 0, KEYEVENTF_KEYDOWN, 0);

keybd_event(VK_TAB, 0, KEYEVENTF_KEYUP, 0);
}[/code]


i have to create test method which send tab keystroke to another app . its working perfact in windows but not working in Mac OS which run in VMware in windows . please help me ..