keybd_event in C#

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How to use keybd_event api function in c# for combination keys

eg. ctrl+shift +s

I tried like

keybd_event(0x11,0x1D,0,0)
keybd_event(0x10,0xAA,0,0)
keybd_event(0x53,0x1F,0,0)
keybd_event(0x53,0x1F,0x0002,0)
keybd_event(0x10,0xAA,0x0002,0)
keybd_event(0x11,0x1D,0x0002,0)

but it doesn't work

-kannan
 
hi,

i'm not familiar with keybd_event. but if you want to
know how to handle ctrl+shift+s in c#, here is a sample
using textbox:

private void textBox1_KeyDown(object
sender, System.Windows.Forms.KeyEventArgs e)
{
if (e.Control && e.Shift &&
e.KeyValue == 83) //83 is 's'
MessageBox.Show
("ctrl+shift+s");
}

HTH

gani
http://thedeveloperscorner.com.ph
 
Back
Top