Jump to content

Capturing keypress in another application


Recommended Posts

Hi all,

is there anyway to capture a keypress in another application and then STOP that application responding to the keypress?

I can get the keypress via _isPressed, but I can't find any way to stop it whilst leaving the cursor in the control it was in - the key in question is the down arrow, and it currently moves the focus when you press it. I want it to keep the focus EXACTLY where it is, even down to the position in the text box.

Any ideas?

Andy

Link to comment
Share on other sites

Thanks Toady,

That's resolved that problem... but also stops the up/down keys working in other apps.

Is there any way to stop them working only in ONE application (defined by the window title). I've messed around with ControlGetFocus to get the control ID, and then immediately putting the cursor back into that control if the window title matches, but it didn't really work- it captures the control id AFTER the cursor has already left the control in question.

Admittedly, I'm trying to get the app developer to fix this - it's basically a wrapper around an IE object, and IE itself doesn't have this issue, so I think it's something to do with the wrapping functionality.

The other bit I'm missing is how to get the window title from the control, so that again, it's not affecting the use of other apps. Any ideas how to do this?

Regards,

Andy

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...