471,306 Members | 1,289 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,306 software developers and data experts.

c# key sequence

Hi,

I'm trying to simulate a break sequence to a serial device ctrl +
pause/break
I tried it with limited succcess using this

SendKeys.SendWait("^{BREAK}")

I'm putting this code under a button click event,I think it may have
something to do with a keyboard hook but i'm not sure how to go about
it.

Any help would be appreciated.

Thanks

James

Feb 4 '06 #1
4 1959
James,

What device are you trying to send to? Why not just open the port to
the serial device (you can use the classes in the System.IO.Ports namespace
to connect to it) and then send the appropriate information through that.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<jp******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Hi,

I'm trying to simulate a break sequence to a serial device ctrl +
pause/break
I tried it with limited succcess using this

SendKeys.SendWait("^{BREAK}")

I'm putting this code under a button click event,I think it may have
something to do with a keyboard hook but i'm not sure how to go about
it.

Any help would be appreciated.

Thanks

James

Feb 5 '06 #2
Hi Nicholas,

I'm communicating with a router over the console port sending a break
to the router is part of password recovery

Ctrl + pause/break sends a break to the device.

Im automating this process so I want the same key sequence to work
under a button click event for example.

I have no problem sending information to the device over the com port
I'm trying to simulate the ctrl + pause/break key sequence.

Thanks

James

Feb 5 '06 #3
<jp******@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
Hi Nicholas,

I'm communicating with a router over the console port sending a break
to the router is part of password recovery

Ctrl + pause/break sends a break to the device.

Im automating this process so I want the same key sequence to work
under a button click event for example.

I have no problem sending information to the device over the com port
I'm trying to simulate the ctrl + pause/break key sequence.


You might want to try the native SendInput function instead.
Feb 5 '06 #4
thanks I'll look into that from a little reading it looks similar to a
keyboard hook so maybe thats the road I have to take

cheers

James

Feb 6 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Anthony Best | last post: by
5 posts views Thread by Eric E | last post: by
1 post views Thread by Marek Lewczuk | last post: by
3 posts views Thread by Daniel Wilson | last post: by
14 posts views Thread by pat270881 | last post: by
6 posts views Thread by Defcon2030 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.